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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:16:53+00:00 2026-06-17T16:16:53+00:00

I want to create an X509 certificate for testing purposes. This certificate has to

  • 0

I want to create an X509 certificate for testing purposes. This certificate has to be shared by 3 developers on their local machines (i.e. all share the same certificate so we can use the same thumbprint).

So the private key in this certificate has to be exportable.

I create a certificate with the following command:

makecert -r -pe -n "CN=mytestsite.local" -b 01/01/2000 -e 01/01/2036 -ss my -sr localMachine -sky exchange localhost.cer

This certificate works fine, but the trouble is that the isValid argument has to be false when calling Certificates.Find…

        var store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
        store.Open(OpenFlags.ReadOnly);

        var cert = store.Certificates.Find(
                                X509FindType.FindByThumbprint,
                                Config.PdfCertificateThumbprint, 
                                false  //********************* This has to be false.
                              ).OfType<X509Certificate>().FirstOrDefault();

As soon as I set that IsValid property to True, my certificate is no longer returned by the Find method. Why would makecert generate an “invalid” certificate? Or how do I figure out why the certificate is deemed invalid?

  • 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-17T16:16:54+00:00Added an answer on June 17, 2026 at 4:16 pm

    Well, it’s because it’s not issued by a “Trusted Certificate Authority” like the “real” ssl certificates used on the internet. (for example issued by VeriSign)

    What you can do locally to work is to add the certificate manually in the Trusted Certificates for your user and/or local machine. But this procedure must be done for everyone using it until you will obtain a valid SSL certificate issued by a CA (certificate authority).

    But your question points to the scenario where it’s for dev purposes only so what you can do is either manually add the certificate to Trusted or you can override the certificate validation mechanism in .Net and write code that will consider your certificate valid.

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

Sidebar

Related Questions

i want create Dynamic Slideshow in Jquery i'm Write this code var ctx =
I want create a pdf using iText. The method which does this is a
I want create texture atlas(matrix of images) from multiple images.Is their any applescript that
I want to create a self-signed-certificate in PHP 5.x. with my own (alternative) openssl
I'm creating a X509 certificate using OpenSSL and objective-c. I want to add some
I've generate a self-signed certificates(X509 certificate) and want to use the private key to
I want create a command that has the following structure command path/to/some/file How do
I want create subdomains like this: domain.com/type/city An examples: domain.com/restaurants/new_york domain.com/hotels/new_york domain.com/restaurants/chicago I have
I have a C/C++ application and I need to create a X509 pem certificate
i want create jqGrid like this I could divid body jqGrid i write this

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.