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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:10:32+00:00 2026-06-01T08:10:32+00:00

I am loading a certificate from string like this: public static void Test() {

  • 0

I am loading a certificate from string like this:

public static void Test()
{
    byte[] arrayCertificate;
    arrayCertificate = Convert.FromBase64String("CERT_STRING");
    X509Certificate2 clientCertificateFromXml = new X509Certificate2(arrayCertificate);
    Console.Write(clientCertificateFromXml);
    Console.ReadKey();
}

But this certificate doesn’t have a “Subject Unique Identifier”
Take a look at this:

http://en.wikipedia.org/wiki/X.509 (The part of Structure of a certificate)

And I want to know how can I read that value from my .NET code (I looked that I can get SerialNumber, Thumbprints and others but there is no Subject UID anywhere).

Also, I will really appreciate If anyone can share an openssl command to include this UID for the certificate 🙂 (pfx one)

  • 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-01T08:10:34+00:00Added an answer on June 1, 2026 at 8:10 am

    And I want to know how can I read that value from my .NET code

    IIRC this is not exposed in the .NET BCL, either from X509Certificate or the newer (better but still incomplete) X509Certificate2.

    But you can use Mono.Security assembly (or just the code you want from it), from the Mono project. It’s open source, MIT.X11 licensed and it includes it’s own X509Certificate.

    This version expose just about everything in X.509 certificates, including a SubjectUniqueIdentifier property.

    I will really appreciate If anyone can share an openssl command to include this UID for the certificate

    I do not recall for openssl… but you can use the X509CertificateBuilder from Mono.Security to create your own certificates. See Mono’s makecert tool source code for an example.

    Disclaimer: I wrote the code 🙂

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

Sidebar

Related Questions

while loading getfptex(got it from CTAN) batch file ,when i'm extracting this batch file
In C# i'm loading X509Certificate2 objects from an X509Store initialized like so: X509Store store
I have a task of loading and parsing a given certificate file (or a
After loading a PHP template (using jQuery's load function), this simple script won't make
After loading a reference to an assembly with something like: import clr clr.AddRferenceToFileAndPath(r'C:\foo.dll') How
After loading dynamic content to a DIV, I'd like to add a Close option,
When loading up a solution in VS2008 I get this message: An error was
I am programatically loading a certificate into a default keystore with the following code
Loading multiple child forms from a loop into a MDI parent form. They are
When loading an image from the web I am getting a black screen. I

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.