Hey folks,

I am trying to get (export) a raw EC private key in the PKCS#8 format.

I am using the function i2d_PrivateKey (in i2d_pr.c).  The problem is that this 
code first checks to see if there is an old method (i.e. 
a->ameth->old_priv_encode) and if there is, it uses that method and returns.  
If there is not an old method, then it continues on and exports the key using 
the a->ameth->priv_encode method, which is PKCS#8.

1) I can't seem to find anyway (option or API) to make it so that there will 
not be an old method. (i.e. Is there some flag I can set or some API I can call 
to specify which method I want to be the default?)

2) It seems that this function has the priority wrong (i.e. bug).  It seems it 
should use the newer method first and fall back to the old method, rather than 
what it does now, which is use the old method first and only use the newer 
method if there is not an old method.


Thanks in advance for any help.

Carl Tietjen
NETIQ





Reply via email to