mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Make GetShortInt available with WOLFSSL_ASN_EXTRA
Customers may need to use GetShortInt when doing custom ASN.1 parsing. Was only available when !NO_PWDBASED. GetShortInt is still an internal API.
This commit is contained in:
@ -105,6 +105,8 @@ ASN Options:
|
|||||||
* WOLFSSL_ECC_SIGALG_PARAMS_NULL_ALLOWED: Allows the ECDSA/EdDSA signature
|
* WOLFSSL_ECC_SIGALG_PARAMS_NULL_ALLOWED: Allows the ECDSA/EdDSA signature
|
||||||
* algorithms in certificates to have NULL parameter instead of empty.
|
* algorithms in certificates to have NULL parameter instead of empty.
|
||||||
* DO NOT enable this unless required for interoperability.
|
* DO NOT enable this unless required for interoperability.
|
||||||
|
* WOLFSSL_ASN_EXTRA: Make more ASN.1 APIs available regardless of internal
|
||||||
|
* usage.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||||
@ -3176,7 +3178,7 @@ int GetMyVersion(const byte* input, word32* inOutIdx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef NO_PWDBASED
|
#if !defined(NO_PWDBASED) || defined(WOLFSSL_ASN_EXTRA)
|
||||||
/* Decode small integer, 32 bits or less.
|
/* Decode small integer, 32 bits or less.
|
||||||
*
|
*
|
||||||
* @param [in] input Buffer of BER data.
|
* @param [in] input Buffer of BER data.
|
||||||
@ -3241,8 +3243,10 @@ int GetShortInt(const byte* input, word32* inOutIdx, int* number, word32 maxIdx)
|
|||||||
return ret;
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif /* !NO_PWDBASED || WOLFSSL_ASN_EXTRA */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_PWDBASED
|
||||||
#if !defined(WOLFSSL_ASN_TEMPLATE) || defined(HAVE_PKCS8) || \
|
#if !defined(WOLFSSL_ASN_TEMPLATE) || defined(HAVE_PKCS8) || \
|
||||||
defined(HAVE_PKCS12)
|
defined(HAVE_PKCS12)
|
||||||
/* Set small integer, 32 bits or less. DER encoding with no leading 0s
|
/* Set small integer, 32 bits or less. DER encoding with no leading 0s
|
||||||
|
Reference in New Issue
Block a user