Nested ASN1 strings and OPENSSL_ALLOW_NESTED_ASN1_STRINGS

2007-06-25 Thread Williams Bryn-R40716
Hi, A team in our organisation has a small ASN.1 decoding example that works with openssl 0.9.7g, but not with any more recent release. The reason seems to be that the ASN.1 structure in question includes (perhaps wrongly) a nested ASN.1 string, which is no longer supported by default. I see from

Re: verify signature using public key?

2007-06-25 Thread Janet N
I got it to signed and verify using dgst -dss1. To sign or verify data using the DSA algorithm then the dss1 digest must be used. On 6/25/07, Janet N <[EMAIL PROTECTED]> wrote: Hi, Thanks for the prompt respond. I've tried to use the "dgst" function to sign and verify the signature using th

Re: verify signature using public key?

2007-06-25 Thread Janet N
Hi, Thanks for the prompt respond. I've tried to use the "dgst" function to sign and verify the signature using the dsa public key, it failed to even load the private key to sign it! 1) Message digest: -bash-3.1$ openssl dgst -sha1 sig.txt SHA1(sig.txt)= 922a03e68e2e8d36a6b7a7fb4400fb32b89373f0

Re: verify signature using public key?

2007-06-25 Thread Dr. Stephen Henson
On Mon, Jun 25, 2007, Janet N wrote: > Hi I am having difficulties using openssl to verify the signature using my > dsa-public key, any help is appreciated! > > sign data using private key: > 1) openssl rsautl -sign -in sign.txt -inkey userkey.pem -out sig > > Verify signature with public key go

verify signature using public key?

2007-06-25 Thread Janet N
Hi I am having difficulties using openssl to verify the signature using my dsa-public key, any help is appreciated! sign data using private key: 1) openssl rsautl -sign -in sign.txt -inkey userkey.pem -out sig Verify signature with public key got syntax error: 2) openssl rsautl -verify -in sig -

Re: openssl verify signature with priv key?

2007-06-25 Thread Janet N
Now I replaced "rsautl" with "pkeyutl" and it sucessfully sign the data using a private key. But how do I verify the dsa-signature with the public key? sign data using private key: 1) openssl rsautl -sign -in sign.txt -inkey userkey.pem -out sig Verify signature with public key got syntax error

Sign with RSA/SHA1 and get PKCS#7/CMS

2007-06-25 Thread estante23-openssl
Hello, I need to sign a file using a RSA Key and get a PKCS#7/CMS file. I´ve tried the following command but Openssl complains that the data is too large for the key size. openssl rsautl -in 1.xml -out 1.xml.cms.base64 -inkey britanico1.pem -sign I´ve read the documentation of rsautl and its t

Re: openssl verify signature with priv key?

2007-06-25 Thread Janet N
Thanks for the clarification. So I've tried using "pkeyutl" to sign data using a private key then verify the signature with following command: openssl pkeyutl -verify -in file -sigfile sig -inkey key.pem openssl pkeyutl -sign -in file -inkey key.pem -out sig But I am getting eror pkeyutl is a

Re: openssl verify signature with priv key?

2007-06-25 Thread Michael Sierchio
you verify a signature with the public key, and you sign with the private key. -Original Message- From: "Janet N" <[EMAIL PROTECTED]> Subj: openssl verify signature with priv key? Date: Mon 2007 Jun 25 13:17 Size: 351 bytes To: openssl-users@openssl.org Hi there, How do I verify

Re: openssl verify signature with priv key?

2007-06-25 Thread Marek Marcola
Hello, > How do I verify a signature (dsa signature), with the private key > using openssl? > > I've tried the following did not work (syntax erro), any help is > appreciated! > > openssl rsa -in sigcert.pem -noout -verify -key userkey.pem > > unknown option -verify > rsa [options] outfile > whe

openssl verify signature with priv key?

2007-06-25 Thread Janet N
Hi there, How do I verify a signature (dsa signature), with the private key using openssl? I've tried the following did not work (syntax erro), any help is appreciated! openssl rsa -in sigcert.pem -noout -verify -key userkey.pem unknown option -verify rsa [options] outfile where options are

RE: Urgent Help in regarding openssl library

2007-06-25 Thread lavanya.golla
Hi All, in SSL_shutdon finction there is a check on (handshake_func = 0). What is the purpose of this function (handshake_func) and when is it reset to NULL. Thanks & Regards, Lavanya Golla. From: Lavanya Golla (WT01 - TES-Enterprise Networks) Sent: Thu 6/14

Re: newbie installation problem - Makefile.org not found

2007-06-25 Thread Peter Tsai - GTS
Hi, Endhy, Thank you so much for your help. Obviously I am missing a lot more files than just this one. I've found out the problem. What I did the first time was - I decompressed the file on Windows, transferred the tar file to AIX, then un-tar on AIX. Apparently a lot of files are lost in t

Re: newbie installation problem - Makefile.org not found

