Re: BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread Dr. Stephen Henson
On Fri, Mar 25, 2011, Michal Stawinski wrote: > Hi Steve, > On 25 March 2011 23:06, Dr. Stephen Henson wrote: > > Have you tried clearing the close flag on the BIO with something like: > > > > BIO_set_close(bio, 0) > No, I haven't tried it yet, but it seems this is what I've been > looking for- c

Re: Examples to encrypt/decrypt

2011-03-25 Thread Anthony Gabrielson
On Mar 25, 2011, at 4:45 PM, Jeffrey Walton wrote: > On Fri, Mar 25, 2011 at 3:56 PM, Anthony Gabrielson > wrote: >> This will do what you want: >> http://agabrielson.wordpress.com/2010/07/15/openssl-an-example-from-the-command-line/ > >memset(plaintext,0,sizeof(plaintext)); > > The optimiz

RE: Examples to encrypt/decrypt

2011-03-25 Thread Jeremy Farrell
> From: David Schwartz [mailto:dav...@webmaster.com] > Sent: Friday, March 25, 2011 11:44 PM > > On 3/25/2011 4:17 PM, Jeremy Farrell wrote: > > >> From: Jeffrey Walton > >> Sent: Friday, March 25, 2011 8:45 PM > >> On Fri, Mar 25, 2011 at 3:56 PM, Anthony > Gabrielson wrote: > > >>> This wil

Re: Examples to encrypt/decrypt

2011-03-25 Thread David Schwartz
On 3/25/2011 4:17 PM, Jeremy Farrell wrote: From: Jeffrey Walton Sent: Friday, March 25, 2011 8:45 PM On Fri, Mar 25, 2011 at 3:56 PM, Anthony Gabrielson wrote: This will do what you want: http://agabrielson.wordpress.com/2010/07/15/openssl-an-example-from-the-command-line/ memset(p

RE: Examples to encrypt/decrypt

2011-03-25 Thread Jeremy Farrell
> From: Jeffrey Walton > Sent: Friday, March 25, 2011 8:45 PM > On Fri, Mar 25, 2011 at 3:56 PM, Anthony Gabrielson > wrote: > > This will do what you want: > > > > http://agabrielson.wordpress.com/2010/07/15/openssl-an-example-from-the-command-line/ > > memset(plaintext,0,sizeof(plaintext)

Re: BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread Michal Stawinski
Hi Steve, On 25 March 2011 23:06, Dr. Stephen Henson wrote: > Have you tried clearing the close flag on the BIO with something like: > > BIO_set_close(bio, 0) No, I haven't tried it yet, but it seems this is what I've been looking for- clean & neat. I'd stumlbed over this one some time ago. When

Re: BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread Dr. Stephen Henson
On Fri, Mar 25, 2011, Micha? Stawi?ski wrote: > Hi there, > Only recently I started playing with openssl, and It seems I am > encountering a memory leak when setting up a simple server using > fork(). Initially I've been suspecting some problems with SSL, but > lately I've been able to limit it to

RE: Installing a .cer file in IE

2011-03-25 Thread Dave Thompson
_ From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Jaquez Jr, Hector L. Sent: Friday, 25 March, 2011 12:04 To: openssl-users@openssl.org Subject: RE: Installing a .cer file in IE I have created the PKCS12 file and imported the file via IE.

RE: openssl s_client linux vs windows

2011-03-25 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Doug Nebeker > Sent: Friday, 25 March, 2011 10:24 > I'm sorry if this is common knowledge - I haven't been able to find an answer. > I have a simple HTTPS server built with OpenSSL. When I run: > openssl s_client

Re: BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread David Schwartz
On 3/25/2011 2:33 PM, Michal Stawinski wrote: 2011/3/25 David Schwartz: I don't know of any elegant solution. But there's a way that works. Open a file descriptor or socket you don't care about (for example, open /dev/null). Then 'dup2' that file descriptor over the file descriptor fo

Re: BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread Michal Stawinski
2011/3/25 David Schwartz : >> //freeing popped client BIO in parent would disconnect client in child, >> //so I can not free it, which will cause 64B memory leak >> //parent:   BIO_free ( b=client_bio ) : 1   //??? > >        I don't know of any elegant solution. But there's a way that works. > Ope

Re: BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread David Schwartz
On 3/25/2011 3:50 AM, Michał Stawiński wrote: //freeing popped client BIO in parent would disconnect client in child, //so I can not free it, which will cause 64B memory leak //parent: BIO_free ( b=client_bio ) : 1 //??? I don't know of any elegant solution. But there's a way that works.

