Commit 709fb407 authored by Pavel Mashliakovskiy's avatar Pavel Mashliakovskiy 🤹🏻
Browse files

iitVerify test method added

parent 7d83e619
Pipeline #32549 skipped with stage
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment