Overview
Features
Download
Documentation
Community
Add-Ons & Services

request :RSAKeyImpl.h add a constructor using d2i_XXX

Please post support and help requests here.

request :RSAKeyImpl.h add a constructor using d2i_XXX

Postby sgsoft » 17 Jan 2013, 17:26

sometimes we should save RSA key in pure binary form (ie, no base64 or similar) in a char* variable and load/save the key from/to it. This way I have much more freedom: I'll be able to store the key directly into the application const char key[] { 0x01, 0x02, ... };, send it over a network socket, etc.

Use d2i_RSAPrivateKey to load directly from a buffer containing binary DER format:
const unsigned char *p = key;
RSA *r = d2i_RSAPrivateKey(NULL, &p, keylen)


This function work well,I think it can be add in RSAKeyImpl.h as a overload function.
sgsoft
 
Posts: 34
Joined: 03 Jul 2010, 12:26

Re: request :RSAKeyImpl.h add a constructor using d2i_XXX

Postby alex » 17 Jan 2013, 17:45

I can't guarantee this will be accepted but the fastest and most efficient way to get a contribution in is to clone GitHub repository and send us a pull request
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: request :RSAKeyImpl.h add a constructor using d2i_XXX

Postby sgsoft » 21 Jan 2013, 08:20

alex wrote:I can't guarantee this will be accepted but the fastest and most efficient way to get a contribution in is to clone GitHub repository and send us a pull request


OK,I will do that recently.
sgsoft
 
Posts: 34
Joined: 03 Jul 2010, 12:26


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests