Topic: Export public key to ecc_key structure

I have generated ECC key pair signed by CA with openssl tool in DER format.
I tried load public key to ecc_key structure but wc_EccPublicKeyDecode() returns ASN_OBJECT_ID_E.

Here is part of code:

// cert_der_ptr = 3082029C 30820243 A003020102 ...

int idx;
ecc_key pubk;

wc_ecc_init( &pubk );

idx = 0;
ret = wc_EccPublicKeyDecode( cert_der_ptr, &idx, &pubk, cert_der_size );
// here: ret == ASN_OBJECT_ID_E

// wc_EccPublicKeyDecode() expects two sequences and ObjectId but ObjectId is not on that possition:
// { GetSequence, GetSequence, SkipObjectId -> GetASNObjectId { b = 0xA0, b != ASN_OBJECT_ID -> return ASN_OBJECT_ID; } }

Here you can find decoded ASN.1 DER certificate:

https://lapo.it/asn1js/#3082029C3082024 … 90D63DBED7

Is it bug, unsupported DER format or something other wrong?

Share

Re: Export public key to ecc_key structure

Hi huba,

Could you include the openssl command used to generate the certificate so we can re-create a test-case on our end for confirmation?


Warm Regards,

Kaleb

3 (edited by huba 2017-07-17 23:39:30)

Re: Export public key to ecc_key structure

Hi Kaleb,

in attachement is part of script which generates ecc certificates [encrypted].
This script generates CA pk/cert, client private key, client signing request and sign signing request with CA.

1) Extract the archive to /tmp folder and run ./ecc.sh.
2) Fill password for CA, except FQN parameter you can enter default values (have to be unique), ..., and agree sign.
3) In /tmp folder you can find certificates in DER format.

Post's attachments

ecc.zip 1.85 kb, 8 downloads since 2017-07-18 

You don't have the permssions to download the attachments of this post.

Share

Re: Export public key to ecc_key structure

Hi huba,

Thank you for providing those details. Could you tell me which version of wolfSSL you are working with?

Also if possible could you share a brief overview of the project you are working on for qualifying purposes.


Thanks,

Kaleb

Re: Export public key to ecc_key structure

Hi Kaleb,

we upgraded WolfSSL from 3.6.8 to 3.11.0 few weeks ago.

Share

Re: Export public key to ecc_key structure

Hi huba,

Thank you for bringing me up to date on what wolfSSL version you are developing with.

Our records show that 2N purchased a Commercial License from wolfSSL July 31, 2011 and maintained Technical Support and Maintenance until the expiry of July 31 2012.

If you are using version 3.11.0 in your development for the  wolfSSL Commercial Licensed Application then 2N will need to enter into an active Support/Maintenance agreement to be able to deploy newer releases of wolfSSL and to receive formal Technical Support.

It is my understanding that our Business Director, Rod Weaver has reached out to the 2N team on multiple occasions but has not received a formal response on this topic.

Are you the new key contact at 2N?


Best Regards,

Kaleb

Re: Export public key to ecc_key structure

Hi Mr. WolfSSL,

I'm experiencing same issue using wolfSSL version 3.15.3.

Has been this issue already fix or not?

Thank you for help, Klemen

Share

8 (edited by Kaleb J. Himes 2018-10-19 14:59:29)

Re: Export public key to ecc_key structure

Hi kporenta,

In order to determine if this is the issue that you are truly experiencing, could you please share a test application that we are able to compile so we can reproduce the issue for testing purposes? Additionally, would you be able to share the openssl command you are using?

Thank you!

Share