Skip to content

Commit c45f7c8

Browse files
author
Lealem Amedie
committed
Make DecodeObjectId available for OPENSSL_ALL
1 parent 7251d56 commit c45f7c8

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5513,7 +5513,8 @@ int EncodeObjectId(const word16* in, word32 inSz, byte* out, word32* outSz)
55135513
}
55145514
#endif /* HAVE_OID_ENCODING */
55155515

5516-
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT)
5516+
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) || \
5517+
defined(OPENSSL_ALL)
55175518
/* Encode dotted form of OID into byte array version.
55185519
*
55195520
* @param [in] in Byte array containing OID.
@@ -5560,7 +5561,7 @@ int DecodeObjectId(const byte* in, word32 inSz, word16* out, word32* outSz)
55605561

55615562
return 0;
55625563
}
5563-
#endif /* HAVE_OID_DECODING */
5564+
#endif /* HAVE_OID_DECODING || WOLFSSL_ASN_PRINT || OPENSSL_ALL */
55645565

55655566
/* Decode the header of a BER/DER encoded OBJECT ID.
55665567
*
@@ -12376,13 +12377,9 @@ static int GenerateDNSEntryRIDString(DNS_entry* entry, void* heap)
1237612377
XMEMCPY(finalName, rid, XSTRLEN((const char*)rid));
1237712378
}
1237812379
else {
12379-
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT)
1238012380
/* Decode OBJECT_ID into dotted form array. */
1238112381
ret = DecodeObjectId((const byte*)(rid),(word32)entry->len, tmpName,
1238212382
(word32*)&tmpSize);
12383-
#else
12384-
ret = NOT_COMPILED_IN;
12385-
#endif
1238612383

1238712384
if (ret == 0) {
1238812385
endChar = 1;

wolfssl/wolfcrypt/asn.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,8 @@ WOLFSSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx,
21722172
WOLFSSL_API int EncodeObjectId(const word16* in, word32 inSz,
21732173
byte* out, word32* outSz);
21742174
#endif
2175-
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT)
2175+
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) || \
2176+
defined(OPENSSL_ALL)
21762177
WOLFSSL_LOCAL int DecodeObjectId(const byte* in, word32 inSz,
21772178
word16* out, word32* outSz);
21782179
#endif

0 commit comments

Comments
 (0)