Re: Decryption does not yield the same as Encryption

2009-02-12 Thread Rafel Coyle
Below is my base64 encoding code. Any ideas? char *base64(const unsigned char *input, int length) { BIO *bmem, *b64; BUF_MEM *bptr; char *buff ; b64 = BIO_new(BIO_f_base64()); bmem = BIO_new(BIO_s_mem()); b64 = BIO_push(b64, bmem); BIO_write( b64, input, length); BIO_flush( b64 ); BIO_ge

SSL Renegotiation Initiated by the SSL Server is failed in 0.9.8h

2009-02-12 Thread Vasu
Hello All, After updating the SSL from 0.9.8e to 0.9.8h in OpenVMS, SSL renegotiation from the SSL server is failed. Is there any change in the renegotiation api calls? I can able to run successfully in 0.9.8e. It is failing in 0.9.8h. Here is the code... printf("Starting SSL renegot

Obtaining EC Public Key from X.509 cert

2009-02-12 Thread Larson, John
Hi, I'm working on a simple C-program to parse an X.509 certificate in PEM format, retrieve the public key and hash it so I can add this to a data package being sent to different remote sites and, at those sites, compare the hash to the subjectKeyIdentifier of the end-entity certificate and thu

RE: RSA Decryption Error

2009-02-12 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of James Richardson > Sent: Tuesday, 10 February, 2009 08:55 > I'm trying to use the openssl toolkit to decrypt a message that > was encryted > using an RSA public key. I have the RSA private key and thus has generated > to the public key. so I ha

RE: Generating a PKCS#12 file

2009-02-12 Thread Bob Barnes
Steve/Kyle, Thanks again for your help. I've created a new private key: -BEGIN ENCRYPTED PRIVATE KEY- MIICoDAaBgkqhkiG9w0BBQMwDQQIOvzJDTjEproCAQUEggKA9QSxNpqmrPiz7Tyd nXHRI7urfaCn0tEZp9v8fOpNTP18EaybbDM0zMvJ/g8uNP6wKgLlj159BdFmtmV6 rTDjqM+Xo7G3uwlOn2HWK6kkfwS9ZzVo+f3vYJ6VOCfSpOC8N82CWR

Re: Decryption does not yield the same as Encryption

2009-02-12 Thread Ger Hobbelt
First thought as this is BIO stuff, is that you might lack a BIO_flush() at the end (to ensure the last few bytes are puished out and in case of crypto BIO filter also useful in a very important way as it will trigger a call to EVP_EncryptFinal which will do te mandatory 'end thing' like padding, e

Re: clear text vs opaque signature

2009-02-12 Thread Jan C.
On Thu, Feb 12, 2009 at 12:46 PM, Dr. Stephen Henson wrote: > On Thu, Feb 12, 2009, Jan C. wrote: > >> Hi, >> ok, so the clear text signature general form is something like: >> >> >> --A3DB62BE42E8E4D7716813FA55957190 >> >> My Signed Text >> >> --A3DB62BE42E8E4D7716813FA55957190 >> Content

Re: clear text vs opaque signature

2009-02-12 Thread Dr. Stephen Henson
On Thu, Feb 12, 2009, Jan C. wrote: > Hi, > ok, so the clear text signature general form is something like: > > > --A3DB62BE42E8E4D7716813FA55957190 > > My Signed Text > > --A3DB62BE42E8E4D7716813FA55957190 > Content-Type: application/x-pkcs7-signature; name="smime.p7s" > Content-Trans

Decryption does not yield the same as Encryption

2009-02-12 Thread Rafel Coyle
Does anyone have any idea as to why an encryption would fail? I can encrypt a dummy credit card number like 37870001010 and it yields 3787000101; however, if I encrypt 37870001012 the full number is returned yielding 37870001012. The problem appears to be with the encryption a

Re: clear text vs opaque signature

2009-02-12 Thread Jan C.
Hi, ok, so the clear text signature general form is something like: --A3DB62BE42E8E4D7716813FA55957190 My Signed Text --A3DB62BE42E8E4D7716813FA55957190 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filen