Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-05 Thread Dr. Stephen Henson
On Tue, Feb 05, 2008, Peter Van Biesen wrote: > yes, I know, but I could get some information about the key with which the > message was encrypted without having to try a decryption ? > The key is identified by the issuer name and serial number of the certificate in PKCS#7. There isn't a funct

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-05 Thread Peter Van Biesen
yes, I know, but I could get some information about the key with which the message was encrypted without having to try a decryption ? Anyway, I can make due with this solution. Thanks again ! Peter. On Monday 04 February 2008 15:24:22 Victor Duchovni wrote: > On Mon, Feb 04, 2008 at 09:34:00A

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-04 Thread Victor Duchovni
On Mon, Feb 04, 2008 at 09:34:00AM +0100, Peter Van Biesen wrote: > -decrypt does not work without a key. I used an invalid key and I get > following error : > > Error decrypting PKCS#7 structure > 13136:error:21070092:PKCS7 routines:PKCS7_dataDecode:no recipient matches > key:pk7_doit.c:482: >

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-04 Thread Peter Van Biesen
-decrypt does not work without a key. I used an invalid key and I get following error : Error decrypting PKCS#7 structure 13136:error:21070092:PKCS7 routines:PKCS7_dataDecode:no recipient matches key:pk7_doit.c:482: 13136:error:21072077:PKCS7 routines:PKCS7_decrypt:decrypt error:pk7_smime.c:470

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Dr. Stephen Henson
On Fri, Feb 01, 2008, Peter Van Biesen wrote: > Are you saying that if I do not have the private key -verify says : > > "wrong content type" > > how does openssl know which key to use for decryption/verification ? Or does > it just try them all ? I have difficulty to believe that no informatio

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Peter Van Biesen
A quick google takes me to http://www.madboa.com/geek/openssl/ which clearly states that failure to verify gives following error : Verification failure 9544:error:21075075:PKCS7 routines:PKCS7_verify:certificate verify error:pk7_smime.c:222:Verify error:self signed certificate Kindest regards,

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Peter Van Biesen
Are you saying that if I do not have the private key -verify says : "wrong content type" how does openssl know which key to use for decryption/verification ? Or does it just try them all ? I have difficulty to believe that no information can be retrieved from the pkcs7 container without the us

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Peter Van Biesen
Mmm did you open it ? Was the mime message wrong ? Dit you try : openssl smime -in peter.mbox -pk7out This works perfectly, proving this a correctly formatted message. The error occurs when you try a openssl pkcs7 ... command. I do know how to construct a valid mime message, I'm in the busi

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Victor Duchovni
On Fri, Feb 01, 2008 at 04:42:50PM +0100, Peter Van Biesen wrote: > yes, I tried that too, same error. > > Just try and slap a mailheader on it ... ( or use the one I tested with in > attachment ) > Are you trying to "-verify" or "-decrypt"? The former will not work, the message is encrypted.

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Victor Duchovni
On Fri, Feb 01, 2008 at 04:42:50PM +0100, Peter Van Biesen wrote: > yes, I tried that too, same error. > > Just try and slap a mailheader on it ... ( or use the one I tested with in > attachment ) > Not any mail header, the original one that carries the correct MIME Content-Type header for the

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Peter Van Biesen
yes, I tried that too, same error. Just try and slap a mailheader on it ... ( or use the one I tested with in attachment ) Kindest regards, Peter. On Friday 01 February 2008 16:29:25 Victor Duchovni wrote: > On Fri, Feb 01, 2008 at 02:46:34PM +0100, Peter Van Biesen wrote: > > Hi, > > > > our c

Re: Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Victor Duchovni
On Fri, Feb 01, 2008 at 02:46:34PM +0100, Peter Van Biesen wrote: > Hi, > > our customers need to send sensitive information to us using s/mime. To this > end, they use a java application that uses the bouncycastle java api to > generate the message. However, when I try to verify such a message

Unable to verify or decrypt a smime message generated with bouncycastle

2008-02-01 Thread Peter Van Biesen
Hi, our customers need to send sensitive information to us using s/mime. To this end, they use a java application that uses the bouncycastle java api to generate the message. However, when I try to verify such a message openssl gives me an error. The client- and the serverapplication seem to be