[openssl-dev] [RFC v2 2/2] pem: load engine keys

Benjamin Kaduk bkaduk at akamai.com
Tue Dec 6 18:15:13 UTC 2016


On 12/06/2016 11:01 AM, James Bottomley wrote:
> The next problem is that this is slightly harder simply to insert into
> the PEM code.  The BIO parsing is done in PEM_bytes_read_bio() not
>  PEM_read_bio_PrivateKey().  The easy way to cope with this would be to
> move PEM parsing into the ENGINE_find_engine_load_key() function and
> then hand the name, header, blob to the engine.  The disadvantage of
> this is that we'll end up pulling the PEM apart twice: once in
> ENGINE_find_engine_load_key() and then again in PEM_bytes_read_bio(). 
>  Is this OK?  If it is I can code up a v3.  If not, I can think about
> how we might integrate this into PEM_bytes_read_bio().

FWIW, you may find the refactored version at
https://github.com/openssl/openssl/pull/1700 easier to reason about.  I
expect to have some time to update the pull request this week.

-Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20161206/658fcc22/attachment.html>


More information about the openssl-dev mailing list