Re: PEM Encryption with genrsa and EVP_KeyToBytes

2014-07-15 Thread Jeffrey Walton
> I'm having trouble duplicating the decryption in Crypto++. I suspect > the problem is with the Key and IV dervied in EVP_KeyToBytes. Found it... I was overwriting the existing IV with the IV produced in EVP_KeyToBytes. For those interested, the call of interest is in PEM_ASN1_write_bio (from pem

PEM Encryption with genrsa and EVP_KeyToBytes

2014-07-15 Thread Jeffrey Walton
I have an encrypted private key in PEM format created with `openssl genrsa -aes128 -out key.pem` (using a password of 'test' when prompted). According to http://www.openssl.org/docs/crypto/pem.html (under PEM ENCRYPTION FORMAT): The encryption key is determined using EVP_bytestokey(), u

RE: Compile error on Tandem

2014-07-15 Thread Scott Neugroschl
Wayne, there's a Tandem port on ITUGLIB. From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Johnson, Wayne Sent: Monday, July 14, 2014 8:11 AM To: 'openssl-users@openssl.org' Subject: Compile error on Tandem I'm trying to compile OpenSSL 1.0.1h on Tandem

Re: Do I need to call BIO_free(network_bio) or not?

2014-07-15 Thread Iñaki Baz Castillo
some new comments: First of all the example in the doc is wrong: -- BIO *internal_bio, *network_bio; BIO_new_bio_pair(internal_bio, 0, network_bio, 0); -- It should be: -- BIO *internal_bio, *network_bio; BIO_new_bio_pair(&internal_bio, 0, &network_bio, 0); -

Making Open SSH FIPS compliant

2014-07-15 Thread Sadhana
Hello All, I have a requirement to make Openssh FIPS compliant. It would be really helpful, if you could answer the below question and correct me if I am wrong. I also understand there is a module called as fipscanister.o is introduced in Openssl. This ensures, FIPS compliancy. This also, expos

Re: Help with export key as ASN.1 type EncryptedPrivateKeyInfo

2014-07-15 Thread Dr. Stephen Henson
On Mon, Jul 14, 2014, Martin Basti wrote: > Hi list, > > I have RSA encrypted private key as byte sequence, and I need to > export it as ASN.1 type EncryptedPrivateKeyInfo (RFC5958 section 3.) > > Currently I use the following code (shortened): > > unsigned char *pkey; //assigned encrypted prim

Do I need to call BIO_free(network_bio) or not?

2014-07-15 Thread Iñaki Baz Castillo
Hi, I'm a bit confused about how to free a BIO pair associated to a SSL. The doc at https://www.openssl.org/docs/crypto/BIO_s_bio.html clearly says: Both halves of a BIO pair should be freed. That is even if one half is implicit freed due to a BIO_free_all() or SSL_fr

Re: protocol version selection in case of SSLv23_method

2014-07-15 Thread Jeffrey Walton
On Mon, Jul 14, 2014 at 9:37 AM, Sanju Gurung wrote: > I am using OpenSSL 1.0.1e. > I just wanted to know If SSL_CTX object uses SSLv23_method then client sends > SSLv2 client-hello message. How can I send SSLv3 client-hello message by > using the same connection method (SSLv23_method). > I don't

how to achieve protocol version fallback

2014-07-15 Thread Sanju Gurung
How can we achieve client-hello protocol version fallback mechanism in OpenSSL 1.0.1e? Regards, Sanju.

OpenSSL API

2014-07-15 Thread Kay Shamsa
Hi; Can anybody please specify how I can use Open SSL API? Thanks Kay

RE: Compile error on Tandem

2014-07-15 Thread Johnson, Wayne
Never mind, #3380 fixed this for me. From: Johnson, Wayne Sent: Monday, July 14, 2014 10:11 AM To: 'openssl-users@openssl.org' Subject: Compile error on Tandem I'm trying to compile OpenSSL 1.0.1h on Tandem (aka NonStop). I'm getting the following errors: c89 -I.. -I../include -Ww -D__TANDEM -D

Compile error on Tandem

2014-07-15 Thread Johnson, Wayne
I'm trying to compile OpenSSL 1.0.1h on Tandem (aka NonStop). I'm getting the following errors: c89 -I.. -I../include -Ww -D__TANDEM -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D_TANDEM_SOURCE -DB_ENDIAN -c -o heartbeat_test.o heartbeat_test.c SETUP_HEARTBEAT_TEST_FIXTURE(dtls);

Help with export key as ASN.1 type EncryptedPrivateKeyInfo

2014-07-15 Thread Martin Basti
Hi list, I have RSA encrypted private key as byte sequence, and I need to export it as ASN.1 type EncryptedPrivateKeyInfo (RFC5958 section 3.) Currently I use the following code (shortened): unsigned char *pkey; //assigned encrypted primary key priv_key_info = PKCS8_PRIV_KEY_INFO_new(); aobj

protocol version selection in case of SSLv23_method

2014-07-15 Thread Sanju Gurung
I am using OpenSSL 1.0.1e. I just wanted to know If SSL_CTX object uses SSLv23_method then client sends SSLv2 client-hello message. How can I send SSLv3 client-hello message by using the same connection method (SSLv23_method). I don't want to disable any protocol except SSLv2 & don't want to use SS

Help with export key as ASN.1 type EncryptedPrivateKeyInfo

2014-07-15 Thread Martin Basti
Hi list, I have RSA encrypted private key as byte sequence, and I need to export it as ASN.1 type EncryptedPrivateKeyInfo (RFC5958 section 3.) Currently I use the following code (shortened): unsigned char *pkey; //assigned encrypted primary key priv_key_info = PKCS8_PRIV_KEY_INFO_new(); aobj

Linking under Unix/Linux

2014-07-15 Thread Kay Shamsa
I have written a software which includes encryption for broadcast of messages. We use OpenSSL. We have the OpenSSL object module. My problem is linking my object code with OpenSSl object module, so I dont get FIPS_mode_set error. I read the manual but I am not clear about what to do. I apprec