Hi sfefanoss1019,
If you want to import an ECC key in DER format into an ecc_key structure, you will want to use the following function. If you are importing an ECC generated by OpenSSL, you will want to compile wolfSSL with ECC_DECODE_EXTRA defined.
#include <wolfssl/wolfcrypt/asn_public.h>
int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key, word32 inSz);
If you instead want to import an ECC key into a WOLFSSL_CTX structure, for use in an SSL/TLS connection, you can use the following function. Again, you will need to compile wolfSSL with ECC_DECODE_EXTRA if loading an ECC key generated by OpenSSL:
#include <wolfssl/ssl.h>
int wolfSSL_CTX_use_PrivateKey_file(WOLFSSL_CTX* ctx, const char* file, int format);
The "format" parameter in the above function should be either SSL_FILETYPE_PEM if the key is PEM formatted or SSL_FILETYPE_ASN1 for a DER formatted key.
Best Regards,
Chris