mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Add new public API wc_CheckCertSigPubKey()
This commit is contained in:
@ -2037,3 +2037,25 @@ WOLFSSL_API int wc_SetCustomExtension(Cert *cert, int critical, const char *oid,
|
|||||||
*/
|
*/
|
||||||
WOLFSSL_ASN_API int wc_SetUnknownExtCallback(DecodedCert* cert,
|
WOLFSSL_ASN_API int wc_SetUnknownExtCallback(DecodedCert* cert,
|
||||||
wc_UnknownExtCallback cb);
|
wc_UnknownExtCallback cb);
|
||||||
|
/*!
|
||||||
|
\ingroup ASN
|
||||||
|
|
||||||
|
\brief This function verifies the signature in the der form of an X.509
|
||||||
|
certificate against a public key. The public key is expected to be the full
|
||||||
|
subject public key info in der form.
|
||||||
|
|
||||||
|
\return 0 Returned on success.
|
||||||
|
\return Other negative values on failure.
|
||||||
|
|
||||||
|
\param cert The der encoding of the X.509 certificate.
|
||||||
|
\param certSz The size in bytes of cert.
|
||||||
|
\param heap A pointer to the heap used for dynamic allocation. Can be NULL.
|
||||||
|
\param pubKey The der encoding of the public key.
|
||||||
|
\param pubKeySz The size in bytes of pubKey.
|
||||||
|
\param pubKeyOID OID identifying the algorithm of the public key.
|
||||||
|
(ie: ECDSAk, DSAk or RSAk)
|
||||||
|
|
||||||
|
WOLFSSL_ASN_API int wc_CheckCertSigPubKey(const byte* cert, word32 certSz,
|
||||||
|
void* heap, const byte* pubKey,
|
||||||
|
word32 pubKeySz, int pubKeyOID);
|
||||||
|
*/
|
||||||
|
@ -18400,6 +18400,14 @@ int CheckCertSignaturePubKey(const byte* cert, word32 certSz, void* heap,
|
|||||||
return CheckCertSignature_ex(cert, certSz, heap, NULL,
|
return CheckCertSignature_ex(cert, certSz, heap, NULL,
|
||||||
pubKey, pubKeySz, pubKeyOID, 0);
|
pubKey, pubKeySz, pubKeyOID, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wc_CheckCertSigPubKey(const byte* cert, word32 certSz, void* heap,
|
||||||
|
const byte* pubKey, word32 pubKeySz, int pubKeyOID)
|
||||||
|
{
|
||||||
|
return CheckCertSignaturePubKey(cert, certSz, heap, pubKey, pubKeySz,
|
||||||
|
pubKeyOID);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WOLFSSL_CERT_REQ
|
#ifdef WOLFSSL_CERT_REQ
|
||||||
int CheckCSRSignaturePubKey(const byte* cert, word32 certSz, void* heap,
|
int CheckCSRSignaturePubKey(const byte* cert, word32 certSz, void* heap,
|
||||||
const byte* pubKey, word32 pubKeySz, int pubKeyOID)
|
const byte* pubKey, word32 pubKeySz, int pubKeyOID)
|
||||||
|
@ -1836,6 +1836,12 @@ WOLFSSL_LOCAL int EncodePolicyOID(byte *out, word32 *outSz,
|
|||||||
WOLFSSL_API int CheckCertSignature(const byte*,word32,void*,void* cm);
|
WOLFSSL_API int CheckCertSignature(const byte*,word32,void*,void* cm);
|
||||||
WOLFSSL_LOCAL int CheckCertSignaturePubKey(const byte* cert, word32 certSz,
|
WOLFSSL_LOCAL int CheckCertSignaturePubKey(const byte* cert, word32 certSz,
|
||||||
void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID);
|
void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID);
|
||||||
|
#ifdef OPENSSL_EXTRA
|
||||||
|
WOLFSSL_ASN_API int wc_CheckCertSigPubKey(const byte* cert, word32 certSz,
|
||||||
|
void* heap, const byte* pubKey,
|
||||||
|
word32 pubKeySz, int pubKeyOID);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_CERT_REQ
|
#ifdef WOLFSSL_CERT_REQ
|
||||||
WOLFSSL_LOCAL int CheckCSRSignaturePubKey(const byte* cert, word32 certSz,
|
WOLFSSL_LOCAL int CheckCSRSignaturePubKey(const byte* cert, word32 certSz,
|
||||||
void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID);
|
void* heap, const byte* pubKey, word32 pubKeySz, int pubKeyOID);
|
||||||
|
Reference in New Issue
Block a user