Runtime error with SSL_CTX_use_PrivateKey_file function

2007-02-27 Thread Anita Kumar
Hi, I'm trying to use the encrypted private key for my test SSL server. I generated an encrypted private key cert_27.key using genrsa tool and I gave a paswd to it. I wrote a call back function as follows, which just stores my passwd into buf character buffer. static int password

Re: How to Verify Message Digest and its Signature with X.509 certificate

2007-02-27 Thread Dr. Stephen Henson
On Tue, Feb 27, 2007, Zhuang Yuyao wrote: > Victor Duchovni wrote: > >On Tue, Feb 27, 2007 at 09:52:38AM +0800, Zhuang Yuyao wrote: > > > >>I need to verify a message digest and its signature with a X.509 > >>certificate. As far as I known, the procedure may looks like this: > >>pubkey = X509_get

Re: Runtime error with SSL_CTX_use_PrivateKey_file function

2007-02-27 Thread Victor Duchovni
On Tue, Feb 27, 2007 at 01:49:13AM -0800, Anita Kumar wrote: > static int password_callback(char *buf, int size, int rwflag, void *userdata) > { > printf("*** Callback function called\n"); > strcpy(buf, "ibmdw"); > return 1; > } > > SSL_CTX_set_default_passwd_cb(ctx, &password_callback); >

Duplicate mail

2007-02-27 Thread Constantin
Is there any chance that someone down at openssl.org can sort out the duplicate sent mail?! I am getting duplicates on both openssl-dev and openssl-users lists. Please please please Many thanks Constantin

Re: Duplicate mail

2007-02-27 Thread Victor Duchovni
On Tue, Feb 27, 2007 at 02:34:10PM +0200, Constantin wrote: > Is there any chance that someone down at openssl.org can sort out the > duplicate sent mail?! I am getting duplicates on both openssl-dev and > openssl-users lists. The problem is almost certainly on your end. Look at the Received: hea

Multiple certs and private keys (RSA, DSA, ECDSA)

2007-02-27 Thread Victor Duchovni
Postfix sets up RSA and DSA certs by calling: /* RSA public and private keys */ SSL_CTX_use_certificate_chain_file(ctx, rsa_cert_file); SSL_CTX_use_PrivateKey_file(ctx, rsa_key_file, SSL_FILETYPE_PEM); /* DSA public and private keys */ SSL_CTX_use_certificate_chain_file(ctx,

RE: RSA-SHA1 Digest

2007-02-27 Thread WCR
Julius, I'm a bit slow and a newbie, but this looks to me like a 28 byte string not 20? Can you explain please. sXD2SsGQxI7DDFMwHwONxjGOaoI= also Goetz, > Doing digest and sign in two steps is very unusual. > Usually you process the digest and generate the signature > in one step. Unfortunat

Re: RSA-SHA1 Digest

2007-02-27 Thread Julius Davies
If you take the data inside here and base64 decode it, you end up with 20 bytes. sXD2SsGQxI7DDFMwHwONxjGOaoI= $ echo 'sXD2SsGQxI7DDFMwHwONxjGOaoI=' | openssl base64 -d | hexdump -C b1 70 f6 4a c1 90 c4 8e c3 0c 53 30 1f 03 8d c6 0010 31 8e 6a 82 The result is twenty bytes - yo

Re: RSA-SHA1 Digest

2007-02-27 Thread Goetz Babin-Ebell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello David, WCR wrote: > also Goetz, > >> Doing digest and sign in two steps is very unusual. >> Usually you process the digest and generate the signature >> in one step. > > Unfortunately, I think I do need both the digest and the signature to stu