forked from wolfSSL/wolfssl
update to asn compatibility
This commit is contained in:
@@ -46,3 +46,4 @@
|
|||||||
#endif /* CTAO_CRYPT_ASN_H */
|
#endif /* CTAO_CRYPT_ASN_H */
|
||||||
|
|
||||||
#endif /* !NO_ASN */
|
#endif /* !NO_ASN */
|
||||||
|
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
/* includes for their compatibility */
|
/* includes for their compatibility */
|
||||||
#include <cyassl/ctaocrypt/integer.h>
|
#include <cyassl/ctaocrypt/integer.h>
|
||||||
#include <cyassl/ctaocrypt/random.h>
|
#include <cyassl/ctaocrypt/random.h>
|
||||||
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
|
|
||||||
#define InitRsaKey wc_InitRsaKey
|
#define InitRsaKey wc_InitRsaKey
|
||||||
#define FreeRsaKey wc_FreeRsaKey
|
#define FreeRsaKey wc_FreeRsaKey
|
||||||
@@ -50,10 +51,6 @@
|
|||||||
#define RsaFreeCavium wc_RsaFreeCavium
|
#define RsaFreeCavium wc_RsaFreeCavium
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
|
|
||||||
#define RsaPublicKeyDecode wc_RsaPublicKeyDecode
|
|
||||||
#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
|
|
||||||
|
|
||||||
#endif /* CTAO_CRYPT_RSA_H */
|
#endif /* CTAO_CRYPT_RSA_H */
|
||||||
|
|
||||||
#endif /* NO_RSA */
|
#endif /* NO_RSA */
|
||||||
|
@@ -22,10 +22,17 @@
|
|||||||
#ifndef CTAO_CRYPT_SETTINGS_C_H
|
#ifndef CTAO_CRYPT_SETTINGS_C_H
|
||||||
#define CTAO_CRYPT_SETTINGS_C_H
|
#define CTAO_CRYPT_SETTINGS_C_H
|
||||||
|
|
||||||
/* asn.c compatibility */
|
|
||||||
#define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
|
/* since fips overrides rsa.h map compatibility here */
|
||||||
#define RsaPublicKeyDecode wc_RsaPublicKeyDecode
|
#if !defined(NO_RSA)
|
||||||
#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
|
#ifdef WOLFSSL_KEY_GEN
|
||||||
|
#define RsaKeyToDer wc_RsaKeyToDer
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
|
||||||
|
#define RsaPublicKeyDecode wc_RsaPublicKeyDecode
|
||||||
|
#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
|
||||||
|
#endif /* have rsa and HAVE_FIPS */
|
||||||
|
|
||||||
/* Macro redefinitions for compatibility */
|
/* Macro redefinitions for compatibility */
|
||||||
#if defined(WOLFSSL_SHA512) && !defined(CYASSL_SHA512)
|
#if defined(WOLFSSL_SHA512) && !defined(CYASSL_SHA512)
|
||||||
@@ -40,6 +47,9 @@
|
|||||||
#if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY)
|
#if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY)
|
||||||
#define NO_CYASSL_MEMORY
|
#define NO_CYASSL_MEMORY
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WOLFSSL_KEY_GEN
|
||||||
|
#define CYASSL_KEY_GEN
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* CTAO_CRYPT_SETTINGS_C_H */
|
#endif /* CTAO_CRYPT_SETTINGS_C_H */
|
||||||
|
|
||||||
|
@@ -100,12 +100,6 @@ int wc_RsaFlattenPublicKey(RsaKey* key, byte* a, word32* aSz, byte* b,
|
|||||||
{
|
{
|
||||||
return MakeRsaKey(key, size, e, rng);
|
return MakeRsaKey(key, size, e, rng);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
|
|
||||||
{
|
|
||||||
return RsaKeyToDer(key, output, inLen);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user