Skip to content

Commit df138cc

Browse files
committed
Move new wolfSSL_ED* API's to openssl/ed*.h headers
1 parent 8b76230 commit df138cc

4 files changed

Lines changed: 22 additions & 14 deletions

File tree

wolfssl/openssl/ed25519.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ int wolfSSL_ED25519_verify(const unsigned char *msg, unsigned int msgSz,
4242
const unsigned char *pub, unsigned int pubSz,
4343
const unsigned char *sig, unsigned int sigSz);
4444

45+
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
46+
typedef struct ed25519_key ed25519_key;
47+
/* Not OpenSSL API's, but these two constructors are leveraged within
48+
* wolfSSL's compat layer for Ed25519 object creation/deletion simplicity */
49+
WOLFSSL_API
50+
ed25519_key* wolfSSL_ED25519_new(void* heap, int devId);
51+
52+
WOLFSSL_API
53+
void wolfSSL_ED25519_free(ed25519_key* key);
54+
#endif
55+
4556
#ifdef __cplusplus
4657
} /* extern "C" */
4758
#endif

wolfssl/openssl/ed448.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ int wolfSSL_ED448_verify(const unsigned char *msg, unsigned int msgSz,
4242
const unsigned char *pub, unsigned int pubSz,
4343
const unsigned char *sig, unsigned int sigSz);
4444

45+
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
46+
typedef struct ed448_key ed448_key;
47+
/* Not OpenSSL API's, but these two constructors are leveraged within
48+
* wolfSSL's compat layer for Ed448 object creation/deletion simplicity */
49+
WOLFSSL_API
50+
ed448_key* wolfSSL_ED448_new(void* heap, int devId);
51+
52+
WOLFSSL_API
53+
void wolfSSL_ED448_free(ed448_key* key);
54+
#endif
55+
4556
#ifdef __cplusplus
4657
} /* extern "C" */
4758
#endif

wolfssl/wolfcrypt/ed25519.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,6 @@ WOLFSSL_API
188188
int wc_ed25519_delete(ed25519_key* key, ed25519_key** key_p);
189189
#endif
190190

191-
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
192-
WOLFSSL_API
193-
ed25519_key* wolfSSL_ED25519_new(void* heap, int devId);
194-
WOLFSSL_API
195-
void wolfSSL_ED25519_free(ed25519_key* key);
196-
#endif
197-
198191
#ifdef HAVE_ED25519_KEY_IMPORT
199192
WOLFSSL_API
200193
int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);

wolfssl/wolfcrypt/ed448.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,6 @@ WOLFSSL_API
170170
int wc_ed448_delete(ed448_key* key, ed448_key** key_p);
171171
#endif
172172

173-
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
174-
WOLFSSL_API
175-
ed448_key* wolfSSL_ED448_new(void* heap, int devId);
176-
WOLFSSL_API
177-
void wolfSSL_ED448_free(ed448_key* key);
178-
#endif
179-
180173
#ifdef HAVE_ED448_KEY_IMPORT
181174
WOLFSSL_API
182175
int wc_ed448_import_public(const byte* in, word32 inLen, ed448_key* key);

0 commit comments

Comments
 (0)