Questions tagged [x509certificate2]

.NET Class for handling X.509 Certificates

792 questions
12
votes
1 answer

The request was aborted: Could not create SSL/TLS secure channel

Possible Duplicate: The request was aborted: Could not create SSL/TLS secure channel I am trying to send a http request with a client side certificate. The file, in this case a .p12 file. However when it reaches the line responseStream =…
Rutger
  • 1,113
  • 3
  • 10
  • 28
11
votes
2 answers

How do I get the X509Certificate sent from the client in web service?

Apparently I was asking the wrong question in my earlier post. I have a web service secured with a X.509 certificate, running as a secure web site (https://...). I want to use the client's machine certificate (also X.509) issued by the company's…
DaveN59
  • 3,286
  • 8
  • 36
  • 49
11
votes
3 answers

Exporting X.509 certificate WITHOUT private key

I thought this would be straightforward but apparently it isn't. I have a certificate installed that has a private key, exportable, and I want to programmatically export it with the public key ONLY. In other words, I want a result equivalent to…
Aaronaught
  • 115,846
  • 24
  • 251
  • 329
11
votes
7 answers

DOD Common Access Card (CAC) Authentication

I have figured out all the necessary steps to get DOD CAC card based client certificate authentication working in Apache, but am now struggling to pull a good GUID for the user from the certificate I am receiving. Is there a GUID available on the…
Jim
11
votes
1 answer

.NET Core X509Certificate2 usage (under Windows/IIS, Docker, Linux)

I am really trying a long time to use certificates in .NET Core API. Basically where I need to use them is in a .NET Core web api running on IIS and docker. Certificates I need to use are for: Microsoft.AspNetCore.DataProtection public void…
monty
  • 5,629
  • 11
  • 44
  • 74
11
votes
3 answers

Client certificate not getting added to the request (Certificate Verify)

I'm trying to do a simple GET request to an external production server with a client certificate. They have added our certificate to their server, and I have successfully made requests through Postman (both the Chrome app and the Windows native app)…
Aske B.
  • 5,790
  • 7
  • 34
  • 58
11
votes
3 answers

EncryptedXml DecryptDocument method error after .Net framework update

I have an old function written in 2013 that decrypt xml that was encrypted by another program. The code is realy simple public static void Decrypt(XmlDocument Doc) { // Check the arguments. if (Doc == null) …
11
votes
3 answers

X509Certificate2 - the system cannot find the path specified

I wish to get the data of Google analytics via service account. When I launch first time the application, everything works correctly and I have access to the data. But When I launch second time the application I have the following error which…
user2285964
  • 111
  • 1
  • 1
  • 4
10
votes
4 answers

read client certificate from httprequest C#

I am trying to read an X509 certificate using Request.ClientCertificate but nothing is returned. The certificate is definitely being attached to the request because I can get the certificate information from the page sending the request. I have…
Sean
  • 1,422
  • 3
  • 12
  • 19
10
votes
2 answers

Should I dispose of X509Certificate2?

I'm using IdentityServer4 and I want to load signing certificate from file. For example, var certificate = new X509Certificate2( path, password, X509KeyStorageFlags.EphemeralKeySet); services.AddIdentityServer() …
10
votes
2 answers

Why does X509Certificate2 sometimes fail to create from a blob?

I have an ASP.NET web service which is receiving a byte array representing the contents of a .pfx file containing an X.509 certificate. The server-side code is using the System.Security.Cryptography.X509Certificate2 constructor to load the…
jlew
  • 10,052
  • 1
  • 30
  • 55
10
votes
3 answers

Certutil asking to connect a Smart Card

I am trying to run certutil -repairstore and keep getting prompted for a smart card. This is a VM on AWS and a smart card is not an option. Any thoughts on how to bypass the smart card and get the repair to complete are appreciated
10
votes
1 answer

Powershell "X509Certificate2Collection" Exception calling "Import" with "3" argument(s): "Cannot find the requested object

I have the below piece of code to download cert from Azure Key Vault. $secretName = "TestCert" $kvSecret = Get-AzureKeyVaultSecret -VaultName $vaultName -Name $certificateName $kvSecretBytes =…
10
votes
4 answers

Prevent file creation when X509Certificate2 is created?

We create a X509Certificate2 object in our ASP.NET app to make periodic outgoing connections. Every time one of these certificates is created a new file is created in: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys That folder now has 4 million…
DougN
  • 4,917
  • 11
  • 54
  • 77
10
votes
1 answer

Offline revocation mode

My question is similar to this question. I am trying to check revocation list only using the local CRL. I am using X509Chain.Build() with the following parameters: var chainMachine = new X509Chain(true); …
user844541
  • 2,698
  • 3
  • 29
  • 53
1 2
3
52 53