Skip to content

Commit fd1954b

Browse files
wc/asn: fix several inconsistent function prototype parameter names
1 parent 7fb7509 commit fd1954b

3 files changed

Lines changed: 17 additions & 18 deletions

File tree

doc/dox_comments/header_files/asn_public.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ int wc_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz);
11921192
\sa wc_PemCertToDer
11931193
*/
11941194
int wc_DerToPem(const byte* der, word32 derSz, byte* output,
1195-
word32 outputSz, int type);
1195+
word32 outSz, int type);
11961196

11971197
/*!
11981198
\ingroup ASN
@@ -1219,7 +1219,7 @@ int wc_DerToPem(const byte* der, word32 derSz, byte* output,
12191219
formatted certificate
12201220
\param outSz size of the buffer in which to store the pem formatted
12211221
certificate
1222-
\param cipher_inf Additional cipher information.
1222+
\param cipher_info Additional cipher information.
12231223
\param type the type of certificate to generate. Valid types are:
12241224
CERT_TYPE, PRIVATEKEY_TYPE, ECC_PRIVATEKEY_TYPE, and CERTREQ_TYPE.
12251225
@@ -1237,7 +1237,7 @@ int wc_DerToPem(const byte* der, word32 derSz, byte* output,
12371237
\sa wc_PemCertToDer
12381238
*/
12391239
int wc_DerToPemEx(const byte* der, word32 derSz, byte* output,
1240-
word32 outputSz, byte *cipherIno, int type);
1240+
word32 outSz, byte *cipher_info, int type);
12411241

12421242
/*!
12431243
\ingroup CertsKeys

wolfssl/wolfcrypt/asn.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ WOLFSSL_LOCAL int SizeASN_Items(const ASNItem* asn, ASNSetData *data,
352352
WOLFSSL_LOCAL int SetASN_Items(const ASNItem* asn, ASNSetData *data, int count,
353353
byte* output);
354354
WOLFSSL_LOCAL int GetASN_Items(const ASNItem* asn, ASNGetData *data, int count,
355-
int complete, const byte* input, word32* inOutIdx, word32 maxIdx);
355+
int complete, const byte* input, word32* inOutIdx, word32 length);
356356

357357
#ifdef WOLFSSL_ASN_TEMPLATE_TYPE_CHECK
358358
WOLFSSL_LOCAL void GetASN_Int8Bit(ASNGetData *dataASN, byte* num);
@@ -2150,15 +2150,14 @@ WOLFSSL_LOCAL void FreeTrustedPeerTable(TrustedPeerCert** table, int rows,
21502150
void* heap);
21512151
#endif /* WOLFSSL_TRUST_PEER_CERT */
21522152

