[openssl-users] Win32 - PEM_read_PrivateKey crash

2016-02-11 Thread Lloyd
Hi, I have downloaded prebuilt version of openssl for windows. I am running on Windows 7 64bit, Using Visual Studio 2010, generating 32bit binary. When I run a simple application which calling "PEM_read_PrivateKey" it crashes with error "OPENSSL_Uplink(505D6000,08): no OPENSSL

Re: [openssl-users] Win32 - PEM_read_PrivateKey crash

2016-02-11 Thread Lloyd
tudio 2010, generating 32bit binary. > > When I run a simple application which calling "PEM_read_PrivateKey" it > crashes with error "OPENSSL_Uplink(505D6000,08): no OPENSSL_Applink" > > What could be the reason for this? Any hint is greatly appreciated. &g

RE: PEM_read_PrivateKey using ECDSA PEMS

2013-02-04 Thread Dave Thompson
(*ecdsapriv.pem*, rb); */*marked*/* pevpkey= PEM_read_PrivateKey(fp, pevpkey, NULL, NULL); peckey= EVP_PKEY_get1_EC_KEY(pevpkey); EC_KEY_set_group(peckey,EC_GROUP_new_by_curve_name( NID_secp224r1) ); This isn't needed, an ECC key read from a PEM file already has the correct group

Re: PEM_read_PrivateKey using ECDSA PEMS

2013-02-04 Thread redpath
First of all let me correct this I am using ECDSA to create and verify a signature for a document. I apparently cannot use the ecdsa.PEM *directory* and so here is my question. to this I am using ECDSA to create and verify a signature for a document. I apparently cannot use the ecdsa.PEM

PEM_read_PrivateKey using ECDSA PEMS

2013-02-01 Thread redpath
(*mydocument*,len); //orignal document result=sha256((char *)m,len); fp =fopen(*ecdsapriv.pem*, rb); */*marked*/* pevpkey= PEM_read_PrivateKey(fp, pevpkey, NULL, NULL); peckey= EVP_PKEY_get1_EC_KEY(pevpkey); EC_KEY_set_group(peckey,EC_GROUP_new_by_curve_name( NID_secp224r1

RE: RE: PEM_read_PrivateKey

2012-10-31 Thread Leonardo Laface de Almeida
Solved! Thanks, Steve. Leonardo -Mensagem original- De: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] Em nome de Dr. Stephen Henson Enviada em: terça-feira, 30 de outubro de 2012 20:04 Para: openssl-users@openssl.org Assunto: Re: RES: PEM_read_PrivateKey

Re: PEM_read_PrivateKey

2012-10-30 Thread Gerardo Ganis
PEM_read_PrivateKey EVP_PKEY *evpp = PEM_read_PrivateKey(fk, 0, 0, 0); the full key is filled in, i.e. evpp points to a complete (public+private) key? By analyzing the structure after the call it looks so, but since it is not documented, I was wondering whether it is something

RES: PEM_read_PrivateKey

2012-10-30 Thread Leonardo Laface de Almeida
[mailto:owner-openssl-us...@openssl.org] Em nome de Dave Thompson Enviada em: segunda-feira, 29 de outubro de 2012 19:25 Para: openssl-users@openssl.org Assunto: RE: PEM_read_PrivateKey From: owner-openssl-us...@openssl.org On Behalf Of Leonardo Laface de Almeida Sent: Monday, 29 October, 2012 16:20

RES: PEM_read_PrivateKey

2012-10-30 Thread Leonardo Laface de Almeida
Hi, The code for my project example is attached. The error code is as well. The error remains. For generating Key, the callback is called. For getting Private Key, the callback is not called. What's wrong here? I really appreciate any help. Thanks. Leonardo attachment:

Re: RES: PEM_read_PrivateKey

2012-10-30 Thread Dr. Stephen Henson
On Tue, Oct 30, 2012, Leonardo Laface de Almeida wrote: Hi, The code for my project example is attached. The error code is as well. The error remains. For generating Key, the callback is called. For getting Private Key, the callback is not called. What's wrong here? I really

PEM_read_PrivateKey

2012-10-29 Thread Gerardo Ganis
Dear OpenSSL Users, Could someone confirm that when loading private keys in memory using PEM_read_PrivateKey EVP_PKEY *evpp = PEM_read_PrivateKey(fk, 0, 0, 0); the full key is filled in, i.e. evpp points to a complete (public+private) key? By analyzing the structure

Re: PEM_read_PrivateKey

2012-10-29 Thread Dr. Stephen Henson
On Mon, Oct 29, 2012, Gerardo Ganis wrote: Dear OpenSSL Users, Could someone confirm that when loading private keys in memory using PEM_read_PrivateKey EVP_PKEY *evpp = PEM_read_PrivateKey(fk, 0, 0, 0); the full key is filled in, i.e. evpp points to a complete

RES: PEM_read_PrivateKey

