Make DecodeObjectId available for OPENSSL_ALL

This commit is contained in:
Lealem Amedie
2023-06-28 13:46:45 -06:00
parent 7251d564eb
commit c45f7c87b0
2 changed files with 5 additions and 7 deletions

View File

@ -5513,7 +5513,8 @@ int EncodeObjectId(const word16* in, word32 inSz, byte* out, word32* outSz)
} }
#endif /* HAVE_OID_ENCODING */ #endif /* HAVE_OID_ENCODING */
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) #if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) || \
defined(OPENSSL_ALL)
/* Encode dotted form of OID into byte array version. /* Encode dotted form of OID into byte array version.
* *
* @param [in] in Byte array containing OID. * @param [in] in Byte array containing OID.
@ -5560,7 +5561,7 @@ int DecodeObjectId(const byte* in, word32 inSz, word16* out, word32* outSz)
return 0; return 0;
} }
#endif /* HAVE_OID_DECODING */ #endif /* HAVE_OID_DECODING || WOLFSSL_ASN_PRINT || OPENSSL_ALL */
/* Decode the header of a BER/DER encoded OBJECT ID. /* Decode the header of a BER/DER encoded OBJECT ID.
* *
@ -12376,13 +12377,9 @@ static int GenerateDNSEntryRIDString(DNS_entry* entry, void* heap)
XMEMCPY(finalName, rid, XSTRLEN((const char*)rid)); XMEMCPY(finalName, rid, XSTRLEN((const char*)rid));
} }
else { else {
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT)
/* Decode OBJECT_ID into dotted form array. */ /* Decode OBJECT_ID into dotted form array. */
ret = DecodeObjectId((const byte*)(rid),(word32)entry->len, tmpName, ret = DecodeObjectId((const byte*)(rid),(word32)entry->len, tmpName,
(word32*)&tmpSize); (word32*)&tmpSize);
#else
ret = NOT_COMPILED_IN;
#endif
if (ret == 0) { if (ret == 0) {
endChar = 1; endChar = 1;

View File

@ -2172,7 +2172,8 @@ WOLFSSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx,
WOLFSSL_API int EncodeObjectId(const word16* in, word32 inSz, WOLFSSL_API int EncodeObjectId(const word16* in, word32 inSz,
byte* out, word32* outSz); byte* out, word32* outSz);
#endif #endif
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) #if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) || \
defined(OPENSSL_ALL)
WOLFSSL_LOCAL int DecodeObjectId(const byte* in, word32 inSz, WOLFSSL_LOCAL int DecodeObjectId(const byte* in, word32 inSz,
word16* out, word32* outSz); word16* out, word32* outSz);
#endif #endif