{"id":2339,"date":"2015-11-05T02:36:40","date_gmt":"2015-11-05T02:36:40","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=2339"},"modified":"2015-11-05T02:36:48","modified_gmt":"2015-11-05T02:36:48","slug":"making-a-cert-for-casper-and-apples-gsx","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=2339","title":{"rendered":"Making a cert for Casper and Apple&#8217;s GSX"},"content":{"rendered":"<p># DigiCert-generated code from https:\/\/www.digicert.com\/easy-csr\/keytool.htm<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore Applecare-APP157-0008675309_Test_apple_com.jks -dname &quot;CN=Applecare-APP157-0008675309.Test.apple.com,OU=Rock, O=Tommy Tutone, L=Hollywood, ST=CA, C=US&quot; &amp;&amp; keytool -certreq -alias server -file Applecare-APP157-0008675309_Test_apple_com.csr -keystore Applecare-APP157-0008675309_Test_apple_com.jks &amp;&amp; echo Your certificate signing request is in Applecare-APP157-0008675309_Test_apple_com.csr. &nbsp;Your keystore file is Applecare-APP157-0008675309_Test_apple_com.jks. &nbsp;Thanks for using the DigiCert keytool CSR helper.<\/div><\/div>\n<p># Verify the .CSR<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">openssl req -in Applecare-APP157-0008675309_Test_apple_com.csr -noout -text<\/div><\/div>\n<p># Convert the Java Keytool-generated .JKS to a .P12<br \/>\n# See: http:\/\/stackoverflow.com\/questions\/652916\/converting-a-java-keystore-into-pem-format<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">keytool -importkeystore -srckeystore Applecare-APP157-0008675309_Test_apple_com.jks -destkeystore Applecare-APP157-0008675309_Test_apple_com.p12 -srcstoretype jks -deststoretype pkcs12<\/div><\/div>\n<p># Convert the .P12 to a .PEM private key<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">openssl pkcs12 -in Applecare-APP157-0008675309_Test_apple_com.p12 -out Applecare-APP157-0008675309_Test_apple_com.pem<\/div><\/div>\n<p>#Or you can use OpenSSL<br \/>\n#The command line openssl application can be used to generate the public\/private key pair and certificate signed request (CSR).<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">openssl genrsa -aes256 -out privatekey.pem 2048<\/div><\/div>\n<p>When running this command, you will be prompted to enter the pass phrase for the private key. This is your secure pass phrase and should not be shared with anyone.<br \/>\n-This pass phrase can be anything like a password<\/p>\n<p>#CSR Generation<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">openssl req -new -sha256 -key privatekey.pem -out certreq.csr<\/div><\/div>\n<p>Once you enter the command , please follow the instructions on the prompt and enter the details being requested.<\/p>\n<p># Combine the private key and Apple-supplied certificate<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">openssl pkcs12 -export -inkey Applecare-APP157-0008675309_Test_apple_com.pem -in Applecare-APP157-0008675309.Test.apple.com.cert.pem -out gsx_test.p12<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p># DigiCert-generated code from https:\/\/www.digicert.com\/easy-csr\/keytool.htm keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore Applecare-APP157-0008675309_Test_apple_com.jks -dname &quot;CN=Applecare-APP157-0008675309.Test.apple.com,OU=Rock, O=Tommy Tutone, L=Hollywood, ST=CA, C=US&quot; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2339","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2339"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2339\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}