2153-
WOLFSSL_ASN_API int ToTraditional(byte* buffer, word32 length);
2154-
WOLFSSL_ASN_API int ToTraditional_ex(byte* buffer, word32 length,
2155-
word32* algId);
2153+
WOLFSSL_ASN_API int ToTraditional(byte* input, word32 sz);
2154+
WOLFSSL_ASN_API int ToTraditional_ex(byte* input, word32 sz, word32* algId);
21562155
WOLFSSL_LOCAL int ToTraditionalInline(const byte* input, word32* inOutIdx,
2157-
word32 length);
2156+
word32 sz);
21582157
WOLFSSL_LOCAL int ToTraditionalInline_ex(const byte* input, word32* inOutIdx,
2159-
word32 length, word32* algId);
2158+
word32 sz, word32* algId);
21602159
WOLFSSL_LOCAL int ToTraditionalInline_ex2(const byte* input, word32* inOutIdx,
2161-
word32 length, word32* algId,
2160+
word32 sz, word32* algId,
21622161
word32* eccOid);
21632162
WOLFSSL_LOCAL int ToTraditionalEnc(byte* input, word32 sz, const char* password,
21642163
int passwordSz, word32* algId);
@@ -2173,7 +2172,7 @@ WOLFSSL_ASN_API int TraditionalEnc(byte* key, word32 keySz, byte* out,
21732172
word32* outSz, const char* password, int passwordSz, int vPKCS,
21742173
int vAlgo, int encAlgId, byte* salt, word32 saltSz, int itt,
21752174
WC_RNG* rng, void* heap);
2176-
WOLFSSL_LOCAL int DecryptContent(byte* input, word32 sz,const char* psw,int pswSz);
2175+
WOLFSSL_LOCAL int DecryptContent(byte* input, word32 sz, const char* password, int passwordSz);
21772176
WOLFSSL_LOCAL int EncryptContent(byte* input, word32 sz, byte* out, word32* outSz,
21782177
const char* password,int passwordSz, int vPKCS, int vAlgo, int encAlgId,
21792178
byte* salt, word32 saltSz, int itt, int hmacOid, WC_RNG* rng,
@@ -2204,7 +2203,7 @@ WOLFSSL_LOCAL byte GetCertNameId(int idx);
22042203
#endif
22052204
WOLFSSL_LOCAL int GetShortInt(const byte* input, word32* inOutIdx, int* number,
22062205
word32 maxIdx);
2207-
WOLFSSL_TEST_VIS int SetShortInt(byte* input, word32* inOutIdx, word32 number,
2206+
WOLFSSL_TEST_VIS int SetShortInt(byte* output, word32* inOutIdx, word32 number,
22082207
word32 maxIdx);
22092208

22102209
WOLFSSL_LOCAL const char* GetSigName(int oid);
@@ -2255,8 +2254,8 @@ WOLFSSL_LOCAL int GetAlgoId(const byte* input, word32* inOutIdx, word32* oid,
22552254
word32 oidType, word32 maxIdx);
22562255
WOLFSSL_LOCAL int GetAlgoIdEx(const byte* input, word32* inOutIdx, word32* oid,
22572256
word32 oidType, word32 maxIdx, byte *absentParams);
2258-
WOLFSSL_ASN_API int GetASNTag(const byte* input, word32* idx, byte* tag,
2259-
word32 inputSz);
2257+
WOLFSSL_ASN_API int GetASNTag(const byte* input, word32* inOutIdx, byte* tag,
2258+
word32 maxIdx);
22602259
WOLFSSL_LOCAL int GetASN_BitString(const byte* input, word32 idx, int length);
22612260

22622261
WOLFSSL_LOCAL word32 SetASNLength(word32 length, byte* output);
@@ -2354,9 +2353,9 @@ WOLFSSL_LOCAL int DecodeAsymKeyPublic(const byte* input, word32* inOutIdx,
23542353
WOLFSSL_LOCAL int wc_EncryptedInfoParse(EncryptedInfo* info,
23552354
const char** pBuffer, size_t bufSz);
23562355

2357-
WOLFSSL_LOCAL int PemToDer(const unsigned char* buff, long sz, int type,
2356+
WOLFSSL_LOCAL int PemToDer(const unsigned char* buff, long longSz, int type,
23582357
DerBuffer** pDer, void* heap, EncryptedInfo* info,
2359-
int* eccKey);
2358+
int* keyFormat);
23602359
WOLFSSL_LOCAL int AllocDer(DerBuffer** der, word32 length, int type,
23612360
void* heap);
23622361
WOLFSSL_LOCAL int AllocCopyDer(DerBuffer** der, const unsigned char* buff,

wolfssl/wolfcrypt/asn_public.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,9 @@ WOLFSSL_API void wc_FreeDer(DerBuffer** pDer);
642642
#ifdef WOLFSSL_DER_TO_PEM
643643
WOLFSSL_ABI
644644
WOLFSSL_API int wc_DerToPem(const byte* der, word32 derSz, byte* output,
645-
word32 outputSz, int type);
645+
word32 outSz, int type);
646646
WOLFSSL_API int wc_DerToPemEx(const byte* der, word32 derSz, byte* output,
647-
word32 outputSz, byte *cipherIno, int type);
647+
word32 outSz, byte *cipher_info, int type);
648648
#endif
649649

650650
WOLFSSL_API word32 wc_PkcsPad(byte* buf, word32 sz, word32 blockSz);

0 commit comments

Comments
 (0)