Re: PKCS#7 Signing: How to get repeatable output for signing the same data

2022-10-17 Thread Michal Suchánek
On Mon, Oct 17, 2022 at 10:28:45AM +0200, Tim Meusel wrote: > Hi! > I maintain a Ruby script that does PKCS#7 signing and afterwards some > enryption with AES-128-CFB. A trimmed down version: > > certpath = '/tmp/cert.pem' > keypath = '/tmp/key/pem' > d

PKCS#7 Signing: How to get repeatable output for signing the same data

2022-10-17 Thread Tim Meusel
Hi! I maintain a Ruby script that does PKCS#7 signing and afterwards some enryption with AES-128-CFB. A trimmed down version: certpath = '/tmp/cert.pem' keypath = '/tmp/key/pem' data = 'teststring' key = OpenSSL::PKey::RSA.new(File.read(keypath), '1234'

Re: PKCS#7/CMS verify reports bad signature

2019-04-05 Thread Steffen
Hello, I have a small update in order to close this issue. The identity provider that produced the invalid signatures have fixed their signatures so that we can verify them using the latest LTS version of OpenSSL. We use Bouncy Castle in some products and it does not catch the invalid signatures

Re: PKCS#7/CMS verify reports bad signature

2019-04-03 Thread Steffen
Hello, I think the person I spoke with might have thought about another set of signatures for an in-house identity provider. If that is the case then those signatures were probably generated by OpenSSL 1.0.2 and are OK. I heard from another person today that the bad files were produced by the othe

Re: PKCS#7/CMS verify reports bad signature

2019-04-03 Thread Matt Caswell
On 02/04/2019 17:34, Steffen wrote: > Hello, > >> What had produced the signatures? > > I received word from my end that the signatures may have been produced by > OpenSSL 1.0.2 (no idea which letter release) in the Cygwin environment but I > cannot confirm this. > If that's the case, I'd re

Re: PKCS#7/CMS verify reports bad signature

2019-04-02 Thread Steffen
Hello, > What had produced the signatures? I received word from my end that the signatures may have been produced by OpenSSL 1.0.2 (no idea which letter release) in the Cygwin environment but I cannot confirm this.

Re: PKCS#7/CMS verify reports bad signature

2019-04-02 Thread Michael Richardson
Matt Caswell wrote: > Using the cert/data files you provided me off-list (thanks), I was able to > confirm the above and narrow it down further to the following commit: What had produced the signatures? > In some cases, the damage is permanent and the spec deviation and > securi

Re: PKCS#7/CMS verify reports bad signature

2019-04-02 Thread Jakob Bohm via openssl-users
On 02/04/2019 10:44, Matt Caswell wrote: On 01/04/2019 22:23, Steffen wrote: Hello, I believe that I have narrowed the problem down to one specific version of OpenSSL. Version 1.1.0b works as expected while OpenSSL 1.1.0c does not. Using the cert/data files you provided me off-list (thanks),

Re: PKCS#7/CMS verify reports bad signature

2019-04-02 Thread Steffen
Hello Matt, Thank you for looking into this! So it seems like I have to figure out why the signatures are incorrectly formatted and then fix it at every source if possible, or convert the structures somehow if it can be done correctly. The only immediate solution I can see is to downgrade to Open

Re: PKCS#7/CMS verify reports bad signature

2019-04-02 Thread Matt Caswell
On 01/04/2019 22:23, Steffen wrote: > Hello, > > I believe that I have narrowed the problem down to one specific version of > OpenSSL. Version 1.1.0b works as expected while OpenSSL 1.1.0c does not. Using the cert/data files you provided me off-list (thanks), I was able to confirm the above an

Re: PKCS#7/CMS verify reports bad signature

2019-04-01 Thread Steffen
Hello, I believe that I have narrowed the problem down to one specific version of OpenSSL. Version 1.1.0b works as expected while OpenSSL 1.1.0c does not. I have currently only verified this using PKCS7_verify and CMS_verify since I have no CLI at hand for these versions. The changelog for 1.1.0

Re: PKCS#7/CMS verify reports bad signature

2019-04-01 Thread Steffen
ror:2E09809E:CMS routines:CMS_SignerInfo_verify:verification failure:crypto/cms/cms_sd.c:741: Other ideas are much appreciated! On Mon, Apr 1, 2019 at 3:58 PM Matt Caswell wrote: > > > On 01/04/2019 14:46, Steffen wrote: > > Hello, > > > > I am struggling with using OpenSS

