x509certificate

How to create and install X.509 self signed certificates in Windows 10 without user interaction?

柔情痞子 提交于 2019-11-30 19:08:21
The problem Create and install temporary certificates to sign code in my development environment. This has to be done with an unattended script (without user interaction). The legacy script Right now, I have this script that creates the certificates using the deprecated tool makecert : makecert -r -pe -n "CN=My CA" -ss CA -sr CurrentUser -a sha256 -cy authority -sky signature -sv MyCA.pvk MyCA.cer certutil -user -addstore Root MyCA.cer certutil -addstore Root MyCA.cer makecert -pe -n "CN=My Company" -a sha256 -cy end -sky signature -ic MyCA.cer -iv MyCA.pvk -sv MySPC.pvk MySPC.cer pvk2pfx.exe

C# SSL server mode must use a certificate with the corresponding private key

感情迁移 提交于 2019-11-30 19:06:47
I'm going to learn how to handle HTTPS traffic in C# as server-side and as for the first steps I've got some troubles. Here is some code ( http://pastebin.com/C4ZYrS8Q ): class Program { static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { if (sslPolicyErrors == SslPolicyErrors.None) return true; Console.WriteLine("Certificate error: {0}", sslPolicyErrors); return false; } static void Main() { var tcpListener = new TcpListener(IPAddress.Parse("127.0.0.1"), 8080); tcpListener.Start(); var clientAccept = tcpListener

Loading X509Certificate results in exception CryptographicException “Cannot find the original signer”

拟墨画扇 提交于 2019-11-30 17:23:08
I am trying to instantiate an X509Certificate object, but I keep running into the same CryptographicException , with the error message: "Cannot find the original signer". I have tried several ways of loading the certificate: // some different things that I have tried var cert = X509Certificate.CreateFromCertFile(certFileName); var cert2 = new X509Certificate(byteArray); var cert3 = new X509Certificate(byteArray, secretString); var cert4 = X509Certificate.CreateFromSignedFile(certFileName); I have tried both loading from a file and from a byte array. Each time I get the same error. What could

OPENSSL - How to generate a proof of possesion for a X509 certificate?

喜你入骨 提交于 2019-11-30 16:58:24
I need to generate a proof of possession, signing a verification code with my private key. I did not find a question related to this, here in Stack Overflow, and I am not finding some reference on Internet. I am following this tutorial , but I want to use OpenSSL. My verification code is related to a X509 certificate, like this: 7A69A4702DA903A41C3A5BC5575A8E3F49BEC5E5BA2D4CE1 I got the answer with the Azure support team. I already had my root key and X509 cert, generated with the following command: openssl req -x509 -newkey rsa:2048 -keyout root_private.pem -nodes -out root_cert.pem Then, I

How to verify X509 cert without importing root cert?

纵然是瞬间 提交于 2019-11-30 16:45:37
问题 My program contains 2 root certs I know and trust. I have to verify certs of trustcenters and "user" certs issued by the trustcenters which all originate from these 2 root certs. I use X509Chain class to verify but that only works if the root cert is in the windows certificate store. I'm looking for a way to verify the certs without importing theeses root certs - somehow tell the X509Chain class that I do trust this root certs and it should check just the certs in the chain and nothing else.

Ruby SSL with Twitter failed on cert OpenSSL issue on Windows 7

邮差的信 提交于 2019-11-30 16:00:52
问题 I've searched high and low for an answer to this. Many people have their own answers. None of them have worked for me. I'll provide the situation. So I want to access twitter and upon using net:HTTP's post function I get this error. SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Yes I know everyone get's this message. Here are viable solutions I found. First; manually set the cert file: #! /usr/bin/env ruby require 'net/https' require 'uri' uri

verify server certificate against self-signed certificate authority

坚强是说给别人听的谎言 提交于 2019-11-30 15:47:02
问题 I have custom server/client applications that communicate to each other using an SSL-encrypted TCP connection (custom protocol). To setup the server certificate, I have created a self-signed certificate authority and used that to sign a certificate for the server to use. On the client side, I would like to verify that the certificate of the server I am connecting to was signed by my self-signed CA. I was able to get this working in C++ with boost by giving the ssl::context the self-signed CA

Ruby SSL with Twitter failed on cert OpenSSL issue on Windows 7

跟風遠走 提交于 2019-11-30 15:45:21
I've searched high and low for an answer to this. Many people have their own answers. None of them have worked for me. I'll provide the situation. So I want to access twitter and upon using net:HTTP's post function I get this error. SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Yes I know everyone get's this message. Here are viable solutions I found. First; manually set the cert file: #! /usr/bin/env ruby require 'net/https' require 'uri' uri = URI.parse(ARGV[0] || 'https://localhost/') http = Net::HTTP.new(uri.host, uri.port) if uri.scheme ==

verify server certificate against self-signed certificate authority

前提是你 提交于 2019-11-30 14:48:46
I have custom server/client applications that communicate to each other using an SSL-encrypted TCP connection (custom protocol). To setup the server certificate, I have created a self-signed certificate authority and used that to sign a certificate for the server to use. On the client side, I would like to verify that the certificate of the server I am connecting to was signed by my self-signed CA. I was able to get this working in C++ with boost by giving the ssl::context the self-signed CA certificate using the load_verify_file() function. I would like to implement the same functionality in

What account does IIS Express run under?

廉价感情. 提交于 2019-11-30 14:28:19
问题 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 IWAM_MachineName) thanks a lot 回答1: IIS Express runs as your user account. When installed, you should find an IISExpress folder in your My Documents folder. 来源: https://stackoverflow.com/questions/8446359/what-account-does-iis-express-run-under