pkcs#12

How to create a certificate into a PKCS12 keystore with keytool?

馋奶兔 提交于 2019-12-02 20:41:41
I wanted to create a certificate into a PKCS12 keystore format with keytool program. The keystore has extension .pfx . How do I achieve this? David García González If the keystore is PKCS12 type ( .pfx ) you have to specify it with -storetype PKCS12 (line breaks added for readability): keytool -genkey -alias <desired certificate alias> -keystore <path to keystore.pfx> -storetype PKCS12 -keyalg RSA -storepass <password> -validity 730 -keysize 2048 Additional answer to the key of the question . With JDK 8 ( 1.8.0_121-b13 ) you don't get an exception if you remove -storetype pkcs12 but the

How to generate valid APNS Certificate (.p12) for use in GCM for iOS?

一个人想着一个人 提交于 2019-12-02 19:04:51
I am trying Google Cloud Messaging sample app for iOS platform. https://developers.google.com/cloud-messaging/ios/start To generate GoogleServices-Info.plist APNS development and production certificates are needed (PKCS#12 file format). I have created .p12 file in MAC KeyChain Access (bundling both APNS dev certificate and private key). But when uploading the .p12 file, it says it is not in valid format (The certificate must be a valid PKCS12 file). Here's my solution, without the terminal ! delete your actual certificate ( in Keychain ) : "Apple Development IOS Push Service" & "Apple

Convert SSL .pem to .p12 with or without OpenSSL

蓝咒 提交于 2019-12-02 18:11:16
I get external .pem files that need to be converted to .p12 files - I add a username and password in the process. (I need to do this to utilize a third party API.) Using openssl , the command is... openssl pkcs12 -export -in xxxx.pem -inkey xxxx.pem -out xxx.p12 -passout pas:newpassword -name "newname" I can run this from a terminal session and it works perfectly. However, I will need to do this often and have written a Java class that handles this and more (my application is mostly .jsp with Tomcat and Apache). When I try run the same command from Java using Runtime.exec , I get the dreaded

Reading pkcs12 certificate information

帅比萌擦擦* 提交于 2019-12-02 17:43:37
I have a problem with reading certificate information. I want to read full information using java with bouncycastle library in Android programmatically. Now, i'm just using keytool command in console: >keytool -list -keystore 1.p12 -storetype pkcs12 -v Any suggestions? ilya.stmn I've found solution, the main idea is to cast certificate to x509, then get the SubjectDN and parse values. public class TestClass { public static void main(String[] args) throws Exception { KeyStore p12 = KeyStore.getInstance("pkcs12"); p12.load(new FileInputStream("pkcs.p12"), "password".toCharArray()); Enumeration

Convert .p12 file to .pem using Terminal app in Mac “No such file or directory” error?

大城市里の小女人 提交于 2019-12-02 17:18:38
I have export the "Apple Development IOS Push Service" certificate from Keychain Access and save the "apns-dev-cert.p12" in my desktop. I want to enable Apple Push Notification I have followed these blogs to convert apns-dev-cert.p12 to apns-dev-cert.pem from Terminal app, http://bhaveshkumbhani.blogspot.in/2011/12/convert-p12-to-pem-for-apns.html http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 Apple Document RemoteNotificationPG.pdf I have used these commands in Terminal, 1.V******-Ms-iMac-2:~ c*****$ openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert

How to list the certificates stored in a PKCS12 keystore with keytool?

我只是一个虾纸丫 提交于 2019-12-02 15:42:09
I wanted to list the certificates stored in a PKCS12 keystore. The keystore has the extension .pfx David García González If the keystore is PKCS12 type ( .pfx ) you have to specify it with -storetype PKCS12 (line breaks added for readability): keytool -list -v -keystore <path to keystore.pfx> \ -storepass <password> \ -storetype PKCS12 slm You can also use openssl to accomplish the same thing: $ openssl pkcs12 -nokeys -info \ -in </path/to/file.pfx> \ -passin pass:<pfx's password> MAC Iteration 2048 MAC verified OK PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048 Certificate

Create PKCS#12 file with self-signed certificate via OpenSSL in Windows for my Android App

眉间皱痕 提交于 2019-12-02 14:08:45
I am writing an Android App that requires SSL certification for certain web requests. I need to build a PKCS12 file ( .pfx ) with Self-Signed Certificate. I decided to use OpenSSL library, but I could not build it on my computer (Windows x64 platform). I want to do it without ActivePerl installation. Who knows easy way to build it? I was trying to build a PKCS12 file with OpenSSL on my friends computer (with OpenSSL, Linux) but i get nothing. Can anyone help me, and to describe the sequence of actions to generate PKCS12 file with Private Key and Self-Signed Public Certificate? Plo_Koon The

Using HttpClient with SSL and certificates

99封情书 提交于 2019-12-02 10:23:27
问题 While I've been familiar with HTTPS and the concept of SSL, I have recently begun some development and found I am a little confused. The requirement was that I write a small Java application that runs on a machine attached to a scanner. When a document is scanned this is picked up and the file (usually PDF) sent over the internet to our application server that will then process it. I've written the application using Apache Commons libraries and HTTPClient. The second requirement was to

https handshake with keystores in Python

本秂侑毒 提交于 2019-12-02 03:19:28
问题 I have an web server set up that denies connections without a valid .p12 certificate. I need to access a REST API that is running on the server in a Python script, but I can't find anything about how to do it. If anyone has a good tutorial on how to perform an SSL handshake using .p12 certificates in Python, please let me know. 回答1: The same methods described in the answers to this question, which asks about verifying a server certificate during the HTTPS connection (this is not done at all

How to use a service account with Google's python api and drive?

穿精又带淫゛_ 提交于 2019-12-01 12:23:20
I try to write python 2.7 script to upload a file into my personal google drive folder. After several problems I stuck know. This is my current error: NotImplementedError: PKCS12 format is not supported by the PyCrpto library. Try converting to a "PEM" (openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > privatekey.pem) or using PyOpenSSL if native code is an option. I already tried to run this commands, as mentiod in this question and answer . openssl pkcs12 -in privatekey.p12 -nodes -nocerts > privatekey.pem openssl pkcs8 -nocrypt -in privatekey.pem -passin pass:notasecret -topk8 -out pk.pem my