Re: PKCS#7/CMS verify reports bad signature

2019-04-01 Thread Matt Caswell
On 01/04/2019 14:46, Steffen wrote: > Hello, > > I am struggling with using OpenSSL 1.1.1 to verify a PKCS #7/CMS structure. > Verification succeeds when I use OpenSSL 1.0.2, but 1.1.0 and 1.1.1 fails with > "bad signature". I initially had this problem when using t

PKCS#7/CMS verify reports bad signature

2019-04-01 Thread Steffen
Hello, I am struggling with using OpenSSL 1.1.1 to verify a PKCS #7/CMS structure. Verification succeeds when I use OpenSSL 1.0.2, but 1.1.0 and 1.1.1 fails with "bad signature". I initially had this problem when using the OpenSSL library but I see that the problem also applies to the O

Re: [openssl-users] PKCS#7

2017-03-15 Thread valéry
Alright, big thanks to both of you for your input! On Mar 15, 2017 23:01, "Wouter Verhelst" wrote: On 15-03-17 05:13, valéry wrote: > Hi, > > thank you very much for your response. > Say someone would be able to gather several clear text AES keys and > their respective asymmetrically encrypted

Re: [openssl-users] PKCS#7

2017-03-15 Thread Wouter Verhelst
On 15-03-17 05:13, valéry wrote: Hi, thank you very much for your response. Say someone would be able to gather several clear text AES keys and their respective asymmetrically encrypted RSA blocks. Would it weakens the security of the RSA key pair ? I mean could it be easier for someone using th

Re: [openssl-users] PKCS#7

2017-03-15 Thread Salz, Rich via openssl-users
> Say someone would be able to gather several clear text AES keys and their > respective asymmetrically encrypted RSA blocks. Would it weakens the security > of the RSA key pair ? I mean could it be easier for someone using that > information to brute force an RSA key pair ? No -- openssl-user

Re: [openssl-users] PKCS#7

2017-03-14 Thread valéry
RSA key pair ? Thank you On Tue, Mar 14, 2017 at 3:12 PM, Salz, Rich via openssl-users < openssl-users@openssl.org> wrote: > > If so, would it be possible in principle to decrypt an encrypted PKCS#7 > envelope only knowing which AES key was used ? > > Yes. But maybe not w

Re: [openssl-users] PKCS#7

2017-03-14 Thread Salz, Rich via openssl-users
> If so, would it be possible in principle to decrypt an encrypted PKCS#7 > envelope only knowing which AES key was used ? Yes. But maybe not with the openssl api's :) -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

[openssl-users] PKCS#7

2017-03-14 Thread valéry
Hi, is the following picture correct ? when creating an encrypted PKCS#7 envelope, a random AES key is generated and encrypted with the provided RSA private key. The AES key is used to encrypt the envelope content. The X509 certificate containing the associated public key is included in the

Re: [openssl-users] How to produce a nested CMS / PKCS#7 structure?

2016-11-29 Thread Dr. Stephen Henson
On Mon, Nov 28, 2016, Wim Lewis wrote: > > However, I think the other half of my problem remains: if I'm putting > another CMS object into a SignedData, AuthEnvelopedData, or other kind of > wrapper, the OCTET STRING should contain the encoding of that object's > structure (e.g. a BER-encoded Aut

Re: [openssl-users] How to produce a nested CMS / PKCS#7 structure?

2016-11-28 Thread Wim Lewis
On Nov 25, 2016, at 12:43 PM, Dr. Stephen Henson wrote: > Something like that did happen for PKCS#7 but the OCTET STRING encapsulation > is correct for CMS. Aha, and this difference is called out in RFC5652 [5.2.1]. Thanks, that clarifies things for me a little. So typically it'

Re: [openssl-users] How to produce a nested CMS / PKCS#7 structure?

2016-11-25 Thread Dr. Stephen Henson
...fields of the EnvelopedData structure... > } > } > } > } > > In other words, I have two extra, incorrect levels of encapsulation: the > OCTET STRING and the extra ContentInfo. > Something like that did happen for PKCS#7 bu

[openssl-users] How to produce a nested CMS / PKCS#7 structure?

