pkcs#12

list certificate stored in user credentials

我怕爱的太早我们不能终老 提交于 2019-11-28 21:19:56
In Android 7 Nougat, user installed certificate goes to "User credentials" instead of "Trusted credentials"(which consists of system credential & user credential). I used to access "Trusted credentials" by: KeyStore keystore = KeyStore.getInstance("AndroidCAStore"); through the above code I can then access system & user trusted credentials. But now, in Android 7, user installed certificate goes to a separate place called "User credentials" under Settings --> Security --> User credentials . My question is how can I programmatically list the credentials inside User credentials in Android 7? To

Export a PKCS#12 file without an export password?

久未见 提交于 2019-11-28 21:02:15
I am generating exporting some pkcs#12 files for testing purposes. These files are not being used in production and only exist temporary during automated testing. I am using the following command: openssl pkcs12 -export -nodes -out bundle.pfx -inkey mykey.key -in certificate.crt -certfile ca-cert.crt Why is it insisting on an export password when I have included -nodes ? My OpenSSL version is OpenSSL 1.0.1f 6 Jan 2014 on Ubuntu Server 14.10 64-bit. F21 In interactive mode, when it prompts for a password, just press enter and there will be no password set. If you are want to automate that (for

How can I create a .p12 or .pfx file without a private key?

梦想与她 提交于 2019-11-28 18:20:11
I'm trying to create a .p12 file that does not contain a valid identity (public key / private key pair) in order to test my app's certificate import functionality. Is it possible to do this with the openssl tool? I've tried openssl pkcs12 -in client-certonly.pem -export -out client-certonly.p12 but I get an error: unable to load private key 471:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/pem/pem_lib.c:648:Expecting: ANY PRIVATE KEY If it isn't possible to do this with openssl , is there another tool I can use? There is a very handy

Creating a .p12 file

混江龙づ霸主 提交于 2019-11-28 15:04:24
问题 Using openssl , I've created a private key as follows: openssl genrsa -out myKey.pem Then, to generate the csr demanded by the CA, I've executed the following: openssl req -new -key myKey.pem -out cert.csr The CA responded with a certificate which I stored in a file named myCert.cer I'd now like to bundle the necessary components (private key, public key(?) and certificate) into a single .p12 . To do so I've run the following: openssl pkcs12 -export -out keyStore.p12 -inkey myKey.pem -in

SignedJwtAssertionCredentials on AppEngine doesn't recognize PEM key

笑着哭i 提交于 2019-11-28 06:04:32
SignedJwtAssertionCredentials on appengine (with pycrypto 2.6) doesn't support the PKCS12 format, therefore I'm trying to use PEM keys instead, as suggested everywhere.. this is my code: f = file(os.path.join(os.path.dirname(__file__), KEY_FILE), "r") key = f.read() f.close() credentials = SignedJwtAssertionCredentials(SERVICE_ACCOUNT_EMAIL, key, scope="https://www.googleapis.com/auth/drive" http = httplib2.Http() http = credentials.authorize(http) and the KEY_FILE is a PEM key, converted with the command: openssl pkcs12 -in privatekey.p12 -nodes -nocerts > privatekey.pem but I still get this

How to create a digital certificate and export to .p12 file in PHP?

会有一股神秘感。 提交于 2019-11-28 05:15:23
问题 How to create a digital certificate and export to .p12 file in PHP? I want the .p12 file to have private key included. And also want to check whether the key pair is already issued (logged in database). I found a function called 'openssl_pkcs12_export_to_file' but don't know where to start. Seems that I need an X509 cert and a private key first. 回答1: <?php error_reporting(-1); function dump($Var) { echo "<hr/><pre>"; var_dump($Var); echo "</pre><hr/>"; } function check_errors() { echo "<hr/>

How can constructing an X509Certificate2 from a PKCS#12 byte array throw CryptographicException(“The system cannot find the file specified.”)?

余生长醉 提交于 2019-11-28 04:53:48
I'm trying to construct an X509Certificate2 from a PKCS#12 blob in a byte array and getting a rather puzzling error. This code is running in a desktop application with administrator rights on Windows XP. The stack trace is as follows, but I got lost trying to troubleshoot because _LoadCertFromBlob is marked [MethodImpl(MethodImplOptions.InternalCall)] . System.Security.Cryptography.CryptographicException: The system cannot find the file specified. at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) at System.Security.Cryptography.X509Certificates

How to programmatically import a pfx with a chain of certificates into the certificate store?

丶灬走出姿态 提交于 2019-11-27 19:46:42
I am trying to programmatically import a X509 certificate (pfx / PKCS#12) in my local machine's certificate store. This particular certificate has a chain of certificates, the certification path looks something like this: Root certificate CA Organization certificate CA Organization 2 certificate CA My certificate The code I use looks like this: cert = new X509Certificate2(pathToCert, password); if (cert != null) { var store = new X509Store(StoreName.My, StoreLocation.LocalMachine); store.Open(OpenFlags.ReadWrite); if (!store.Certificates.Contains(cert)) { store.Add(cert); } } This code does

Adding an intermediate certificates to a pkcs12 file

試著忘記壹切 提交于 2019-11-27 14:39:52
I have a certificate that has the following chain of certification: Entrust->My CA->My Issuing CA->My JBoss Certificate. Now, if I install my certificate on my JBoss instance, any page I access running on this instance will appear untrusted as My Issuing CA is not recognized by my browser. I know that my computer has the public key for the Entrust signing authority. How can I install my certificate so that any browser can see the entire certificate chain? I made a single .pem file of all of the certificates thinking that would work. It did not. Can anyone explain what I am doing wrong or even

PKCS12 Java Keystore from CA and User certificate in java

六月ゝ 毕业季﹏ 提交于 2019-11-27 14:05:08
I've recently been put in charge of mocking up an Apple product (iPhone Configuration Utility) in Java. One of the sections I've been a bit stuck on is a part about Exchange ActiveSync. In there, it allows you to select a certificate from your Keychain to use as credentials for your EAS account. After some research, I found that it's actually creating a PKCS12 keystore, inserting the private key of the certificate I selected, and encoding that into XML. So far not a big deal. If I create a .p12 file with Keychain Access it uploads without a problem. But I run into a problem when I try to bring