michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: #ifndef _PKCS1SIG_H_ michael@0: #define _PKCS1SIG_H_ michael@0: michael@0: #include "hasht.h" michael@0: #include "seccomon.h" michael@0: #include "secoidt.h" michael@0: michael@0: /* SGN_VerifyPKCS1DigestInfo verifies that the length of the digest is correct michael@0: * for the given algorithm, then verifies that the recovered data from the michael@0: * PKCS#1 signature is a properly-formatted DigestInfo that identifies the michael@0: * given digest algorithm, then verifies that the digest in the DigestInfo michael@0: * matches the given digest. michael@0: * michael@0: * dataRecoveredFromSignature must be the result of calling PK11_VerifyRecover michael@0: * or equivalent. michael@0: * michael@0: * If unsafeAllowMissingParameters is true (not recommended), then a DigestInfo michael@0: * without the mandatory ASN.1 NULL parameter will also be accepted. michael@0: */ michael@0: SECStatus _SGN_VerifyPKCS1DigestInfo(SECOidTag digestAlg, michael@0: const SECItem* digest, michael@0: const SECItem* dataRecoveredFromSignature, michael@0: PRBool unsafeAllowMissingParameters); michael@0: michael@0: #endif /* _PKCS1SIG_H_ */