@@ -230,6 +230,14 @@ typedef struct wc_CryptoInfo {
230230 word32 pubKeySz ;
231231 } ecc_check ;
232232 #endif
233+ struct {
234+ const ecc_key * key ;
235+ int * keySize ;
236+ } ecc_get_size ;
237+ struct {
238+ const ecc_key * key ;
239+ int * sigSize ;
240+ } ecc_get_sig_size ;
233241 #endif /* HAVE_ECC */
234242 #ifdef HAVE_CURVE25519
235243 struct {
@@ -515,6 +523,13 @@ typedef struct wc_CryptoInfo {
515523 int flags ; /* AES: direction (AES_ENCRYPTION/DECRYPTION) */
516524 } setkey ;
517525#endif /* WOLF_CRYPTO_CB_SETKEY */
526+ #ifdef WOLF_CRYPTO_CB_EXPORT_KEY
527+ struct { /* uses wc_AlgoType=WC_ALGO_TYPE_EXPORT_KEY */
528+ int type ; /* enum wc_PkType (WC_PK_TYPE_RSA, etc.) */
529+ void * obj ; /* Hardware key (has devCtx/id[]) */
530+ void * out ; /* Software key to fill (same type as obj) */
531+ } export_key ;
532+ #endif /* WOLF_CRYPTO_CB_EXPORT_KEY */
518533#if defined(HAVE_HKDF ) || defined(HAVE_CMAC_KDF )
519534 struct {
520535 int type ; /* enum wc_KdfType */
@@ -615,6 +630,9 @@ WOLFSSL_LOCAL int wc_CryptoCb_EccVerify(const byte* sig, word32 siglen,
615630
616631WOLFSSL_LOCAL int wc_CryptoCb_EccCheckPrivKey (ecc_key * key , const byte * pubKey ,
617632 word32 pubKeySz );
633+
634+ WOLFSSL_LOCAL int wc_CryptoCb_EccGetSize (const ecc_key * key , int * keySize );
635+ WOLFSSL_LOCAL int wc_CryptoCb_EccGetSigSize (const ecc_key * key , int * sigSize );
618636#endif /* HAVE_ECC */
619637
620638#ifdef HAVE_CURVE25519
@@ -801,6 +819,10 @@ WOLFSSL_LOCAL int wc_CryptoCb_SetKey(int devId, int type, void* obj,
801819 void * aux , word32 auxSz ,
802820 int flags );
803821#endif /* WOLF_CRYPTO_CB_SETKEY */
822+ #ifdef WOLF_CRYPTO_CB_EXPORT_KEY
823+ WOLFSSL_LOCAL int wc_CryptoCb_ExportKey (int devId , int type ,
824+ void * obj , void * out );
825+ #endif /* WOLF_CRYPTO_CB_EXPORT_KEY */
804826
805827#endif /* WOLF_CRYPTO_CB */
806828
0 commit comments