Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
unitybase
ubjs
Commits
709fb407
Commit
709fb407
authored
Oct 14, 2021
by
Pavel Mashliakovskiy
🤹🏻
Browse files
iitVerify test method added
parent
7d83e619
Pipeline
#32549
skipped with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/autotest/models/TST/appLevelMethod.js
View file @
709fb407
...
...
@@ -409,3 +409,16 @@ function googleSearch (req, resp) {
App
.
httpCallObserve
((
Date
.
now
()
-
d
)
/
1000
,
customURI
,
answer
.
statusCode
)
}
App
.
registerEndpoint
(
'
googleSearch
'
,
googleSearch
,
false
)
/**
* Verify signature from file
* @param {THTTPRequest} req
* @param {THTTPResponse} resp
*/
function
iitVerifyFile
(
req
,
resp
)
{
const
iitCrypto
=
require
(
'
@ub-d/iit-crypto
'
)
const
sign
=
fs
.
readFileSync
(
'
/home/pavelmash/_DATA/logs/PGR/verifyFileCrash/img227.pdf.p7s
'
)
const
res
=
iitCrypto
.
verify
(
sign
,
'
/home/pavelmash/_DATA/logs/PGR/verifyFileCrash/img227.pdf
'
)
resp
.
writeEnd
(
res
)
}
App
.
registerEndpoint
(
'
iitVerifyFile
'
,
iitVerifyFile
,
false
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment