forked from wolfSSL/wolfssl
Make public wc_ api for EncodeObjectId
This commit is contained in:
@ -5438,13 +5438,18 @@ static int CheckCurve(word32 oid)
|
||||
* @return BAD_FUNC_ARG when in or outSz is NULL.
|
||||
* @return BUFFER_E when buffer too small.
|
||||
*/
|
||||
int wc_EncodeObjectId(const word16* in, word32 inSz, byte* out, word32* outSz)
|
||||
{
|
||||
return EncodeObjectId(in, inSz, out, outSz);
|
||||
}
|
||||
|
||||
int EncodeObjectId(const word16* in, word32 inSz, byte* out, word32* outSz)
|
||||
{
|
||||
int i, x, len;
|
||||
word32 d, t;
|
||||
|
||||
/* check args */
|
||||
if (in == NULL || outSz == NULL) {
|
||||
if (in == NULL || outSz == NULL || inSz <= 0) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
|
@ -2169,7 +2169,9 @@ WOLFSSL_LOCAL int GetInt(mp_int* mpi, const byte* input, word32* inOutIdx,
|
||||
word32 maxIdx);
|
||||
|
||||
#ifdef HAVE_OID_ENCODING
|
||||
WOLFSSL_API int EncodeObjectId(const word16* in, word32 inSz,
|
||||
WOLFSSL_API int wc_EncodeObjectId(const word16* in, word32 inSz,
|
||||
byte* out, word32* outSz);
|
||||
WOLFSSL_LOCAL int EncodeObjectId(const word16* in, word32 inSz,
|
||||
byte* out, word32* outSz);
|
||||
#endif
|
||||
#if defined(HAVE_OID_DECODING) || defined(WOLFSSL_ASN_PRINT) || \
|
||||
|
Reference in New Issue
Block a user