@@ -4344,180 +4344,83 @@ static word32 SetBitString16Bit(word16 val, byte* output)
43444344#ifndef WOLFSSL_ASN_TEMPLATE
43454345static int GetAlgoIdImpl(const byte* input, word32* inOutIdx, word32* oid, word32 oidType, word32 maxIdx, byte *absentParams);
43464346#ifndef NO_RSA
4347- #ifndef NO_RSA
43484347static int _RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, int* keySz, word32 inSz);
43494348#endif
4350- #endif
4351- #ifndef NO_DSA
43524349#ifndef NO_DSA
43534350static int DsaKeyIntsToDer(DsaKey* key, byte* output, word32* inLen, int ints, int includeVersion);
43544351#endif
4355- #endif
4356- #if defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT)
43574352#if defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT)
43584353static int SetEccPublicKey(byte* output, ecc_key* key, int outLen, int with_header, int comp);
43594354#endif
4360- #endif
4361- #if !defined(NO_RSA) && !defined(NO_CERTS)
43624355#if !defined(NO_RSA) && !defined(NO_CERTS)
43634356static int StoreRsaKey(DecodedCert* cert, const byte* source, word32* srcIdx, word32 maxIdx);
43644357#endif
4365- #endif
4366- #if defined(HAVE_ECC) && !defined(NO_CERTS)
43674358#if defined(HAVE_ECC) && !defined(NO_CERTS)
43684359static int StoreEccKey(DecodedCert* cert, const byte* source, word32* srcIdx, word32 maxIdx, const byte* pubKey, word32 pubKeyLen);
43694360#endif
4370- #endif
43714361#ifndef NO_CERTS
43724362#if !defined(NO_DSA)
4373- #if !defined(NO_DSA)
43744363static int ParseDsaKey(const byte* source, word32* srcIdx, word32 maxIdx, void* heap);
43754364#endif
43764365#endif
4377- #endif
43784366static int GetCertName(DecodedCert* cert, char* full, byte* hash, int nameType, const byte* input, word32* inOutIdx, word32 maxIdx);
43794367static int GetDateInfo(const byte* source, word32* idx, const byte** pDate, byte* pFormat, int* pLength, word32 maxIdx);
43804368#ifndef NO_CERTS
43814369static int GetSigAlg(DecodedCert* cert, word32* sigOid, word32 maxIdx);
4382- #endif
4383- #ifndef NO_CERTS
43844370static int GetSignature(DecodedCert* cert);
43854371#endif
43864372static word32 SetAlgoIDImpl(int algoOID, byte* output, int type, int curveSz, byte absentParams);
43874373#ifndef NO_CERTS
43884374static int DecodeAltNames(const byte* input, word32 sz, DecodedCert* cert);
4389- #endif
4390- #ifndef NO_CERTS
43914375static int DecodeCrlDist(const byte* input, word32 sz, DecodedCert* cert);
4392- #endif
4393- #ifndef NO_CERTS
43944376static int DecodeAuthInfo(const byte* input, word32 sz, DecodedCert* cert);
4395- #endif
4396- #ifndef NO_CERTS
4397- #ifndef IGNORE_NAME_CONSTRAINTS
43984377#ifndef IGNORE_NAME_CONSTRAINTS
43994378static int DecodeSubtree(const byte* input, word32 sz, Base_entry** head, word32 limit, void* heap);
4400- #endif
4401- #endif
4402- #endif
4403- #ifndef NO_CERTS
4404- #ifndef IGNORE_NAME_CONSTRAINTS
4405- #ifndef IGNORE_NAME_CONSTRAINTS
44064379static int DecodeNameConstraints(const byte* input, word32 sz, DecodedCert* cert);
44074380#endif
4408- #endif
4409- #endif
4410- #ifndef NO_CERTS
4411- #if defined(WOLFSSL_SEP) || defined(WOLFSSL_CERT_EXT)
44124381#if defined(WOLFSSL_SEP) || defined(WOLFSSL_CERT_EXT)
44134382static int DecodeCertPolicy(const byte* input, word32 sz, DecodedCert* cert);
44144383#endif
4415- #endif
4416- #endif
4417- #ifndef NO_CERTS
4418- #ifdef WOLFSSL_SUBJ_DIR_ATTR
44194384#ifdef WOLFSSL_SUBJ_DIR_ATTR
44204385static int DecodeSubjDirAttr(const byte* input, word32 sz, DecodedCert* cert);
44214386#endif
4422- #endif
4423- #endif
4424- #ifndef NO_CERTS
44254387static int DecodeCertExtensions(DecodedCert* cert);
4426- #endif
4427- #ifndef NO_CERTS
4428- #if defined(WOLFSSL_SMALL_CERT_VERIFY) || defined(OPENSSL_EXTRA)
44294388#if defined(WOLFSSL_SMALL_CERT_VERIFY) || defined(OPENSSL_EXTRA)
44304389static int CheckCertSignature_ex(const byte* cert, word32 certSz, void* heap, void* cm, const byte* pubKey, word32 pubKeySz, int pubKeyOID, int req);
44314390#endif
4432- #endif
4433- #endif
4434- #ifndef NO_CERTS
4435- #if !defined(NO_RSA) && \
4436- (defined(WOLFSSL_KEY_TO_DER) || defined(WOLFSSL_CERT_GEN))
44374391#if !defined(NO_RSA) && \
44384392(defined(WOLFSSL_KEY_TO_DER) || defined(WOLFSSL_CERT_GEN))
44394393static int SetRsaPublicKey(byte* output, RsaKey* key, int outLen, int with_header);
44404394#endif
4441- #endif
4442- #endif
4443- #ifndef NO_CERTS
44444395#ifdef WOLFSSL_CERT_GEN
44454396#ifdef WOLFSSL_CERT_EXT
4446- #ifdef WOLFSSL_CERT_EXT
44474397static int SetExtKeyUsage(Cert* cert, byte* output, word32 outSz, byte input);
4448- #endif
4449- #endif
4450- #endif
4451- #endif
4452- #ifndef NO_CERTS
4453- #ifdef WOLFSSL_CERT_GEN
4454- #ifdef WOLFSSL_CERT_EXT
4455- #ifdef WOLFSSL_CERT_EXT
44564398static int SetCertificatePolicies(byte *output, word32 outputSz, char input[MAX_CERTPOL_NB][MAX_CERTPOL_SZ], word16 nb_certpol, void* heap);
44574399#endif
44584400#endif
4459- #endif
4460- #endif
4461- #ifndef NO_CERTS
4462- #if defined(WOLFSSL_CERT_GEN) || defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
44634401#if defined(WOLFSSL_CERT_GEN) || defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
44644402static int EncodeName(EncodedName* name, const char* nameStr, byte nameTag, byte type, byte emailTag, CertName* cname);
44654403#endif
4466- #endif
4467- #endif
4468- #ifndef NO_CERTS
44694404#ifdef WOLFSSL_CERT_GEN
44704405static int SetValidity(byte* output, int daysValid);
4471- #endif
4472- #endif
4473- #ifndef NO_CERTS
4474- #ifdef WOLFSSL_CERT_GEN
44754406static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz, RsaKey* rsaKey, ecc_key* eccKey, WC_RNG* rng, DsaKey* dsaKey, ed25519_key* ed25519Key, ed448_key* ed448Key, falcon_key* falconKey, dilithium_key* dilithiumKey, sphincs_key* sphincsKey);
4476- #endif
4477- #endif
4478- #ifndef NO_CERTS
4479- #ifdef WOLFSSL_CERT_GEN
4480- #ifdef WOLFSSL_CERT_REQ
44814407#ifdef WOLFSSL_CERT_REQ
44824408static int MakeCertReq(Cert* cert, byte* derBuffer, word32 derSz, RsaKey* rsaKey, DsaKey* dsaKey, ecc_key* eccKey, ed25519_key* ed25519Key, ed448_key* ed448Key, falcon_key* falconKey, dilithium_key* dilithiumKey, sphincs_key* sphincsKey);
44834409#endif
44844410#endif
44854411#endif
4486- #endif
44874412#if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
44884413static int OcspDecodeCertIDInt(const byte* input, word32* inOutIdx, word32 inSz, OcspEntry* entry);
4489- #endif
4490- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
44914414static int DecodeSingleResponse(byte* source, word32* ioIndex, word32 size, int wrapperSz, OcspEntry* single);
4492- #endif
4493- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
4494- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
44954415static int DecodeOcspRespExtensions(byte* source, word32* ioIndex, OcspResponse* resp, word32 sz);
4496- #endif
4497- #endif
4498- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
4499- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
45004416static int DecodeResponseData(byte* source, word32* ioIndex, OcspResponse* resp, word32 size);
4501- #endif
4502- #endif
4503- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
4504- #if defined(HAVE_OCSP) && !defined(WOLFCRYPT_ONLY)
45054417static int DecodeBasicOcspResponse(byte* source, word32* ioIndex, OcspResponse* resp, word32 size, void* cm, void* heap, int noVerify, int noVerifySignature);
45064418#endif
4507- #endif
4508- #if defined(HAVE_CRL) && !defined(WOLFCRYPT_ONLY)
45094419#if defined(HAVE_CRL) && !defined(WOLFCRYPT_ONLY)
45104420static int GetRevoked(RevokedCert* rcert, const byte* buff, word32* idx, DecodedCRL* dcrl, word32 maxIdx);
4511- #endif
4512- #endif
4513- #if defined(HAVE_CRL) && !defined(WOLFCRYPT_ONLY)
4514- #ifndef NO_SKID
45154421#ifndef NO_SKID
45164422static int ParseCRL_AuthKeyIdExt(const byte* input, int sz, DecodedCRL* dcrl);
45174423#endif
4518- #endif
4519- #endif
4520- #if defined(HAVE_CRL) && !defined(WOLFCRYPT_ONLY)
45214424static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32* inOutIdx, word32 sz);
45224425#endif
45234426#endif /* !WOLFSSL_ASN_TEMPLATE */
0 commit comments