Skip to content

Commit 40c9a03

Browse files
committed
rename function args to match implementation
1 parent 2151a1b commit 40c9a03

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24629,7 +24629,7 @@ int wc_CertGetPubKey(const byte* cert, word32 certSz,
2462924629
* @return BUFFER_E if the provided buffer is too small
2463024630
*/
2463124631
WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
24632-
word32 certSz,
24632+
word32 certDerSz,
2463324633
byte* pubKeyDer,
2463424634
word32* pubKeyDerSz)
2463524635
{
@@ -24640,14 +24640,14 @@ WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
2464024640
word32 length;
2464124641
int badDate;
2464224642

24643-
if (certDer == NULL || certSz == 0 || pubKeyDerSz == NULL) {
24643+
if (certDer == NULL || certDerSz == 0 || pubKeyDerSz == NULL) {
2464424644
return BAD_FUNC_ARG;
2464524645
}
2464624646

2464724647
length = 0;
2464824648
badDate = 0;
2464924649

24650-
wc_InitDecodedCert(&cert, certDer, certSz, NULL);
24650+
wc_InitDecodedCert(&cert, certDer, certDerSz, NULL);
2465124651

2465224652
/* Parse up to the SubjectPublicKeyInfo */
2465324653
ret = wc_GetPubX509(&cert, 0, &badDate);
@@ -24657,7 +24657,7 @@ WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
2465724657

2465824658
/* Get the length of the SubjectPublicKeyInfo sequence */
2465924659
idx = startIdx;
24660-
ret = GetSequence(certDer, &idx, (int*)&length, certSz);
24660+
ret = GetSequence(certDer, &idx, (int*)&length, certDerSz);
2466124661
if (ret >= 0) {
2466224662
/* Calculate total length including sequence header */
2466324663
length += (idx - startIdx);

wolfssl/wolfcrypt/asn_public.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,10 @@ WOLFSSL_API int wc_ParseCert(
879879

880880
WOLFSSL_API int wc_GetPubKeyDerFromCert(struct DecodedCert* cert,
881881
byte* derKey, word32* derKeySz);
882-
WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* cert,
883-
word32 certSz, byte* pubKey,
884-
word32* pubKeySz);
882+
WOLFSSL_API int wc_GetSubjectPubKeyInfoDerFromCert(const byte* certDer,
883+
word32 certDerSz,
884+
byte* pubKeyDer,
885+
word32* pubKeyDerSz);
885886

886887
#ifdef WOLFSSL_FPKI
887888
WOLFSSL_API int wc_GetUUIDFromCert(struct DecodedCert* cert,

0 commit comments

Comments
 (0)