pkcs1sig.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. */
  5. #ifndef _PKCS1SIG_H_
  6. #define _PKCS1SIG_H_
  7. #include "hasht.h"
  8. #include "seccomon.h"
  9. #include "secoidt.h"
  10. /* SGN_VerifyPKCS1DigestInfo verifies that the length of the digest is correct
  11. * for the given algorithm, then verifies that the recovered data from the
  12. * PKCS#1 signature is a properly-formatted DigestInfo that identifies the
  13. * given digest algorithm, then verifies that the digest in the DigestInfo
  14. * matches the given digest.
  15. *
  16. * dataRecoveredFromSignature must be the result of calling PK11_VerifyRecover
  17. * or equivalent.
  18. *
  19. * If unsafeAllowMissingParameters is true (not recommended), then a DigestInfo
  20. * without the mandatory ASN.1 NULL parameter will also be accepted.
  21. */
  22. SECStatus _SGN_VerifyPKCS1DigestInfo(SECOidTag digestAlg,
  23. const SECItem* digest,
  24. const SECItem* dataRecoveredFromSignature,
  25. PRBool unsafeAllowMissingParameters);
  26. #endif /* _PKCS1SIG_H_ */