2016-11-22 Thread Wim Lewis
I'm trying to produce nested structures, like signed-enveloped-signed data. This is explicitly described in the various RFCs, but I can't figure out how to get OpenSSL to produce valid output, and I can't find any code examples of doing this. What I'm doing (which doesn't quite work) is this: f

Re: [openssl-users] using openssl to create PKCS#7/CMS on windows

2015-02-06 Thread Jakob Bohm
On 05/02/2015 14:30, Srinivas Rao wrote: Hi All, Is there a way to use openssl to sign data using a private key (on USB token) and produce PKCS7 output on win32, if: a) the data to be signed message is not touched yet and goes as input to the solution to the answer to this problem, OR b) signa

[openssl-users] using openssl to create PKCS#7/CMS on windows

2015-02-05 Thread Srinivas Rao
Hi All, Is there a way to use openssl to sign data using a private key (on USB token) and produce PKCS7 output on win32, if: a) the data to be signed message is not touched yet and goes as input to the solution to the answer to this problem, OR b) signature is already generated, i.e message is h

Failure of CMS => PKCS#7 compatibility tests

2014-07-13 Thread Johnson, Wayne
I have been attempting to compile OpenSSL 1.0.1h on about 14 different platforms/architectures for our product. I ran into an issue with one of the unit tests on our HP-UX 11i v2 Itanium system in 64 bit mode. CMS => PKCS#7 compatibility tests signed content DER format, RSA key: OK sig

OCSP result embedded in PKCS #7

2014-01-14 Thread Laurent Debacker
Hi, I try to embed an OCSP basic response in a PKCS #7 SignedData object. When I run "openssl pkcs7 -inform DER -text -in file.p7c", I get: unable to load PKCS7 object 5024:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\as n1\tasn_dec.c:1319: 5024:error:0D0

Re: Sometimes openssl won't validate a well signed PKCS#7 data

2013-02-21 Thread Dr. Stephen Henson
On Thu, Feb 21, 2013, Dave Thompson wrote: > > From: owner-openssl-us...@openssl.org On Behalf Of Dr. Stephen Henson > > Sent: Wednesday, 20 February, 2013 19:06 > > > > > PKCS#7 and CMS are two similar standards but with a few > > subtle differences. >

RE: Sometimes openssl won't validate a well signed PKCS#7 data

2013-02-21 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Dr. Stephen Henson > Sent: Wednesday, 20 February, 2013 19:06 > On Tue, Feb 19, 2013, Ulises S. wrote: > > > There is this odd behavior in which one in many signed > files with PKCS#7 on JAVA won't > > pass

Re: Sometimes openssl won't validate a well signed PKCS#7 data

2013-02-20 Thread Dr. Stephen Henson
On Tue, Feb 19, 2013, Ulises S. wrote: > There is this odd behavior in which one in many signed files with PKCS#7 on > JAVA won't > pass the validation with Openssl, all Openssl signed data is correctly > verified in JAVA though. > > Currently I have not a test case but a

CAPI engine PKCS#7 decrypt error

2012-06-19 Thread Florian Rüchel
Hello, I have an application that decrypts an encrypted PKCS#7 structure. When I run it with keys loaded from disk, it runs perfectly, but as soon as I use engine keys from CAPI it fails with: 8244:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:.\crypto\evp\evp_enc.c

Re: pkcs#7 sign with OpenSSL

2011-12-15 Thread Dr. Stephen Henson
On Thu, Dec 15, 2011, Pietro Romanazzi wrote: > Hi, > afraid this question has been already issued but I did not find any solution > surfing the web. > I need to sign data with a RSA private key and obtain a pkcs#7 envelope with > data, signature > and certificate. > In

pkcs#7 sign with OpenSSL

2011-12-15 Thread Pietro Romanazzi
Hi, afraid this question has been already issued but I did not find any solution surfing the web. I need to sign data with a RSA private key and obtain a pkcs#7 envelope with data, signature and certificate. In the past I remember I found the solution with OpenSSL command line. Unfortunately

RE: How to do generate PKCS#7 to embedded system

2011-11-18 Thread Dave Thompson
Correcting myself for the record: > From: owner-openssl-us...@openssl.org On Behalf Of Dave Thompson > Sent: Thursday, 17 November, 2011 18:53 > As I said, I don't believe any openssl commandline > function will create a 'degenerate' (cert-only) PKCS#7, which

RE: How to do generate PKCS#7 to embedded system

2011-11-17 Thread Dave Thompson
uot;Certificate encrypted by hardware key". The certificate contains the key for your device, which is hardware (apparently); and is signed by the CA's key, which may be hardware or not (for openssl usually not). Certificates generally are NOT encrypted, and certificates in PKCS#7 defin

RE: How to do generate PKCS#7 to embedded system