Windows X509_NAME macro issue again

2011-03-25 Thread Wempa, Kristofer
When attempting to build pyOpenSSL on Windows 7 for a 64-bit Python, I ran into the compilation errors shown below. c:\VS9\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IK:\Toolchains\Windows7\X64\sig1\Python-2.6.6\include -IK:\Toolchains\Windows7\X64\sig1\Python-2.6.6\PC - IK:\Too

Re: Examples to encrypt/decrypt

2011-03-25 Thread Jeffrey Walton
On Fri, Mar 25, 2011 at 3:56 PM, Anthony Gabrielson wrote: > This will do what you want: > http://agabrielson.wordpress.com/2010/07/15/openssl-an-example-from-the-command-line/ memset(plaintext,0,sizeof(plaintext)); The optimizer might remove your zeroization. Jeff > > - Original Messa

Re: Examples to encrypt/decrypt

2011-03-25 Thread Anthony Gabrielson
This will do what you want: http://agabrielson.wordpress.com/2010/07/15/openssl-an-example-from-the-command-line/ - Original Message - From: "Venkateswara Rao Chikkireddi (HSSL-Bangalore)" To: openssl-users@openssl.org Sent: Friday, March 25, 2011 12:41:36 PM Subject: Examples to e

Examples to encrypt/decrypt

2011-03-25 Thread Chikkireddi, Venkateswara Rao (HSSL-Bangalore)
Hi Could you please provide examples to encrypt/decrypt 256 char length of data using AES256 algorithm Thanks and Regards C V Rao

RE: Installing a .cer file in IE

2011-03-25 Thread Jaquez Jr, Hector L.
I have created the PKCS12 file and imported the file via IE. The issue still occurs. What is the openssl command to import the cert into IE? If I look in IE certificates I see the new cert. However, now I am not sure if the application is not seeing the new cert or if it is still IE with the i

Re: (DH) how to send dh->pub_key to peer

2011-03-25 Thread Frank Morgner
On Friday, March 25 at 12:46PM, ikuzar wrote: > Do you mean something like that: > > DH* dh; > dh = DH_new(); > > RAND_bytes(random_bytes, 256/8); > dh->priv_key = BN_bin2bn(random_bytes, 256/8, NULL); > DH_generate_key(dh); > > In this way, is dh->pub_key serialized ? No. Please get familiar w

openssl s_client linux vs windows

2011-03-25 Thread Doug Nebeker
I'm sorry if this is common knowledge - I haven't been able to find an answer. I have a simple HTTPS server built with OpenSSL. When I run: openssl s_client -connect 192.168.10.22:81 from my Linux box (0.9.8o), I get the dreaded SSL3_READ_BYTES handshake failure. If I run the exact same c

Re: (DH) how to send dh->pub_key to peer

2011-03-25 Thread ikuzar
Do you mean something like that: DH* dh; dh = DH_new(); RAND_bytes(random_bytes, 256/8); dh->priv_key = BN_bin2bn(random_bytes, 256/8, NULL); DH_generate_key(dh); In this way, is dh->pub_key serialized ? 2011/3/25 Frank Morgner > > Hi! > > > How to serialized dh->pub_key ? I know that i2d_DHp

Re: (DH) how to send dh->pub_key to peer

2011-03-25 Thread Frank Morgner
Hi! > How to serialized dh->pub_key ? I know that i2d_DHparams(const_dh, &dhbuf); > serialize dh structure pointed by const_dh but I did not find a function to > serialize just dh->pub_key Use BN_bin2bn. Greets, Frank. pgp4g55TCrPOo.pgp Description: PGP signature

BIO_do_accept() + fork() is leaking 64B?

2011-03-25 Thread Michał Stawiński
Hi there, Only recently I started playing with openssl, and It seems I am encountering a memory leak when setting up a simple server using fork(). Initially I've been suspecting some problems with SSL, but lately I've been able to limit it to VERY simple use-case. It is embarassing, but I can not

Re: (DH) how to send dh->pub_key to peer

2011-03-25 Thread ikuzar
This book seems to be interesting, but I am student and I have to save money... Yes I know that DH is subject to a MITM attack. I make DH key exchange in a secure channel with authenticated peer. How to serialized dh->pub_key ? I know that i2d_DHparams(const_dh, &dhbuf); serialize dh structure poi