Questions tagged [x509certificate]

X509Certificate is the name of .NET and Java classes for handling X.509 certificates.

X509Certificate is a class for handling X.509 certificates in .NET (MSDN Entry) and in Java (Javadoc).

3174 questions
45
votes
4 answers

How to retrieve all certificates in your X509Store

I am using the following code to retrieve all certificates in my PC from an asp.net webapp. The certificates collection is empty, and I can't understand why. I tried impersonating my own user account and I didn't succeed as well. What am I doing…
Pablo
  • 2,054
  • 8
  • 30
  • 56
43
votes
3 answers

How to create a snk from pfx / cer?

Microsoft seems to have created a certification jungle, that is hard to understand. Microsoft X.509 certificate (.cer) Personal Information Exchange (.pfx) Assembly Signature Key Attribute (.snk) Would it be advisable to create an snk file…
Houman
  • 64,245
  • 87
  • 278
  • 460
41
votes
11 answers

Kubernetes: expired certificate

Our Kubernetes 1.6 cluster had certificates generated when the cluster was built on April 13th, 2017. On December 13th, 2017, our cluster was upgraded to version 1.8, and new certificates were generated [apparently, an incomplete set of…
NoobSkywalker
  • 646
  • 1
  • 5
  • 10
40
votes
11 answers

PEM routines:PEM_read_bio:bad end line

I'm trying to parse the developer certificate in embedded.mobileprovision file. Firstly I use security cms -D -i embedded.mobileprovision to get the base64 developer certificate string. Then I split the string every 64 characters and stored in a…
sunnycomes
  • 577
  • 2
  • 5
  • 12
40
votes
2 answers

Is it possible to programmatically generate an X509 certificate using only C#?

We're trying to generate an X509 certificate (including the private key) programmatically using C# and the BouncyCastle library. We've tried using some of the code from this sample by Felix Kollmann but the private key part of the certificate…
Tom Robinson
  • 8,348
  • 9
  • 58
  • 102
40
votes
20 answers

Docker pull error : x509: certificate has expired or is not yet valid

Description of problem: I'm trying to pull ubuntu from the public registry with this command : docker pull ubuntu And then i got this results (the previous command was working yesterday) : "Error while pulling image: Get…
39
votes
6 answers

Associate a private key with the X509Certificate2 class in .net

I'm working on some code that creates a X509certificate and a public/private key pair. The public key is added to the certificate and it is sent to an CA which signs it. The returned certificate is then accessed through the …
PogoMips
  • 3,497
  • 8
  • 27
  • 34
35
votes
3 answers

add or create 'Subject Alternative Name' field to self-signed certificate using makecert

How can I create a certificate using makecert with a 'Subject Alternative Name' field ? You can add some fields eg, 'Enhanced Key Usage' with the -eku option and I've tried the -san option but makecert doesn't like it. This is a self-signed…
wal
  • 17,409
  • 8
  • 74
  • 109
35
votes
7 answers

'MANAGE PRIVATE KEYS' option missing

I'm developing WCF service with Transport Security hosted on IIS 7.5 under Windows 2008R2. I have a certificate, generated in IIS 7.5 which is stored in Local folder. When I use BasicHttpBinding or WSHttpBinding with Transport Security - everything…
Alex
  • 8,827
  • 3
  • 42
  • 58
33
votes
4 answers

Is serial number a unique key for X509 certificate?

Is certificate serial number a unique key for X509 certificate? User selects a certificate, and program stores serial number in preferences. Will the following code return the selected certificate? public static X509Certificate2…
isobretatel
  • 3,812
  • 7
  • 34
  • 49
33
votes
1 answer

What account does IIS Express run under?

I need to get my dev machine to read a certificate from the local machine store to do this I need to run winhttpcertcfg.exe and specify the account I want to elevate What would this account be for IIS express? (For IIS it would be the…
ChrisCa
  • 10,876
  • 22
  • 81
  • 118
31
votes
5 answers

WindowsCryptographicException: Keyset does not exist

I want to create or obtain a certificate, create a pfx-file, load it and have IdentityServer use it. However, IdentityServer is not able to use my pfx. How to successfully create a pfx and have IdentityServer use it? I have an IdentityServer4 web…
Erlend
  • 341
  • 1
  • 3
  • 5
31
votes
2 answers

What is the right way to send a client certificate with every request made by the resttemplate in spring?

i want to consume a REST service with my spring application. To access that service i have a client certificate (self signed and in .jks format) for authorization. What is the proper way to authenticate against the rest service? This is my…
30
votes
7 answers

X509Certificate.CreateFromCertFile - the specified network password is not correct

I have a .NET application that I want to use as a client to call an SSL SOAP web service. I have been supplied with a valid client certificate called foo.pfx. There is a password on the certificate itself. I've located the certificate at the…
p.campbell
  • 98,673
  • 67
  • 256
  • 322
30
votes
7 answers

how to install CA certificate programmatically on Android without user interaction

I'm trying to install certificates without prompting the user. I know this is not good practice, but that's what PM wants. Using KeyChain.createInstallIntent(), I can get Android to launch the certificate installation dialog by calling…
Pedro
  • 443
  • 1
  • 4
  • 7