2011-11-16 Thread Laerte Junior
me in PKCS#7 format; (This step that I not understand to do);3 - Store the Certificate in Flash memory (Not Implemented yet, but is not difficult) The step 2 I try to use openssl, but I not understand, because there aren't examples how to implement Certificate. Thanks for helpLaerte Juni

RE: How to do generate PKCS#7 to embedded system

2011-11-14 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Laerte Junior > Sent: Saturday, 12 November, 2011 14:22 >I'm working with embedded system project and I need to receive PKCS7 > and store the fields(DN, signature, public key, etc.). Before, I generate > a CSR to test (atta

How to do generate PKCS#7 to embedded system

2011-11-12 Thread Laerte Junior
Hi, I'm working with embedded system project and I need to receive PKCS7 and store the fields(DN, signature, public key, etc.). Before, I generate a CSR to test (attached file), but now I need to generate PKCS7 to test. How to do it? I need to generate a small PKCS7 as possible. Thanks

Re: Creating a PKCS#7 file using OpenSSL from the command line - is this possible?

2010-11-23 Thread Dr. Stephen Henson
On Tue, Nov 23, 2010, richard.folw...@barclays.com wrote: > I'm fairly comfortable now using OpenSSL from the command line for basic > operations: certificate management, encryption, decryption, signing and > verification. However I need to create encrypted and signed files to >

Creating a PKCS#7 file using OpenSSL from the command line - is this possible?

2010-11-23 Thread richard.folwell
I'm fairly comfortable now using OpenSSL from the command line for basic operations: certificate management, encryption, decryption, signing and verification. However I need to create encrypted and signed files to meet PKCS#7, and cannot find any documentation online that explains how to do

Re: Error inspecting PKCS#7 DER

2010-08-05 Thread Dr. Stephen Henson
On Thu, Aug 05, 2010, Giacomo Boccardo wrote: > I had to re-compile openssl using the flag enable-cms in order to use the > cms command. Why is it disabled by default? > It was a new feature in a stable branch of OpenSSL and due to the policy at the time new features were disabled by default. I

Re: Error inspecting PKCS#7 DER

2010-08-05 Thread Giacomo Boccardo
I had to re-compile openssl using the flag enable-cms in order to use the cms command. Why is it disabled by default? Thanks, J. Messaggio Originale Oggetto: Re: Error inspecting PKCS#7 DER Da: Dr. Stephen Henson A: openssl-users@openssl.org Data: 04/08/2010 16:30:54

Re: Error inspecting PKCS#7 DER

