On 22/11/10 23:48, Dr. Stephen Henson wrote:
On Mon, Nov 22, 2010, Neil Dugan wrote:

I have generated a rsa public and private key with.

openssl genrsa -out server.pem 2048
openssl rsa -in server.pem -pubout -out server.pub

When I use the PEM_read_RSAPublicKey() command to load that public key I
get the error "error:0906D06C:PEM routines:PEM_read_bio:no start line"

I don't understand this, there is clearly a line at the beginning of the
file "-----BEGIN PUBLIC KEY-----"



If you'd printed out the full error message including the additional
information it would have told you the precise start line it was expecting.

In this case your problem is that you are using the wrong function to load a
public key in that format: you should use PEM_read_RSA_PUBKEY() instead.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org


Thanks for your quick response.  It is working now.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to