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 6908003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:30:21+00:00 2026-05-27T08:30:21+00:00

I have the whole mail as a string which is encrypted and signed. By

  • 0

I have the whole mail as a string which is encrypted and signed.

By Default in outlook express if the receiver does not have the public certificate of the sender then the
public certificate is extracted from the mail and stored into the certificate manager. so later on we can reply to that mail which will also go as encrypted and signed

I want to achieve the same functionality using c#.

How do I extract the public certificate from the text of the mail and store it into the certificate manager?

  • 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-05-27T08:30:22+00:00Added an answer on May 27, 2026 at 8:30 am

    It is going to depend on the type of signature used, but if you know where the email ends and where the signature portion of the email starts, then you should be able to parse this information using a class from .NET named System.Security.Cryptography.Pkcs.SignedCms.

    A pseudo-code example of what this may look like… I made a couple assumptions that we can discuss further if needed. The function references expect things to be done behind them. we can discuss what would be needed in those methods further if needed.

    var rawEmailBytes = pseudo_GetRawEmail();  // function that gets the raw email
    var signedCmsBytes = psuedo_GetSignedCmsData(rawEmailBytes)   // would pull out the signed package bytes from the email
    var signedCms = new SignedCms();
    signedCms.Decode(signedCmsBytes)
    
    foreach (var certificate in signedCms.Certificates) {
       psuedo_StoreCertificate(certificate)   // store certificate using the cert manager.
    }
    

    There is no guarantee that the certificate will be stored in this collection as it is optional that the certificate be included in the signature package. Add a note if you would like to discuss further.

    Also, if you would like to see the RFC on this signature type you can read at URL http://www.ietf.org/rfc/rfc3852.txt. Specifically look at the Signed Data type, starting in section 5.1

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

Sidebar

Related Questions

I have a cron which generates the whole mail info and puts in a
We have a whole catalogue of videos which we would like to stream to
I have a whole bunch of projects which I want to reuse between the
I'm not writing a mail application, so I don't have access to all the
I have a variable temp : String temp = Ms Abc`<abc@gmail.com`>;Mr Cde`<cde@mail.com`>;Miss Xyz`<xyz@mail.com`>; Now
I have whole bunch of <div class=productlistname><a href=#>The Text!</a></div> . What I want to
We have a whole bunch of DLLs that give us access to our database
I have a whole bunch of files with filenames using our lovely Swedish letters
We have a whole bunch of queries that search for clients, customers, etc. You
I have the whole MVC-Model set up and use HTML views as templates. But

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.