2010-08-04 Thread Dr. Stephen Henson
On Wed, Aug 04, 2010, Giacomo Boccardo wrote: > When I try to inspect the file in the attachment (PKCS#7, DER format) I > have the following error: > > $ openssl pkcs7 -inform DER -in cadesBES_singleCounterSignatureWithDate.p7m > unable to load PKCS7 object > 2491:error:0D06

Error inspecting PKCS#7 DER

2010-08-04 Thread Giacomo Boccardo
When I try to inspect the file in the attachment (PKCS#7, DER format) I have the following error: $ openssl pkcs7 -inform DER -in cadesBES_singleCounterSignatureWithDate.p7m unable to load PKCS7 object 2491:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1316: 2491

PKCS#7 and CMS Signed-And-Enveloped-Data command line

2010-07-01 Thread Federico Berton
Hi guys, I have to create a program following the PKCS#7 standard with Signed-And-Enveloped-Data datatype: SignedAndEnvelopedData ::= SEQUENCE { version Version, recipientInfos RecipientInfos, digestAlgorithms DigestAlgorithmIdentifiers, encryptedContentInfo EncryptedContentInfo, certificates

Re: Save a pkcs#7 structure to a file

2010-06-23 Thread Dr. Stephen Henson
On Wed, Jun 23, 2010, Federico Berton wrote: > Hi guys, I am trying to save a pkcs#7 structure with sign-and-enveloped data > to a file but I can't find the appropriate function. I know that i should > use somewhat kind of BIO. Can somebody help me? > i2d_PKCS7_bio() will w

Save a pkcs#7 structure to a file

2010-06-23 Thread Federico Berton
Hi guys, I am trying to save a pkcs#7 structure with sign-and-enveloped data to a file but I can't find the appropriate function. I know that i should use somewhat kind of BIO. Can somebody help me? Thanks in advance and sorry for my bad english. Berton Fed

Verifying PKCS#7

2010-06-08 Thread Niels Stevens
Hey I'm using this code to verify my PKCS#7 signed object and extract it from the S/MIME This code works perfectly if I test it with boost and send a mock SMIME to it. This mock up is generated with OpenSSL. But I'm trying to verify a S/MIME with the same structure that has been ge

Re: PKCS#7 extract and verify certificate?

2010-03-01 Thread Steffen DETTMER
* Eisenacher, Patrick wrote on Tue, Feb 23, 2010 at 12:30 +0100: [...] > "The selection of a trust anchor is a matter of policy: it >could be the top CA in a hierarchical PKI, the CA that >issued the verifier's own certificate(s), or any other CA in >a network PKI." > > And no, I don

Re: PKCS#7 extract and verify certificate?

2010-02-23 Thread Dr. Stephen Henson
On Mon, Feb 22, 2010, Eisenacher, Patrick wrote: > > Unfortunately, the perceived verification algorithm is a limitation in > openssl, which always wants to do path validation up to a self signed cert, > even if no revocation checking is requested. And no, there's no way to > modify its verificat

RE: PKCS#7 extract and verify certificate?

2010-02-23 Thread Eisenacher, Patrick
Hi Patrick, sorry for the bad line-breaking, but I'm stuck here with a poor msa. > -Original Message- > From: Patrick Patterson > > On February 22, 2010 09:18:25 am Eisenacher, Patrick wrote: > > > -Original Message- > > > From: Patrick Patterson > > > > > > On 12/02/10 8:51 AM, s

Re: PKCS#7 extract and verify certificate?

2010-02-23 Thread Patrick Patterson
On February 22, 2010 09:18:25 am Eisenacher, Patrick wrote: > > -Original Message- > > From: Patrick Patterson > > > > On 12/02/10 8:51 AM, skillz...@gmail.com wrote: > > > Is there a way (via the API rather than the tool) to tell > > > > OpenSSL that > > > > > the sub-CA certificate is tru

RE: PKCS#7 extract and verify certificate?

2010-02-22 Thread Eisenacher, Patrick
> -Original Message- > From: Patrick Patterson > > On 12/02/10 8:51 AM, skillz...@gmail.com wrote: > > Is there a way (via the API rather than the tool) to tell > OpenSSL that > > the sub-CA certificate is trusted and it doesn't need to > walk further > > up the chain? For my case, I embed

Re: PKCS#7 extract and verify certificate?

2010-02-12 Thread Patrick Patterson
On 12/02/10 8:51 AM, skillz...@gmail.com wrote: > Is there a way (via the API rather than the tool) to tell OpenSSL that > the sub-CA certificate is trusted and it doesn't need to walk further > up the chain? For my case, I embed the sub-CA certificate in my code > and I'm space constrained so I'd

Re: PKCS#7 extract and verify certificate?

2010-02-12 Thread skillzero
On Thu, Feb 11, 2010 at 1:31 PM, wrote: > I have a DER-encoded PKCS#7 file that I'd like to extract the > certificate from, verify that certificate against a specific sub-CA > certificate, then use the certificate's public key to verify a > signature. > > I looked at

PKCS#7 extract and verify certificate?

2010-02-11 Thread skillzero
I have a DER-encoded PKCS#7 file that I'd like to extract the certificate from, verify that certificate against a specific sub-CA certificate, then use the certificate's public key to verify a signature. I looked at the code for the pkcs7 tool and it looks directly inside the PKCS7

Re: sign digest and build pkcs#7

2010-01-28 Thread Dr. Stephen Henson
On Thu, Jan 28, 2010, Jaraba Nieto, Fernando wrote: > > > I would know if it's possible with openssl to sign a digest message, > without using the original document. If it's then I can send hash digest > to the client and receive signed hash to build pkcs#7 structure.

sign digest and build pkcs#7

2010-01-28 Thread Jaraba Nieto, Fernando
I would know if it's possible with openssl to sign a digest message, without using the original document. If it's then I can send hash digest to the client and receive signed hash to build pkcs#7 structure. Thanks a lot Fernando.

Re: PKCS#7 enveloped message

2010-01-12 Thread Dr. Stephen Henson
On Tue, Jan 12, 2010, Douglas Gemignani wrote: > This looks like a recent change in the v1.0.0 beta > *) Update PKCS#7 enveloped data routines to use new API. This is now > supported by any public key method supporting the encrypt operation. A > ctrl is added to allow th

Re: PKCS#7 enveloped message

2010-01-12 Thread Douglas Gemignani
This looks like a recent change in the v1.0.0 beta *) Update PKCS#7 enveloped data routines to use new API. This is now supported by any public key method supporting the encrypt operation. A ctrl is added to allow the public key algorithm to examine or modify the PKCS#7

