PEM_read_RSA_PUBKEY() PEM_read_RSAPublicKey()

2013-08-27 Thread Cyberman Wu
I've tried both to load public key from PEM file, but PEM_read_RSAPublicKey() failed. I can't get any information from manual, so I've googled a lot, and got that opnion: = You might try PEM_read_RSA_PUBKEY() instead

Re: PEM_read_RSA_PUBKEY() PEM_read_RSAPublicKey()

2013-08-27 Thread Dr. Stephen Henson
On Tue, Aug 27, 2013, Cyberman Wu wrote: I've tried both to load public key from PEM file, but PEM_read_RSAPublicKey() failed. It would help if you said what error you get or posted the file. See also: http://www.openssl.org/support/faq.html#PROG6 I can't get any information from manual

RE: PEM_read_RSA_PUBKEY() PEM_read_RSAPublicKey()

2013-08-27 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Dr. Stephen Henson Sent: Tuesday, 27 August, 2013 08:10 Adding a little: On Tue, Aug 27, 2013, Cyberman Wu wrote: I've tried both to load public key from PEM file, but PEM_read_RSAPublicKey() failed. It would help if you said what

Re: R: PEM_read_RSAPublicKey problem

2008-07-01 Thread Kenneth Goldman
Perhaps the problem is that you're reading the public key and trying to sign. Signing uses a private key. Try: PEM_read_RSAPrivateKey() RSA_sign() [EMAIL PROTECTED] wrote on 06/27/2008 11:31:42 AM: Excuse me, I'm trying, using C, to do a simple sign and verify with RSA public and private

R: R: PEM_read_RSAPublicKey problem

2008-07-01 Thread Marco Sommella
No no i do it correct. PEM_read_RSAPrivateKey() RSA_sign() For sign and: PEM_read_RSAPublicKey() RSA_verify() For verify -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Kenneth Goldman Inviato: lunedì 30 giugno 2008 14.58 A: openssl-users@openssl.org

R: PEM_read_RSAPublicKey problem

2008-06-27 Thread Marco Sommella
2008 5.41 A: openssl-users@openssl.org Oggetto: RE: PEM_read_RSAPublicKey problem hi again, i created a publickey.pem with command: openssl rsa -in myprivate.pem -pubout -out publickey.pem then in C i try to read this public key with: RSA *pubkey = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL

PEM_read_RSAPublicKey problem

2008-06-26 Thread Marco Sommella
hi again, i created a publickey.pem with command: openssl rsa -in myprivate.pem -pubout -out publickey.pem then in C i try to read this public key with: RSA *pubkey = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL) where fp is the opened publickey.pem file. but it's return this error: error

RE: PEM_read_RSAPublicKey problem

2008-06-26 Thread David Schwartz
hi again, i created a publickey.pem with command: openssl rsa -in myprivate.pem -pubout -out publickey.pem then in C i try to read this public key with: RSA *pubkey = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL) where fp is the opened publickey.pem file. but it's return this error: error

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-13 Thread Th�nh Trung Nguy#7877;n
Hi shankar, Thanks you for your answer ! You said we can not get public key from a private key . Then you said So PEM_read_RSAPublicKey() or PEM_read_RSA_PUBKEY() can be used to load public key from a private key I'm being confused. Did you mean we those 2 functions can not be use to load

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-13 Thread Dr. Stephen Henson
On Sat, Apr 12, 2008, Thnh Trung Nguy#7877;n wrote: Hi ! I used PEM_write_RSAPrivateKey() to write private key to a pem file. Then I used PEM_read_RSAPublicKey() to read public key from that file, but it returned an error. The ERR_error_string() only return message like : error

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-13 Thread Th�nh Trung Nguy#7877;n
Thanks ! I forgot the FAQ, sorry ! Dr. Stephen Henson [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008, Thnh Trung Nguyễn wrote: Hi ! I used PEM_write_RSAPrivateKey() to write private key to a pem file. Then I used PEM_read_RSAPublicKey() to read public key from that file, but it returned

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-13 Thread Marek . Marcola
Hello, One thing I will conform you is we can not get public key from a private key . I do not remember where i studied , but it is true. So do not try to get a public key from private key. This is not true. Best regards, -- Marek Marcola [EMAIL PROTECTED]

Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-12 Thread Th�nh Trung Nguy#7877;n
Hi ! I used PEM_write_RSAPrivateKey() to write private key to a pem file. Then I used PEM_read_RSAPublicKey() to read public key from that file, but it returned an error. The ERR_error_string() only return message like : error:0906D06C:lib(9):func(109):reason(108) So can any one tell me can

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-12 Thread shankar ks
] wrote: Hi ! I used PEM_write_RSAPrivateKey() to write private key to a pem file. Then I used PEM_read_RSAPublicKey() to read public key from that file, but it returned an error. The ERR_error_string() only return message like : error:0906D06C:lib(9):func(109):reason(108) So can any

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-12 Thread Th�nh Trung Nguy#7877;n
Thank you for fast response ! But it's ok if I use PEM_read_RSAPublicKey() to load public key from file save by using PEM_write_RSAPublicKey(). And even publickey extract by openssl command doesn't have any line as BEGIN RSA CERTIFICATE. It just has line as BEGIN RSA PUBLIC KEY. I've tried

