Re: Diffie Hellman problem

2013-06-20 Thread Aleix Ventayol
Amazing, it was a version problem. I've only wasted two days trying to understand what's wrong with my code and doing tests. Thanks everyone for you help!! Aleix Ventayol | Mobile Jazz C. Nàpols, 187, 9º, 08013 Barcelona http://mobilejazz.cat

Re: Diffie Hellman problem

2013-06-20 Thread Dr. Stephen Henson
On Thu, Jun 20, 2013, Aleix Ventayol wrote: > Hi Dave, > > I've tried my code again and I get the following error: > > 330098688:error:0D07A097:asn1 encoding routines:ASN1_mbstring_ncopy:string > too > long:/SourceCache/OpenSSL098/OpenSSL098-47.1/src/crypto/asn1/a_mbstr.c:154:maxsize=64 > 433009

Re: Diffie Hellman problem

2013-06-20 Thread Aleix Ventayol
Hi Dave, I've tried my code again and I get the following error: 330098688:error:0D07A097:asn1 encoding routines:ASN1_mbstring_ncopy:string too long:/SourceCache/OpenSSL098/OpenSSL098-47.1/src/crypto/asn1/a_mbstr.c:154:maxsize=64 4330098688:error:0B07806F:x509 certificate routines:X509_PUBKEY_set

RE: Diffie Hellman problem

2013-06-18 Thread Dave Thompson
I wrote Tuesday, 18 June, 2013 22:29: > if [DH peer] is using the > other cert fields for anything, or relying on CA issuance of > the cert as a trust check, then you need the cert. > > If you do need to create a cert yourself, > Alternatively if the Java example is > getting the cert from a

RE: Diffie Hellman problem

2013-06-18 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Dr. Stephen Henson > Sent: Tuesday, 18 June, 2013 13:40 To add some more: > On Tue, Jun 18, 2013, Aleix Ventayol wrote: > > > Hi everyone, > > > > I'm using a Diffie Hellman Agreemant on one app. I've been able to generate > > the DH without

RE: Diffie Hellman problem

2013-06-18 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of Aleix Ventayol >Sent: Tuesday, 18 June, 2013 17:33 >I've tried it using the following code: >EVP_PKEY * pp = EVP_PKEY_new(); >EVP_PKEY_set1_DH(pp, dh); >char *buff; >BUF_MEM *bptr; >int write_rc = 0; >BIO *bme

Re: Diffie Hellman problem

2013-06-18 Thread Aleix Ventayol
I've tried it using the following code: EVP_PKEY * pp = EVP_PKEY_new(); EVP_PKEY_set1_DH(pp, dh); char *buff; BUF_MEM *bptr; int write_rc = 0; BIO *bmem = BIO_new(BIO_s_mem()); write_rc = PEM_write_bio_PUBKEY(bmem, pp); But I'm not getting anything in pp and write_rc

Re: Diffie Hellman problem

2013-06-18 Thread Dr. Stephen Henson
On Tue, Jun 18, 2013, Aleix Ventayol wrote: > Hi everyone, > > I'm using a Diffie Hellman Agreemant on one app. I've been able to generate > the DH without any problems, but now I should send the DH information to > the server. > > We've an example of the same process written in Java, what this