PKCS7_TEXT with PKCS7_NOVERIFY | PKCS7_NOSIGS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PKCS7_TEXT with PKCS7_NOVERIFY | PKCS7_NOSIGS

Chevalier, Victor T.
Hello,
I am trying to obtain a MIME version of an S/MIME message...I can sign
and verify e-mail messages with the libraries provided.  However when I
don't want to verify and I just want to receive the text with MIME
headers, it fails.  It works fine when there is a valid certificate, but
if I don't have a valid certificate/or don't use a certificate, it
returns 0.  I just want to view it in NON-S/MIME I am not concerned
about the signature, because that works...

Here is the function I am trying to use:
cout << PKCS7_verify(pkcs7, NULL, NULL, pkcs7BIO, outBIO,
PKCS7_NOVERIFY|PKCS7_NOSIGS|PKCS7_TEXT) <<endl;

I get the following errors from ERR:
SMIME_text:invalid mime type: pk7_mime.c:348:type: multipart/mixed
PKCS7_verify:smime text error:pk7_smime.c:250
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: PKCS7_TEXT with PKCS7_NOVERIFY | PKCS7_NOSIGS

Dr. Stephen Henson
On Tue, Jan 31, 2006, Chevalier, Victor T. wrote:

> Hello,
> I am trying to obtain a MIME version of an S/MIME message...I can sign
> and verify e-mail messages with the libraries provided.  However when I
> don't want to verify and I just want to receive the text with MIME
> headers, it fails.  It works fine when there is a valid certificate, but
> if I don't have a valid certificate/or don't use a certificate, it
> returns 0.  I just want to view it in NON-S/MIME I am not concerned
> about the signature, because that works...
>
> Here is the function I am trying to use:
> cout << PKCS7_verify(pkcs7, NULL, NULL, pkcs7BIO, outBIO,
> PKCS7_NOVERIFY|PKCS7_NOSIGS|PKCS7_TEXT) <<endl;
>
> I get the following errors from ERR:
> SMIME_text:invalid mime type: pk7_mime.c:348:type: multipart/mixed
> PKCS7_verify:smime text error:pk7_smime.c:250

As the docs say PKCS7_TEXT expects text headers. If you that isn't true don't
use that flag.

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: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: PKCS7_TEXT with PKCS7_NOVERIFY | PKCS7_NOSIGS

Chevalier, Victor T.
In reply to this post by Chevalier, Victor T.
The headers are text...and it works when there is a certificate present
and I do a normal verify, but when I just want to spit it out, no
go...any ideas?

Victor
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dr. Stephen Henson
Sent: Tuesday, January 31, 2006 2:02 PM
To: [hidden email]
Subject: Re: PKCS7_TEXT with PKCS7_NOVERIFY | PKCS7_NOSIGS

On Tue, Jan 31, 2006, Chevalier, Victor T. wrote:

> Hello,
> I am trying to obtain a MIME version of an S/MIME message...I can sign
> and verify e-mail messages with the libraries provided.  However when
I
> don't want to verify and I just want to receive the text with MIME
> headers, it fails.  It works fine when there is a valid certificate,
but

> if I don't have a valid certificate/or don't use a certificate, it
> returns 0.  I just want to view it in NON-S/MIME I am not concerned
> about the signature, because that works...
>
> Here is the function I am trying to use:
> cout << PKCS7_verify(pkcs7, NULL, NULL, pkcs7BIO, outBIO,
> PKCS7_NOVERIFY|PKCS7_NOSIGS|PKCS7_TEXT) <<endl;
>
> I get the following errors from ERR:
> SMIME_text:invalid mime type: pk7_mime.c:348:type: multipart/mixed
> PKCS7_verify:smime text error:pk7_smime.c:250

As the docs say PKCS7_TEXT expects text headers. If you that isn't true
don't
use that flag.

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: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: PKCS7_TEXT with PKCS7_NOVERIFY | PKCS7_NOSIGS

Dr. Stephen Henson
On Tue, Jan 31, 2006, Chevalier, Victor T. wrote:

> The headers are text...and it works when there is a certificate present
> and I do a normal verify, but when I just want to spit it out, no
> go...any ideas?
>

Well the error messages suggests it is type multipart/mixed.

Does the "smime" utility do the same?

Can you post an example message?

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: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]