Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8652305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:16:44+00:00 2026-06-12T14:16:44+00:00

I have a certificate C.pfx that was given to me to work with OpenSSL.

  • 0

I have a certificate C.pfx that was given to me to work with OpenSSL. The certificate C.pfx has the following Certification path: C->B->A

I converted C.pfx to PEM using the following command:
openssl pkcs12 -in C.pfx -out C.pem -nodes — WORKS OK

I opened the certificate C.pem in the file editor and see that it has both RSA PRIVATE KEY and CERTIFICATE parts.

I also see both A and B certificates installed under Trusted Roor Certification Athorities store in Windows XP.

The goal is to sign, encrypt, decrypt and verify a test file using OpenSSL for Windows version 1.0.1c (it’s currently the latest version)

I use the following commands:

–TO SIGN–

openssl smime -sign -signer C.pem -in test.txt -out test.tmp    -- WORKS OK

–TO ENCRYPT–

openssl smime -encrypt -in test.tmp -out test.enc C.pem     -- WORKS OK

–TO DECRYPT–

openssl smime -decrypt -in test.enc -recip C.pem -inkey C.pem -out test1.tmp    -- WORKS OK

–TO VERIFY–

openssl smime -verify -in test1.tmp -CAfile "C.pem" -out notes1.txt -- FAILS

I used MMC console to export B and A certificates to CER files and then converted them to PEM using OpenSSL. After that I tried the following 2:

openssl smime -verify -in test1.tmp -CAfile "A.pem" -out notes1.txt -- FAILS

openssl smime -verify -in test1.tmp -CAfile "B.pem" -out notes1.txt -- FAILS

All 3 attempts to VERIFY failed with the following error:

Verification failure
3672:error:21075075:PKCS7 routines:PKCS7_verify:certificate verify error:.\crypt
o\pkcs7\pk7_smime.c:342:Verify error:unable to get local issuer certificate

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:16:45+00:00Added an answer on June 12, 2026 at 2:16 pm

    When you use openssl smime -verify openssl attempts to verify that the certificate it is to use is trusted by checking its signature (that’s the signature in the certificate, not the signature in the signed message that you asked to verify). To do that it has to have a copy of the certificate for the key of the CA that issued the certificate.

    The -CAfile parameter is used to pass the name of the file containing that CA certificate, NOT the certificate of the key used to sign the message. You would specify the certficiate of the key used to sign the message with a -certfile parameter … but in your case the certificate will be in the test.tmp file (you can suppress that by specifying -nocerts when you sign the message).

    To suppress the checking of the key certificate when verifying a message you can supply the -noverify parameter to the verify command (though openssl smime -verify -noverify does look a bit weird).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a certificate using the following SSL command: makecert -r -pe -n
I have obtained a certificate by a trusted authority (have been given a .pfx
I have the following .Net code (asp.net) for sign using client certificate. I have
I have a PFX certificate which I use to read encrypted email in outlook.
I have certificate created using java class CertAndKeyGen and X500Name and I am able
I have a certificate in der format, from it with this command I generate
I have to deploy a software to n clients that will install a certificate
I have a table that have a Certificate # column and a Plan-Phase column,
I have bundled a pfx certificate within an application for a user, however now
I have two certificates that I saved to disk. One is a certificate with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.