x509certificate

How to cache eToken PIN for multiple processes

六眼飞鱼酱① 提交于 2019-12-04 18:51:33
I have a .NET (c#) application which uses the x509Certificate2 in the 'my' Certificate Store, originally coming from an eToken device. When I use the certificate (to decrypt data or use it as a clientcert for web requests), it will ask for the device PIN once. After that, it is cached, the user isn't bothered with the password request every xx minutes. Now, I have multiple processes, that all use the certificate. Each of these processes will request the device PIN. (the cache seems to be per process). Is there an easy way around this? Can I 'cache' it somewhere, so that every process can

How to make X.509 certificate?

无人久伴 提交于 2019-12-04 16:47:50
I am trying to make a X.509 certificate. I am using makecert.exe to make this. I use this command to make my X.509 certificate makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=MyServerCert -sky exchange –pe But i don`t know there X.509 certificate is storeing. I need to use this X.509 certificate in my c# code. The code is : host.Credentials.ServiceCertificate.Certificate = new X509Certificate2("MyServerCert.p12", "password"); But i don`t know what is password and it throw this exception "The system cannot find the file specified." I always use the SelfCert tool from PluralSight. You can

What is the difference between the x.509 V3 extensions Basic Constraints and Key Usage to create a CA certificate?

二次信任 提交于 2019-12-04 16:29:31
问题 These two actions seem to do the same: using the Basic Constraints extension in a X.509 Certificate to signify that it is a CA certificate and using the Key Usage extension e.g. to signify that the public key can be used for certificate signining. What is the difference between these extensions? Do they serve same purpose or complement each other? 回答1: "Key Usage" defines what can be done with the key contained in the certificate. Examples of usage are: ciphering, signature, signing

Certificate issue: KEY or PFX from P7B and CRT

穿精又带淫゛_ 提交于 2019-12-04 16:02:14
问题 I'm new to the certificates, and this is a first time I bought it. I generated CSR file (in IIS) and bought certificate using GoDaddy web site. They sent me two files: P7B and CRT. Since I will use the certificate for Azure Web role, I need PFX. How can I create it using only CSR, P7B, and CRT? 回答1: Finally I managed to do that. In IIS I selected Complete Certificate Request, installed the CRT certificate, and then used Export option to save it as PFX. 回答2: Since I will use the certificate

How do I use BER encoding with object System.DirectoryServices.Protocols.BerConverter.Encode(“???”, myData)

纵然是瞬间 提交于 2019-12-04 14:30:38
问题 I need to encode and decode BER data. .NET has the class System.DirectoryServices.Protocols.BerConverter The static method requires me to enter a string in the first parameter as shown below byte[] oid = { 0x30, 0xD, 0x6, 0x9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0xD, 0x1, 0x1, 0x1, 0x5, 0x0 }; // Object ID for RSA var result2 = System.DirectoryServices.Protocols.BerConverter.Decoding("?what goes here?", oid); BER encoding is used in LDAP, Certificates, and is commonplace in many other formats. I'll

How to programmatically install a CA Certificate (for EAP WiFi configuration) in Android?

你。 提交于 2019-12-04 11:45:31
问题 My objective: Create an EAP WiFi configuration - including the CA Certificate - in Android programmitcally. Problem: How do I install a CA Certificate programmatically (and then reference that certificate in the EAP WiFi configuration)? I found a very useful link already that allows me to create and save EAP WiFi configurations here: How to programmatically create and read WEP/EAP WiFi configurations in Android? However this assumes that you have already installed the CA Certificate on the

Convert private key in PEM format

三世轮回 提交于 2019-12-04 10:17:31
I have created a self-signed certificate with Java code and added into KeyStore. Now I want to export Private key and Certificate created, into a file in PEM format. Is it possible to achieve this without any third party library ? Below is the code I use for creating self-singed certificate. public void createSelfSignedSSLCertificate() { try { final CertAndKeyGen keypair = new CertAndKeyGen("RSA", "SHA1WithRSA", null); final X500Name x500Name = new X500Name(commonName, organizationalUnit, organization, city, state, country); keypair.generate(keysize); final PrivateKey privKey = keypair

Parsing X509 certificate

江枫思渺然 提交于 2019-12-04 10:05:49
I want to parse a X.509 certificate in php. The certificate is in DER-encoded X.509 format. I tried using openssl_x509_parse method in php, but its not working. The certificate data is a valid data received after firing a command in mdm for CertificateList. I am using the below code: $data = 'MIIDizCCAnMCCQDCpCAUbA2P4TANBgkqhkiG9w0BAQUFADBrMSIw IAYDVQQKDBkqLnNtYXJ0c291cmNpbmdnbG9iYWwubmV0MSEwHwYD VQQLDBhEb21haW4gQ29udHJvbCBWYWxpZGF0ZWQxIjAgBgNVBAMM GSouc21hcnRzb3VyY2luZ2dsb2JhbC5uZXQwHhcNMTIwNTI5MTM1 NTU0WhcNMTMwNTI5MTM1NTU0WjCBozELMAkGA1UEBhMCTlkxCzAJ

How to use X509_verify()

 ̄綄美尐妖づ 提交于 2019-12-04 10:03:47
How can we use X509_verify(). I have two certificates. The first certificate is the Root Certificate which signed the next certificate (which is my Certificate). So I want to check if my certificate is signed by the root certificate using x509_verify() in C++. My goal is to keep the code simple and Understandable so I can also put it online. Signature of X509_verify is int X509_verify(X509 * x509, EVP_PKEY * pkey); Suppose of you have root certificate in root and your certificate in mycert; X509 * root; X509 * mycert; //Get root certificate into root //Get mycert into mycert. //Get the public

accept self-signed SSL Certificates-> where to set default TrustManager

荒凉一梦 提交于 2019-12-04 09:37:01
问题 First I had to admit that I know that accepting all certs can be considered as having no security. We have "real" Certs but only on our live systems. The certs on our test systems are self-signed. So as long we're developing, we have to use test-servers, which forces me to kind of disable certificates. I saw a lot of toppics here on Stackoverflow and all over the web which are all trying do do the same: Accepting SSL Certificates. However None of these answers seem to apply to my Problem, as