EVP_En/DecryptUpdate Question...

2006-11-14 Thread Usman Riaz
Hi All, I am trying to use OpenSSL to encrypt/decrypt some data for that I am using EVP_* API. I have a question about EVP_En/DecryptUpdate function. The second param of these functions is a pointer to a buffer where the En/Decrypted data will be copied by the function, but I wasn't

Re: Is openSSL supported on 64-bit Linux ?

2006-11-14 Thread Darryl Miles
I would guess anything within the last few years. Lets take a system: $ uname -a Linux me.foobar.com 2.6.18 #1 SMP Sun Sep 24 21:09:55 BST 2006 x86_64 x86_64 x86_64 GNU/Linux $ gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr

Any API available to get the CRL next update time in ASN1_GENERALIZEDTIME?

2006-11-14 Thread surendra.ande
Hi, Is there any API available to get the next update time of CRL in ASN1_GENERALIZEDTIME format? The next update time can be retrieved in ASN1_TIME format using the following API: get_crl_update_time(X509_CRL *crl ) { ASN1_TIME *ctm = NULL; ctm = M_ASN1_TIME_dup

RE: Any API available to get the CRL next update time in ASN1_GENERALIZEDTIME?

2006-11-14 Thread surendra.ande
Hi Team, I found the following API to get the timeASN1_GENERALIZEDTIME format. == ASN1_TIME *ctm = NULL;ASN1_GENERALIZEDTIME *asn1_time = NULL; ctm = M_ASN1_TIME_dup (X509_CRL_get_nextUpdate(base_crl));asn1_time =

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: Okay, I did everything you told me to do. First of all, the crt is a test crt and has been all along. That's how Verisign works these days. They give you a test cert until you pay them money. When I displayed the key, then converted it to pem format and displayed the

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, Okay, I did everything you told me to do. First of all, the crt is a test crt and has been all along. That's how Verisign works these days. They give you a test cert until you pay them money. When I displayed the key, then converted it to pem format and displayed the converted key,

problem decrypting/verifying smime

2006-11-14 Thread john1
Hello, I have an smime message that I am trying to decrypt and verify. I'm not sure if the message is a valid one in the first place as it seems to be all binary as apposed to ascii. So my questions are, 1) Is it a valid message 2) If it is, what should my command look like? Here's my command:

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: You should cat real PEM encoded cert and key. I assume from what you write I should create a pem file out of the crt file: server167# openssl base64 -d -in mrtablecloth-vi.com.crt | openssl rsa -inform der mrtablecloth-vi.com.crt.pem However, when I try that, I get

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: You should convert your private key to PEM format too. This error is probably because certificate is read as RSA key. Convert both files to PEM (files with BEGIN header), cat both files to one file and use in your configuration. Same thing: server167# ls

(3,5) Shamir Secret Sharing

2006-11-14 Thread Rafael Cividanes
Hi, I've implemented (in C++)a simple form of shamir secret sharing for the particular case(3,5).One function receives a BIGNUM A0 an generates the 5 secrets. Another function, receives 3 secrets and generates the recover BIGNUM A0. It's working fine. The problem is thatI need to convert

Re: problem decrypting/verifying smime

2006-11-14 Thread Dr. Stephen Henson
On Tue, Nov 14, 2006, [EMAIL PROTECTED] wrote: On 14 Nov 2006 at 14:24, Also Sprach Dr. Stephen Henson: OpenSSLs MIME parser is a minimal affair which doesn't handle some formats at all. You can use an external MIME parser and pass the content to the smime command with the -inform DER

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: .. server167# openssl base64 -d -in mrtablecloth-vi.com.crt | openssl x509 -inform der mrtablecloth-vi.com.crt.pem Clean, no complaints :) However... server167# /usr/local/sbin/lighttpd -f /usr/ports/www/lighttpd/doc/lighttpd.conf 2006-11-14 14:56:44: (network.c.377) SSL:

Re: problem decrypting/verifying smime

2006-11-14 Thread Dr. Stephen Henson
On Tue, Nov 14, 2006, [EMAIL PROTECTED] wrote: html deleted Can you resend that without the html? Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage:

Re: problem decrypting/verifying smime

2006-11-14 Thread Dr. Stephen Henson
On Tue, Nov 14, 2006, [EMAIL PROTECTED] wrote: Hello, I have an smime message that I am trying to decrypt and verify. I'm not sure if the message is a valid one in the first place as it seems to be all binary as apposed to ascii. So my questions are, 1) Is it a valid message 2) If it

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: You should convert your private key to PEM format too. This error is probably because certificate is read as RSA key. Convert both files to PEM (files with BEGIN header), cat both files to one file and use in your configuration. Same thing: server167# ls

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, You should convert your private key to PEM format too. This error is probably because certificate is read as RSA key. Convert both files to PEM (files with BEGIN header), cat both files to one file and use in your configuration. Same thing: server167# ls

Re: Any API available to get the CRL next update time in ASN1_GENERALIZEDTIME?

2006-11-14 Thread Dr. Stephen Henson
On Tue, Nov 14, 2006, [EMAIL PROTECTED] wrote: Hi Team, I found the following API to get the time ASN1_GENERALIZEDTIME format. == ASN1_TIME *ctm = NULL; ASN1_GENERALIZEDTIME *asn1_time = NULL; ctm = M_ASN1_TIME_dup

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, You should cat real PEM encoded cert and key. I assume from what you write I should create a pem file out of the crt file: server167# openssl base64 -d -in mrtablecloth-vi.com.crt | openssl rsa -inform der mrtablecloth-vi.com.crt.pem However, when I try that, I get this

Re: problem decrypting/verifying smime

2006-11-14 Thread john1
On 14 Nov 2006 at 15:53, Also Sprach Dr. Stephen Henson: openssl pkcs7 -inform DER -in whatever.p7m Thank you! that worked a treat. Ok, so now I can decrypt it. I currently have something that looks like: [EMAIL PROTECTED] Content-Type: application/EDIFACT; name=recvfile.edi

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, server167# openssl base64 -d -in private.key_BAK | openssl rsa -inform der mrtablecloth-vi.com.crt writing RSA key My mistake, should be of course to mrtablecloth-vi.com.crt.pem server167# rm mrtablecloth-vi.com.crt.pem Do not run this command now. server167# openssl base64 -d -in

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, server167# openssl base64 -d -in private.key_BAK | openssl rsa -inform der mrtablecloth-vi.com.crt writing RSA key My mistake, should be of course to mrtablecloth-vi.com.crt.com server167# rm mrtablecloth-vi.com.crt.pem Do not run this command now. server167# openssl base64 -d -in

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, server167# openssl base64 -d -in mrtablecloth-vi.com.crt | openssl x509 -inform der mrtablecloth-vi.com.crt.pem Clean, no complaints :) However... server167# /usr/local/sbin/lighttpd -f /usr/ports/www/lighttpd/doc/lighttpd.conf 2006-11-14 14:56:44: (network.c.377) SSL: Private

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: Use something like: server167# openssl base64 -d -in private.key_BAK | openssl rsa -inform der mrtablecloth-vi.com.crt writing RSA key server167# rm mrtablecloth-vi.com.crt.pem server167# openssl base64 -d -in mrtablecloth-vi.com.crt | openssl x509 -inform der

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: My mistake, should be of course to mrtablecloth-vi.com.crt.com I assume you mean *.pem, not *.com but at any rate the results were the same :( Restore base64 encoded DER certificate to mrtablecloth-vi.com.crt and run this command again. server167# openssl base64 -d -in

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, server167# openssl base64 -d -in private.key_BAK | openssl rsa -inform der mrtablecloth-vi.com.crt.pem writing RSA key ok server167# openssl base64 -d -in mrtablecloth-vi.com.crt | openssl x509 -inform der mrtablecloth-vi.com.crt.pem unable to load certificate looks like bad

(Fwd) Re: problem decrypting/verifying smime

2006-11-14 Thread john1
On 14 Nov 2006 at 15:42, Also Sprach [EMAIL PROTECTED]: I've put the signature in one file and the actual message in another. Is it possible for me to verify that the signature is valid? I have tried all (well apart from the correct one no doubt) permutations of smime switches. The one

Re: (Fwd) Re: problem decrypting/verifying smime

2006-11-14 Thread Dr. Stephen Henson
On Tue, Nov 14, 2006, [EMAIL PROTECTED] wrote: On 14 Nov 2006 at 15:42, Also Sprach [EMAIL PROTECTED]: I've put the signature in one file and the actual message in another. Is it possible for me to verify that the signature is valid? I have tried all (well apart from the correct one

Re: problem decrypting/verifying smime

2006-11-14 Thread john1
On 14 Nov 2006 at 14:24, Also Sprach Dr. Stephen Henson: OpenSSLs MIME parser is a minimal affair which doesn't handle some formats at all. You can use an external MIME parser and pass the content to the smime command with the -inform DER switch. In this case everything after the blank line.

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: I assume you mean substitute the current file for the one you sent. I did that and the command executed successfully :) However... server167# /usr/local/sbin/lighttpd -f /usr/ports/www/lighttpd/doc/lighttpd.conf 2006-11-14 16:55:06: (network.c.358) SSL:

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: I think you get this error because you specified in config file: ssl.ca-file=/etc/ssl/certs/mrtablecloth-vi.com.crt This file should be PEM file from Verisign temporary CA, you should get it from Verisign, eventually convert to PEM save to file and point in this

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, First, my correction...I got that error when I tried to install a CACert...I got the other error from the Verisign cert. I got no pem file from CACert. Verisign says I can test what they've given me and it should all work. The client wants to see that test work before they pay them

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: You should get CA cert from Verisign (or something) which subject will equal to this issuer. Then maybe my problem was at the start. I received an email from Verisign at the beginning telling me to load this trial CA cert from this page:

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, Then maybe my problem was at the start. I received an email from Verisign at the beginning telling me to load this trial CA cert from this page: http://www.verisign.com/support/verisign-intermediate-ca/trial-secure-server-intermediate/index.html Now, not knowing better (and still not),

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: Great, save contents of this certificate (in window) to lets say vs_inter_ca.pem. Next download Root certificate from: http://www.verisign.com/support/verisign-intermediate-ca/Trial_Secure_Server_Root/index.html and save to lets say vs_root_ca.pem Done. Then do first

Re: Problem W/ Cert

2006-11-14 Thread beno
Wait! I misunderstood... server167# openssl verify -CAfile vs_root_ca.pem vs_inter_ca.pem vs_inter_ca.pem: OK server167# cat vs_root_ca.pem vs_inter_ca.pem vs_ca.pem server167# openssl verify -CAfile vs_ca.pem mrtablecloth-vi.com.crt.pem mrtablecloth-vi.com.crt.pem: OK server167#

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, Then do first check: $ openssl verify -CAfile vs_root_ca.pem vs_inter_ca.pem vs_inter_ca.pem: OK server167# openssl verify -CAfile vs_root_ca.pem vs_inter_ca.pem vs_inter_ca.pem: OK vs_inter_ca.pem: OK Error opening certificate file vs_inter_ca.pem:

Re: Problem W/ Cert

2006-11-14 Thread Marek Marcola
Hello, Wait! I misunderstood... server167# openssl verify -CAfile vs_root_ca.pem vs_inter_ca.pem vs_inter_ca.pem: OK server167# cat vs_root_ca.pem vs_inter_ca.pem vs_ca.pem server167# openssl verify -CAfile vs_ca.pem mrtablecloth-vi.com.crt.pem mrtablecloth-vi.com.crt.pem: OK server167#

Re: Problem W/ Cert

2006-11-14 Thread beno
Marek Marcola wrote: Change ssl.ca-file directive to vs_ca.pem. IT WORKED! IT WORKED! HALLELUJAH IT WORKED!! Thank you SO MUCH for your help! Now, I'll review our million messages and try to make sense of them, and put together a how-to if that seems appropriate. Thanks again :)) beno

Problem compiling openssl-0.9.8d on Solaris 8

2006-11-14 Thread Garey Mills
Hi - Compiling with gcc I get this error: making all in crypto/ui... make[2]: Entering directory `/usr/local/src/openssl-0.9.8d/crypto/ui' cc -I.. -I../.. -I../../include -KPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -xtarget=ultra -xarch=v8plus -xO5

Re: Problem compiling openssl-0.9.8d on Solaris 8

2006-11-14 Thread Carson Gaspar
Garey Mills wrote: Hi - Compiling with gcc I get this error: making all in crypto/ui... make[2]: Entering directory `/usr/local/src/openssl-0.9.8d/crypto/ui' cc -I.. -I../.. -I../../include -KPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -xtarget=ultra

Re: Problem compiling openssl-0.9.8d on Solaris 8

2006-11-14 Thread Garey Mills
Carson - That was it. Thanks; Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Tue, 14 Nov 2006, Carson Gaspar wrote: Garey Mills wrote: Hi - Compiling with gcc I get this error: making all in crypto/ui... make[2]: Entering

common name for https certificates in embedded devices

2006-11-14 Thread Clem Taylor
Hi, I'm working on an embedded device that makes heavy use of SSL. The primary use of SSL is for authentication, users need to make sure that they are talking to the correct device. As a result, each device has a few SSL certificates that are created, signed and written to the device during

RE: Is openSSL supported on 64-bit Linux ?

2006-11-14 Thread Agarwal, Saumya
Thanks Darryl. Here are the specific details of my system - bash-3.00$ uname -a Linux saumya.foobar.com 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux bash-3.00$ gcc -v Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.3/specs Configured with: ../configure