2012-10-29 Thread Leonardo Laface de Almeida
@Gerardo, I'm having a problem with this function and I will use your thread for some support. @All The problem I've got is quite simple. The callback I pass throught this function is not called. I inserted a breakpoint into cb and it's not called at all. I'm using OpenSSL 1.0.1c. I'm sure

RE: PEM_read_PrivateKey

2012-10-29 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Leonardo Laface de Almeida Sent: Monday, 29 October, 2012 16:20 The problem I've got is quite simple. The callback I pass throught this function is not called. snip Someone could please help me figure out why? I've wrote as OpenSSL page

Calls to PEM_read_PrivateKey fail after incorrect password

2008-11-12 Thread Aubrey Eddleson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greetings! I'm working on a proof-of-concept SSH key cracker: my code reads in password guesses from standard input and for each guess, calls PEM_read_PrivateKey. If that returns a valid pointer, that indicates that the password was correct. (I

Re: Calls to PEM_read_PrivateKey fail after incorrect password

2008-11-12 Thread Victor Duchovni
On Wed, Nov 12, 2008 at 02:03:59PM -0500, Aubrey Eddleson wrote: Greetings! I'm working on a proof-of-concept SSH key cracker: my code reads in password guesses from standard input and for each guess, calls PEM_read_PrivateKey. If that returns a valid pointer, that indicates

Re: Calls to PEM_read_PrivateKey fail after incorrect password

2008-11-12 Thread Aubrey Eddleson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rewind the key file? But how? I didn't open it; I'm just passing its name to PEM_read_PrivateKey. Am I totally missing something really obvious here? On Wed, Nov 12, 2008 at 02:12:03PM -0500, Victor Duchovni wrote: Rewinding the input file might

Re: Calls to PEM_read_PrivateKey fail after incorrect password

2008-11-12 Thread Victor Duchovni
On Wed, Nov 12, 2008 at 02:26:49PM -0500, Aubrey Eddleson wrote: Rewind the key file? But how? I didn't open it; I'm just passing its name to PEM_read_PrivateKey. Am I totally missing something really obvious here? EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x

Re: Calls to PEM_read_PrivateKey fail after incorrect password

2008-11-12 Thread Aubrey Eddleson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oh jeez, I am! What was I *thinking*?! Wow do I feel *extra* goofy! Heh. Obviously, that fixed it. Thanks much! - Aubrey On Wed, Nov 12, 2008 at 02:55:16PM -0500, Victor Duchovni wrote: No, you are passing an open file handle. -BEGIN PGP

PEM_read_PrivateKey does not return private key

2007-10-17 Thread Shalmi
Hi, I searched for this function on net and got lot of threads, but couldn't solve my problem. My problem is as follows.. I have generated a RSA key using OenSSL and stored it in a PEM file. When i try to read it using above function , the structure returned to me by PEM_read_PrivateKey is NULL

Re: PEM_read_PrivateKey does not return private key

2007-10-17 Thread PS
Hi, I have a private CA certificate created using openssl command line. The issue is that the certificate expires on 19th Oct, 2007. The question is that Is it possible to extend the expiry of this certificate without changing any other fields in the certificate? Basically, I want to continue

Re: PEM_read_PrivateKey does not return private key

2007-10-17 Thread Jim Fox
I have a private CA certificate created using openssl command line. The issue is that the certificate expires on 19th Oct, 2007. The question is that Is it possible to extend the expiry of this certificate without changing any other fields in the certificate? Basically, I want to continue using

Re: PEM_read_PrivateKey does not return private key

2007-10-17 Thread Victor Duchovni
On Wed, Oct 17, 2007 at 12:43:03PM -0700, Jim Fox wrote: I have a private CA certificate created using openssl command line. The issue is that the certificate expires on 19th Oct, 2007. The question is that Is it possible to extend the expiry of this certificate without changing any other

Re: i am confused in PEM_read_PrivateKey

