From 40c9a03ebe501aaa9cf7f3d6fcbfb4c99fb4a79c Mon Sep 17 00:00:00 2001 From: Brett Nicholas <7547222+bigbrett@users.noreply.github.com> Date: Wed, 14 May 2025 11:31:36 -0600 Subject: [PATCH] rename function args to match implementation --- wolfcrypt/src/asn.c | 8 ++++---- wolfssl/wolfcrypt/asn_public.h | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index e201e5bbe..2d33563a9 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -24629,7 +24629,7 @@ int wc_CertGetPubKey(const byte* cert, word32 certSz, * @return BUFFER_E if the provided buffer is too small */ WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer, - word32 certSz, + word32 certDerSz, byte* pubKeyDer, word32* pubKeyDerSz) { @@ -24640,14 +24640,14 @@ WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer, word32 length; int badDate; - if (certDer == NULL || certSz == 0 || pubKeyDerSz == NULL) { + if (certDer == NULL || certDerSz == 0 || pubKeyDerSz == NULL) { return BAD_FUNC_ARG; } length = 0; badDate = 0; - wc_InitDecodedCert(&cert, certDer, certSz, NULL); + wc_InitDecodedCert(&cert, certDer, certDerSz, NULL); /* Parse up to the SubjectPublicKeyInfo */ ret = wc_GetPubX509(&cert, 0, &badDate); @@ -24657,7 +24657,7 @@ WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer, /* Get the length of the SubjectPublicKeyInfo sequence */ idx = startIdx; - ret = GetSequence(certDer, &idx, (int*)&length, certSz); + ret = GetSequence(certDer, &idx, (int*)&length, certDerSz); if (ret >= 0) { /* Calculate total length including sequence header */ length += (idx - startIdx); diff --git a/wolfssl/wolfcrypt/asn_public.h b/wolfssl/wolfcrypt/asn_public.h index b2b067a41..fff6a5ac8 100644 --- a/wolfssl/wolfcrypt/asn_public.h +++ b/wolfssl/wolfcrypt/asn_public.h @@ -879,9 +879,10 @@ WOLFSSL_API int wc_ParseCert( WOLFSSL_API int wc_GetPubKeyDerFromCert(struct DecodedCert* cert, byte* derKey, word32* derKeySz); -WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* cert, - word32 certSz, byte* pubKey, - word32* pubKeySz); +WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer, + word32 certDerSz, + byte* pubKeyDer, + word32* pubKeyDerSz); #ifdef WOLFSSL_FPKI WOLFSSL_API int wc_GetUUIDFromCert(struct DecodedCert* cert,