Re: Can PEM_read_RSAPublicKey() load public key from private key ?

2008-04-12 Thread shankar ks
PEM_read_RSAPublicKey() or PEM_read_RSA_PUBKEY() can be used to load public key from a private key The main concept (and also the general concept )in my program ( or any other programs )is we have to load public key from the certificate only . In the certificte if the public key does not have

PEM_read_RSAPublicKey

2001-12-26 Thread Ricardo Guerra
about what does this happen? i'm using rh linux 6.2 with openssl 0.9.6b 9 int FOROLicense::LoadPublicKey (char *name) { FILE *file; if ((file=fopen(name, rb))== NULL) return 0; pubKey=*PEM_read_RSAPublicKey(file, NULL, NULL, NULL); fclose (file); loadedPub=1

Re: PEM_read_RSAPublicKey

2001-12-26 Thread Dr S N Henson
pub.key does anyone have any idea about what does this happen? i'm using rh linux 6.2 with openssl 0.9.6b 9 int FOROLicense::LoadPublicKey (char *name) { FILE *file; if ((file=fopen(name, rb))== NULL) return 0; pubKey=*PEM_read_RSAPublicKey(file, NULL, NULL, NULL

Re: PEM_read_RSAPublicKey

2001-12-26 Thread Ricardo Guerra
| openssl rsa -pubout pub.key does anyone have any idea about what does this happen? i'm using rh linux 6.2 with openssl 0.9.6b 9 int FOROLicense::LoadPublicKey (char *name) { FILE *file; if ((file=fopen(name, rb))== NULL) return 0; pubKey=*PEM_read_RSAPublicKey

RE: PEM_read_RSAPublicKey

2001-11-16 Thread Hylton Tregenza
]Subject: PEM_read_RSAPublicKey Hi I am trying to read a public key from a certificate file in PEM format. My code looks as follows. I constanty get null as a result from the call to PEM_read_RSAPublicKey #include openssl/ssl.h #include openssl/x509.h #include openssl/rsa.h #include

Re: PEM_read_RSAPublicKey

2001-11-16 Thread Takaaki Ishii
Hylton Tregenza wrote: Sorry, I asked to early, There is nothing wrong with the code. The file is not a public key file (or the format isd wrong) How do I extract a public key file from a certificate? by command line: $ openssl x509 -in cert.pem -pubkey -noout by writing some code:

Re: PEM_read_RSAPublicKey

2001-11-16 Thread Juan Segarra
On Fri, 16 Nov 2001, Takaaki Ishii wrote: Hylton Tregenza wrote: Sorry, I asked to early, There is nothing wrong with the code. The file is not a public key file (or the format isd wrong) How do I extract a public key file from a certificate? How about to use X509_get_pubkey

pem_read_rsapublickey question

2001-10-01 Thread d p chang
in the public key w/ pem_read_rsapublickey I get a pem_read_bio:'no start line' error. The public key file only has (-BEGIN PUBLIC KEY-) while the private key file has (-BEGIN RSA PRIVATE KEY-). Checking the source, the 'workaround' seems obvious... However, when I hand edit the public

pem_read_rsapublickey question

2001-10-01 Thread d p chang
rsa -in priv.pem -pubout -out pub.pem However, when trying to read in the public key w/ pem_read_rsapublickey I get a pem_read_bio:'no start line' error. The public key file only has (-BEGIN PUBLIC KEY-) while the private key file has (-BEGIN RSA PRIVATE KEY-). Checking the source

Re: pem_read_rsapublickey question

2001-10-01 Thread Dr S N Henson
-in priv.pem -pubout -out pub.pem However, when trying to read in the public key w/ pem_read_rsapublickey I get a pem_read_bio:'no start line' error. The public key file only has (-BEGIN PUBLIC KEY-) while the private key file has (-BEGIN RSA PRIVATE KEY-). Checking the source