2006-06-14 Thread 孙 金龙
PEM_read_PrivateKey call PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u) { if (!PEM_bytes_read_bio(data, len, nm, PEM_STRING_EVP_PKEY, bp, cb, u)) return NULL; p = data; if (strcmp(nm,PEM_STRING_RSA) == 0) ret

Re: i am confused in PEM_read_PrivateKey

2006-06-14 Thread Nils Larsch
EVP_PKEY *prikey; FILE *keyfp; if (!(prikey = PEM_read_PrivateKey(keyfp, NULL, NULL, NULL))) return 0; return 1; it always return 0,by the way the my ec curve is not in openssl ec curve list. the above ec private key specifies uses an OID to specify the ec group used but if openssl

i am confused in PEM_read_PrivateKey

2006-06-13 Thread 孙 金龙
when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. first i find in #define PEM_read_PrivateKey(fp,x,cb,u) (EVP_PKEY *)PEM_ASN1_read( \ (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,fp,(char **)x,cb,u) next i find in void

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Girish Venkatachalam
bcoz d2i resolves to d2i_X509() , not to d2i_PrivateKey --- �� ���� [EMAIL PROTECTED] wrote: when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. first i find in #define PEM_read_PrivateKey(fp,x,cb,u) (EVP_PKEY

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Rajeshwar Singh Jenwar
how come ? plz explain. On 6/13/06, Girish Venkatachalam [EMAIL PROTECTED] wrote: bcoz d2i resolves to d2i_X509() , not tod2i_PrivateKey--- �� [EMAIL PROTECTED] wrote: when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. first i find

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Girish Venkatachalam
] wrote: how come ? plz explain. On 6/13/06, Girish Venkatachalam [EMAIL PROTECTED] wrote: bcoz d2i resolves to d2i_X509() , not to d2i_PrivateKey --- �� ���� [EMAIL PROTECTED] wrote: when i use PEM_read_PrivateKey find it work error ,so i look

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Mikhail Kruk
] wrote: when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. first i find in #define PEM_read_PrivateKey(fp,x,cb,u) (EVP_PKEY *)PEM_ASN1_read( \ (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,fp

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Dr. Stephen Henson
On Tue, Jun 13, 2006, ?? wrote: when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. first i find in #define PEM_read_PrivateKey(fp,x,cb,u) (EVP_PKEY *)PEM_ASN1_read( \ (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,fp

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Dr. Stephen Henson
On Tue, Jun 13, 2006, ?? wrote: when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. Printing out the error code in human readable form might help more (see FAQ) assuming you haven't done that already. Steve. -- Dr Stephen N. Henson

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread 孙 金龙
*keyfp; if (!(prikey = PEM_read_PrivateKey(keyfp, NULL, NULL, NULL))) return 0; return 1; it always return 0,by the way the my ec curve is not in openssl ec curve list. From: Dr. Stephen Henson [EMAIL PROTECTED] Reply-To: openssl-users@openssl.org To: openssl-users

Re: i am confused in PEM_read_PrivateKey

2006-06-13 Thread Rajeshwar Singh Jenwar
--- �� [EMAIL PROTECTED] wrote:when i use PEM_read_PrivateKey find it work error ,so i look into PEM_read_PrivateKey to find the reason. first i find in #define PEM_read_PrivateKey(fp,x,cb,u) (EVP_PKEY *)PEM_ASN1_read( \ (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,fp,(char

PEM_read_PrivateKey() wont work on Windows (visual)

2002-04-26 Thread Roberto Rodrigues - McLean
hi, I basically copied the code from sign.c, I call it like this: PEM_read_PrivateKey(fp, NULL, pass_cb, password); it crashes complaining about memory access. Has anyone make it work on Windows ? Is there any other way of loading a Private Key from a file (into a EVP obj) ? Thank you

RE: PEM_read_PrivateKey() wont work on Windows (visual)

2002-04-26 Thread Marc-André Levesque
( bio, NULL, NULL, password ); Note that I am not providing a password callback and that I am using the bio version of the PEM_read_PrivateKey. I hope it helps. Marc-Andre -Original Message- From: Roberto Rodrigues - McLean [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 4:55 PM

Reading encrypted RSA key with PEM_read_PrivateKey

2002-04-04 Thread Jari Lappalainen
Hello When I make an RSA key with openssl genrsa -out key.pem 1024 I can read it fine with FILE* fp = ...; EVP_PKEY* pkey; pkey = PEM_read_PrivateKey(fp, 0, 0, 0); and use pkey to sign data. If I try the same with DES3 encryption openssl

About PEM_read_privatekey, PEM_read_X509, etc Problem

2001-10-11 Thread ???
Title: Message This document is in INSTALL.W32. If you don't use the multithreaded DLL runtime library (/MD option) yourprogram will almost certainly crash because malloc gets confused -- theOpenSSL DLLs are statically linked to one version, the application mustnot use a different

Re: About PEM_read_privatekey, PEM_read_X509, etc Problem

2001-10-11 Thread ???
Title: Message This document is in INSTALL.W32. If you don't use the multithreaded DLL runtime library (/MD option) yourprogram will almost certainly crash because malloc gets confused -- theOpenSSL DLLs are statically linked to one version, the application mustnot use a different

PEM_read_privatekey

2001-09-30 Thread Andrew Finnell
Title: Message I'm having some difficulty using PEM_read_privatekey. When I link my application with the debug dll ms runtime PEM_read_privateKey works, but if I link against the release dll ms runtime then PEM_read_PrivateKey exceptions out.. Anyone have a clue why

PEM_read_PrivateKey - Memory to Memory

2001-03-01 Thread Kenneth R. Robinette
Is there some magic function within OpenSSL where the contents of a private RSA/DSA file can be passed via memory to the equivalent of the PEM_read_PrivateKey function? Ken __ Support InterSoft International, Inc. Voice: 888-823-1541