2007-06-25 Thread Endhy Aziz
Hi, Here's the Makefile.org (attachment). If you're downloading the complete source code, this file should have been included. Regards, --Endhy Makefile.org Description: Binary data

Re: please help me.....

2007-06-25 Thread sri dhar
thank you, its working fine. Marek Marcola <[EMAIL PROTECTED]> wrote: Hello, > ok i l try that.let me know u .. You may try something like that (not tested): int rsa_read_pem(RSA ** rsa, char *buf, int len) { BIO *mem; if ((mem = BIO_new_mem_buf(buf, len)) == NULL) { goto err;

Re: please help me.....

2007-06-25 Thread Marek Marcola
Hello, > ok i l try that.let me know u .. You may try something like that (not tested): int rsa_read_pem(RSA ** rsa, char *buf, int len) { BIO *mem; if ((mem = BIO_new_mem_buf(buf, len)) == NULL) { goto err; } *rsa = PEM_read_bio_RSAPrivateKey(mem, NULL, NULL, NULL);

Re: openssl error while retreaving key from smartcard from wpa_supplicant?

2007-06-25 Thread Marek Marcola
Hello, > I'm currently trying to authenticate using EAP-TLS using smartcard with > wpa_supplicant and I get this error: > > OpenSSL: tls_connection_engine_private_key - Private key failed > verification error:140A30B1:SSL routines:SSL_check_private_key:no > certificate assigned > > I got some mes

Re: please help me.....

2007-06-25 Thread sri dhar
ok i l try that.let me know u .. Marek Marcola <[EMAIL PROTECTED]> wrote: Hello, > i tried that way, now its generating coredump files.is there any other > way to solve that issue... You should use something like that (buf and len has your key): unsigned char *p; RSA *rsa = NULL; p = b

Re: please help me.....

2007-06-25 Thread sri dhar
i tried that way,buffer information is not DER format. buffer header like this. -BEGIN RSA PRIVATE KEY- .. -END RSA PRIVATE KEY- Is they anyother way to resolve that problem? Marek Marcola <[EMAIL PROTECTE

Re: please help me.....

2007-06-25 Thread Marek Marcola
Hello, > i tried that way, now its generating coredump files.is there any other > way to solve that issue... You should use something like that (buf and len has your key): unsigned char *p; RSA *rsa = NULL; p = buf; if ((rsa=d2i_RSAPrivateKey(NULL,&p,(long)len)) == NULL){ goto err; } if (

Re: please help me.....

2007-06-25 Thread sri dhar
i tried that way, now its generating coredump files.is there any other way to solve that issue... Marek Marcola <[EMAIL PROTECTED]> wrote: Hello, > > I have a RSA key information on buffer.i want to merge with buffer > content to SSLcontext object. > i am using > SSL_CTX_use_RSAPrivateKey_A

Re: please help me.....

2007-06-25 Thread Marek Marcola
Hello, > > I have a RSA key information on buffer.i want to merge with buffer > content to SSLcontext object. > i am using > SSL_CTX_use_RSAPrivateKey_ASN1(ctxr[i],keyinfo,strlen(keyinfo)) this > SSL API. > that API is failing . it gives following error message. > > > 9755: error:0D0680A8:as

please help me.....

2007-06-25 Thread sri dhar
hi , I am sridhar.D I have a RSA key information on buffer.i want to merge with buffer content to SSLcontext object. i am using SSL_CTX_use_RSAPrivateKey_ASN1(ctxr[i],keyinfo,strlen(keyinfo)) this SSL API. that API is failing . it gives following error message. 9755: error:0D0

PEM_write_PKCS8PrivateKey() writing only headers

2007-06-25 Thread Naveen Rawat
Hi All, I am using openssl.0.9.8c on RH Enterprise Linux (kernel release 2.6.9-42.ELsmp). I tried for writing an unencrypted and encrypted private key using- PEM_write_PKCS8PrivateKey(key_f1, pkey, NULL, NULL, 0, NULL, NULL); . .

openssl error while retreaving key from smartcard from wpa_supplicant?

2007-06-25 Thread Carles Fernandez i Julia
Hi I'm currently trying to authenticate using EAP-TLS using smartcard with wpa_supplicant and I get this error: OpenSSL: tls_connection_engine_private_key - Private key failed verification error:140A30B1:SSL routines:SSL_check_private_key:no certificate assigned I got some messages "Error: can't

Re: How to change mode from Blocking to Non-blocking

2007-06-25 Thread Urjit Gokhale
This has nothing to do with openssl in particular. This is a general socket programming scenario. You can set your socket to non-blocking mode using fcntl(socket, F_SETFL, O_NONBLOCK) / ioctlsocket(AcceptSocket, FIONBIO, &NonBlock) Google or RTFM if you wish to know more about these functions. Yo

Re: RSA and DH

2007-06-25 Thread Urjit Gokhale
As per my understanding, using public key cryptography for encryption is much more expensive than using symmetric key cryptography. So generally the main communication is encrypted using symmetric key cryptography, whereas public key cryptography is used to exchange keys and other information th