Re: PKCS#7 enveloped message

2010-01-12 Thread Dr. Stephen Henson
On Tue, Jan 12, 2010, Douglas Gemignani wrote: > Hello, > > I need to generate a pkcs#7 certificate with a enveloped message > inside it. As far as I understand this message (X509) will be > encrypted with a random generated TDES key. > This is my snippet, but it is still i

PKCS#7 enveloped message

2010-01-12 Thread Douglas Gemignani
Hello, I need to generate a pkcs#7 certificate with a enveloped message inside it. As far as I understand this message (X509) will be encrypted with a random generated TDES key. This is my snippet, but it is still incomplete and some comments regarding my doubts, I hope someone could help me

Re: S/MIME pkcs#7 read from membuf problem

2009-04-10 Thread Anton D Kachalov
Ger Hobbelt wrote: What may have impact here is that a memory s/s BIO does not act like a file BIO by default. To get the same behaviour (at end-of-data == End of File), you should add the call BIO_set_mem_eof_return(pio, 0); after the line pio = BIO_new(BIO_s_mem()) to ensure y

Re: S/MIME pkcs#7 read from membuf problem

2009-04-09 Thread Ger Hobbelt
ular EOF signal when the memory buffer has been read in its entirety. On Thu, Apr 9, 2009 at 12:59 PM, Anton D Kachalov wrote: > Good day! > > I have problem with reading S/MIME PKCS#7 container from membuf. I've got > "not enough data" error in ASN parsing routine (asn1_d

S/MIME pkcs#7 read from membuf problem

2009-04-09 Thread Anton D Kachalov
Good day! I have problem with reading S/MIME PKCS#7 container from membuf. I've got "not enough data" error in ASN parsing routine (asn1_d2i_read_bio). I have sign & crypt zip file (430kb) with S/MIME PKCS#7 within PHP. Then I wrote a small application to decrypt & ve

PKCS#7 SignedData and multiple digest algorithms

2009-03-10 Thread John Firebaugh
Hi, I'm investigating upgrading the applications I'm responsible for from SHA1 as the default PKCS#7 SignedData digest algorithm to stronger digests such as SHA256, in ways that preserve backwards compatibility for signature verifiers which do not support digest algorithms other than SH

PKCS#7 symmetric keys

2009-02-16 Thread Carl Young
Hi all, With OpenSSL, can I create PKCS#7 CMS messages just using a pre-shared symmetric key? I just need to package the secret with its encryption algorithm identifier, and the PKCS#7 envelope looks ideal for this. The only additional data that I may wish to add to the message may be the

