certificate

How to do HTTPS GET with client certificate in node

你。 提交于 2019-12-28 23:17:29
问题 I can use curl for making a GET request -> `curl -v https://example.com:82/v1/api?a=b` -E client_cert.pem:password How can I use same in node. I tried request, superagent but not able to pass certificate. Thanks in advance! 回答1: This worked for me - var https = require('https'); var fs = require('fs'); var options = { hostname: 'example.com', port: 83, path: '/v1/api?a=b', method: 'GET', key: fs.readFileSync('/path/to/private-key/key.pem'), cert: fs.readFileSync('/path/to/certificate/client

Read certificate files from memory instead of a file using OpenSSL

╄→尐↘猪︶ㄣ 提交于 2019-12-28 13:21:54
问题 I have a server which would listen on HTTPS using OpenSSL. For this, I have to provide the certificate to use. However, the current implementation uses a filename to be provided to the OpenSSL API. I want the certificate information to be read from memory, so that I don't have to ship the certificate file opening. I tried to google, but I didn't come up with any options. Is is possible? If so, how do I read certificate files from memory instead of a file using OpenSSL? EDIT : The following

convert pfx format to p12

旧时模样 提交于 2019-12-28 08:05:26
问题 I need to export a .pfx format certificate (from windows mmc) to .p12 to use in another application. I cant find a way to do this. Can anyone suggest a method? 回答1: .p12 and .pfx are both PKCS #12 files. Am I missing something? Have you tried renaming the exported .pfx file to have a .p12 extension? 回答2: I had trouble with a .pfx file with openconnect. Renaming didn't solve the problem. I used keytool to convert it to .p12 and it worked. keytool -importkeystore -destkeystore new.p12

convert pfx format to p12

 ̄綄美尐妖づ 提交于 2019-12-28 08:05:08
问题 I need to export a .pfx format certificate (from windows mmc) to .p12 to use in another application. I cant find a way to do this. Can anyone suggest a method? 回答1: .p12 and .pfx are both PKCS #12 files. Am I missing something? Have you tried renaming the exported .pfx file to have a .p12 extension? 回答2: I had trouble with a .pfx file with openconnect. Renaming didn't solve the problem. I used keytool to convert it to .p12 and it worked. keytool -importkeystore -destkeystore new.p12

Cannot export generated certificate with a private key to byte array in .NET 4.0/4.5

可紊 提交于 2019-12-28 06:47:08
问题 I need to export and import generated certificates with private keys to and from byte arrays, and I don't have any problems unless I use .NET framework 4.0 and 4.5. I'm generating self-signed certificates with BouncyCastle library and then converting them to .NET format (X509Certificate2 object). Unfortunately with the upgrade to a newest framework I cannot export private keys. Here is the code: using System; using System.Diagnostics; using System.Security.Cryptography; using System.Security

Application failed codesign verification. What do I do?

☆樱花仙子☆ 提交于 2019-12-28 04:28:10
问题 XCode gives me this warning when I build the app for release. Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011) Do I need to delete all entries from my keychain and redo getting a certificate, provisioning profile, etc? I can build and debug on the iPhone and iPad without a problem. If you know how I can solve this dilemma, please provide exact steps or a way for me to contact you about this. Thanks ---

Check in Javascript if a SSL Certificate is valid

六月ゝ 毕业季﹏ 提交于 2019-12-28 03:54:30
问题 Is there a way to check in JavaScript if given a host it's SSL certificate is valid? (non blocking) In my case I want to display: "you can also use https://.." if via JavaScript I can make a request to https://my_url without being asked to accept an untrusted certificate. Can this be done asynchronously? 回答1: The question doesn't make sense. You can't get the server's SSL certificate without opening an SSL connection to it, and once you've done that, telling the user they can do that too is a

Using curl in php with client certificate and private key in separate files

假装没事ソ 提交于 2019-12-28 02:52:11
问题 I need some assistance rewriting this PHP curl code that uses *.pem ( CA cert ), Client cert and private key in one file: curl_setopt($curl, CURLOPT_URL, $this->url); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($curl, CURLOPT_SSLCERT, $this->keystore); curl_setopt($curl, CURLOPT_CAINFO, $this->keystore); curl_setopt($curl, CURLOPT_SSLKEYPASSWD, $this->keystorepassword); curl_setopt($curl, CURLOPT

Create CSR using existing private key

两盒软妹~` 提交于 2019-12-28 02:51:48
问题 What I am trying to do is, create a CSR and with a private key that is password protected (the key). In OpenSSL I can create a private key with a password like so: openssl genrsa -des3 -out privkey.pem 2048 Is there some way I can use the key I just created and generate a CSR using the key? If not is there some way I can generate a CSR along with a PASSWORD PROTECTED private key? 回答1: This is the second example from the documentation of OpenSSL req: Create a private key and then generate a

Within a web browser, is it possible for JavaScript to obtain information about the HTTPS Certificate being used for the current page?

余生长醉 提交于 2019-12-27 22:18:51
问题 Is there a method for JavaScript running in a browser to determine which CA certificate is being used to authenticate the remote host for the browser's current HTTPS connection, and also obtain properties of that certificate, such as the name of the CA? If not, are there any other options for programatically obtaining this information, such as ActiveX, Java, CGI on the server side, ...? 回答1: You can use the opensource Forge project to do this. It implements SSL/TLS in JavaScript. You can make