Newbie certificate problem (using PKCS#7 in Apache)

2008-08-10 Thread Jeffrey Lyon
All, I have what is probably going to be an extremely newbie issue/question. I have a customer moving to us who uses Apache Tomcat with a PKCS#7 certificate and an accompanying .key file which looks rather foreign to me. Personally, i've never dealt with anything outside of the "pla

Re: Can OpenSSL parse SHA-2 within PKCS#7 objects?

2008-08-04 Thread Dr. Stephen Henson
On Mon, Aug 04, 2008, Travis wrote: > I've been trying to get OpenSSL to parse PKCS#7 objects made with > BouncyCastle, which uses SHA-2 hashes in it. > > However, I haven't had much luck. I know that OpenSSL has support for > SHA-2 directly, but I think the ASN.1 pa

Can OpenSSL parse SHA-2 within PKCS#7 objects?

2008-08-04 Thread Travis
I've been trying to get OpenSSL to parse PKCS#7 objects made with BouncyCastle, which uses SHA-2 hashes in it. However, I haven't had much luck. I know that OpenSSL has support for SHA-2 directly, but I think the ASN.1 parser is blowing up on the particular NID/OID for SHA-2 hashes. D

PKCS#7

2008-07-25 Thread earthworm
Hello, Anybody know how I can extract the certificates from a chained PKCS#7 file? I can't seem to find the part of the API that deals with this, although I can find lots of references to the command line program that does it. Thanks,

Re: No NID for SHA2 (was Re: unable to verify PKCS#7 objects signed with BC(CMS))

2008-05-29 Thread Victor Duchovni
On Wed, May 28, 2008 at 02:23:44PM -0500, [EMAIL PROTECTED] wrote: > On Tue, May 27, 2008 at 03:23:27PM -0500, [EMAIL PROTECTED] wrote: > > So a developer at my company is having a problem. > > > > When our business partner signs a data object using Bouncy Castle > >

No NID for SHA2 (was Re: unable to verify PKCS#7 objects signed with BC(CMS))

2008-05-29 Thread travis+ml-users
On Tue, May 27, 2008 at 03:23:27PM -0500, [EMAIL PROTECTED] wrote: > So a developer at my company is having a problem. > > When our business partner signs a data object using Bouncy Castle > (PKCS#7 CMS), outputs PEM, and we use OpenSSL and read it in, that > works fine, but whe

unable to verify PKCS#7 objects signed with BC(CMS)

2008-05-27 Thread travis+ml-users
So a developer at my company is having a problem. When our business partner signs a data object using Bouncy Castle (PKCS#7 CMS), outputs PEM, and we use OpenSSL and read it in, that works fine, but when we try to get the data out of it, we're getting a null string. My hunch is

Re: PKCS#7 Api's help (Plz help me)

2008-04-09 Thread shankar ks
hat file ( I signed the file using > RSA_sign) > > funtion. ). once the file is signed I need to envelope the file as a CMS > > package. > > > > So Could any one who has prior knowledege on usage of pkcs function , > please > >

Re: PKCS#7 Api's help (Plz help me)

2008-04-09 Thread Patrick Patterson
o envelope the file as a CMS > package. > > So Could any one who has prior knowledege on usage of pkcs function , please > help me how to do this signing and verification . > If possible please give me the link

PKCS#7 Api's help (Plz help me)

2008-04-09 Thread shankar ks
e the links where I can get data on these PKCS#7 funtions .. please help me , -- --Best Regards Shankar

pkcs#7 Api's in openssl

2008-04-08 Thread shankar ks
pkcs funtions (any document or pdf or examples of signin, encryption , compression.) .. and source which explains the usage of PKCS#7 API's in openssl... -- --Best Regards Shankar

interop between OpenSSL PKCS#7 (v1.5) and BC (CMS)

2008-03-06 Thread travis+ml-openssl
So I've got to interchange data with a Java-based environment. I believe their choice of libraries is with Bouncy Castle, which IIUC implements a newer version of PKCS#7 called CMS. We only have OpenSSL, which uses PKCS#7 v1.5.. Does anyone have experience with these kinds of situations

PKCS#1 and PKCS#7

2008-03-06 Thread Jaraba Nieto, Fernando
We have singed a digest with RSA_sing and we have an PKCS#1. We need to transform from the PKCS#1 to a PKCS#7. ¿Do you know how to transform the PKCS#1 to a PKCS#7? Thank you. Fernando.

PKCS#7 streaming in smime utility

2007-12-20 Thread Harald Latzko
Hello, I've read the following in the latest CHANGES file of the openSSL 0.9.9 snapshot 20071220: *) Add option -stream to use PKCS#7 streaming in smime utility. New function i2d_PKCS7_bio_stream() and PEM_write_PKCS7_bio_stream() to output in BER and PEM format. Does this

Re: PKCS#7 without certificates??

2007-10-17 Thread Michael Sierchio
[EMAIL PROTECTED] wrote: I've a problem. I need to cypher a buffer of bytes with pkcs7 format but I can't use certificates,i need encrypt using only a key or password. I have searched but I do not find anything to do it. Read the syntax for PKCS#7: ftp://ftp.rsasecuri

Re: PKCS#7 without certificates??

2007-10-17 Thread Goetz Babin-Ebell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: > Hello all!! Hello Lidia, > I've a problem. I need to cypher a buffer of bytes with pkcs7 format but > I can't use certificates,i need encrypt using only a key or password. Are you really sure PKCS#7

Re: PKCS#7 without certificates??

2007-10-17 Thread Jorge Fernandez
2007/10/17, [EMAIL PROTECTED] <[EMAIL PROTECTED] >: > > Hello all!! > > I've a problem. I need to cypher a buffer of bytes with pkcs7 format > but I can't use certificates,i need encrypt using only a key or > password. > > I have searched but I do not find anything to do it. > > I work with c, and

PKCS#7 without certificates??

2007-10-17 Thread lidia . fernandez
Hello all!! I've a problem. I need to cypher a buffer of bytes with pkcs7 format but I can't use certificates,i need encrypt using only a key or password. I have searched but I do not find anything to do it. I work with c, and the function PKCS7_encrypt() needs certificates...There is so

pkcs#7 structure with existing signature value

2007-07-30 Thread Christian Wiesbauer
Hello, I hope someone can help. I have an existing signature which was made with a smartcard. So, how can I create a valid pkcs#7 structure which contains this signature value. I appreciate any thoughts, references, samples or other help! Thanks and best regards Christian Wiesbauer

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

2007-06-26 Thread estante23-openssl
Hello, I wasn't able to get a PKCS #7 file using the dgst and rsautl command. So now I'm trying with the smime command. However, I´m doing something wrong since I get "Error reading S/MIME message" because the file I want to sign is not in SMIME format (I suppose). Is there a

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

Filling a PKCS#7 structure

2007-06-19 Thread Wockenfuß , Frank
Hi there, I have a problem to fill a PKCS#7 (or CMS) structure and I can't find any hints on the web so I hope someone in this group can help. How to read or write a PKCS7 file programatically I have managed, but I have the following problem: I have a digital signature of a document done

How to extract message digest from PKCS #7 signature

2006-12-13 Thread Grant Mills
All, Is there a way to simply extract the message digest from a PKCS #7 signature? Here is a little back ground to hopefully explain the context. We have separate data and signature. In order to reduce memory requirements, we'd like to generate our digest while we decompress the

Re: converting PKCS #7 data from BER to DER

2006-08-25 Thread Benjamin Sergeant
The post process would be done by the signer (on his machine with all the credential availables), with the key present. If this can be done inside PKCS_sign, or during the same session. I don't want this re-encoding to be particulary a post-process, just want it to be done anytime, of course ...

Re: converting PKCS #7 data from BER to DER

2006-08-25 Thread Michael Sierchio
Benjamin Sergeant wrote: I'd like to know how to proceed (is it doable) to convert a PKCS #7 data (made with PKCS7_sign, flag = PKCS7_BINARY | PKCS7_DETACHED;) with several cert (the one from the signer) and a chain of cert, from BER to DER encoding. Is the decryption key present to sig

converting PKCS #7 data from BER to DER

2006-08-25 Thread Benjamin Sergeant
Hi, I'd like to know how to proceed (is it doable) to convert a PKCS #7 data (made with PKCS7_sign, flag = PKCS7_BINARY | PKCS7_DETACHED;) with several cert (the one from the signer) and a chain of cert, from BER to DER encoding. I have another one PKCS #7 data which was made with the

Re: PKCS#7

2006-01-17 Thread Rabellino Sergio
Bernhard Froehlich wrote: [EMAIL PROTECTED] wrote: Hi! I need to convert PKCS#7 attached signatures to PKCS#7 detached signatures. Is it possibly? Is there any example? Thanks anyway! Since noone else answered I'll thay the little I believe to know about the subject... ;) I

Re: PKCS#7

2006-01-17 Thread Dr. Stephen Henson
On Tue, Jan 17, 2006, Bernhard Froehlich wrote: > [EMAIL PROTECTED] wrote: > > > > >Hi! > > > >I need to convert PKCS#7 attached signatures to PKCS#7 detached > >signatures. > > > >Is it possibly? Is there any example? > > > >Thanks

Re: PKCS#7

2006-01-17 Thread Bernhard Froehlich
[EMAIL PROTECTED] wrote: Hi! I need to convert PKCS#7 attached signatures to PKCS#7 detached signatures. Is it possibly? Is there any example? Thanks anyway! Since noone else answered I'll thay the little I believe to know about the subject... ;) I don't think doing this i

PKCS#7

2006-01-15 Thread milivoj . fradelic
Hi! I need to convert PKCS#7 attached signatures to PKCS#7 detached signatures. Is it possibly? Is there any example? Thanks anyway!

Re: attribute certificate in PKCS#7 (CMS)

2005-11-23 Thread Nikolay Elenkov
Nikolay Elenkov wrote: > I am trying to patch the PKCS#7 code to (partially) handle CMS ver 3. > What I need is to parse a CMS structure that has an attribute > certificate in the certificates field of SignedData. > ... > > typedef struct certificate_choices_st { >

attribute certificate in PKCS#7 (CMS)

2005-11-22 Thread Nikolay Elenkov
Hello, I am trying to patch the PKCS#7 code to (partially) handle CMS ver 3. What I need is to parse a CMS structure that has an attribute certificate in the certificates field of SignedData. The relevant defintions from RFC 2630 are: SignedData ::= SEQUENCE { version CMSVersion

  1   2   >