{"id":197,"date":"2017-12-01T12:43:27","date_gmt":"2017-12-01T12:43:27","guid":{"rendered":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/?p=197"},"modified":"2017-12-01T12:43:27","modified_gmt":"2017-12-01T12:43:27","slug":"java-code-signing-generate-a-csr","status":"publish","type":"post","link":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/java-code-signing-generate-a-csr\/","title":{"rendered":"Java Code Signing: Generate a CSR"},"content":{"rendered":"<p>To request a code signing certificate, you have to provide us a certificate signing request (CSR) generated from the machine you&#8217;ll use to sign the code. We&#8217;ll use the information in this file to validate your request and provide the information to anyone downloading your code.<\/p>\n<p class=\"note\">\u00a0<strong>Note:<\/strong>\u00a0You must generate the CSR from your local machine and not from the web server you&#8217;re using to host the file.<\/p>\n<h3>Windows-only preparation<\/h3>\n<p>If you use Windows, you must complete the following steps before generating your CSR.<\/p>\n<ol>\n<li>Run\u00a0<code>cmd<\/code>\u00a0as an administrator.<\/li>\n<li>Move to your JDK installation&#8217;s\u00a0<code>bin<\/code>\u00a0directory:\n<pre class=\"code-sample-blue\">cd C:\\Program Files\\java\\jdk<em><u>version number<\/u><\/em>\\bin<\/pre>\n<\/li>\n<\/ol>\n<h2>Create a keystore<\/h2>\n<p>To store your public and private keys (used to sign your code), you must create a keystore. You&#8217;ll use this repeatedly throughout the code signing certificate request and installation process.<\/p>\n<ol>\n<li>Create a keystore called\u00a0<strong>codesignstore<\/strong>:\n<pre class=\"code-sample-blue\">keytool -genkey -alias codesigncert -keyalg RSA -keysize 2048 -keystore codesignstore<\/pre>\n<\/li>\n<li>Complete the information requested from you at the command prompt. There are a few important things to note:\n<ul>\n<li>It&#8217;s important that this information is consistent with everything else you plan to use in your request.<\/li>\n<li>Note your keystore&#8217;s password because you\u00a0<em>must<\/em>\u00a0have it to sign your Java code.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2>Generate a CSR<\/h2>\n<p>Now, use your keystore to create your certificate signing request (which you will use to request the certificate you purchased from IFindHost &#8211; <a href=\"https:\/\/www.cheapdomainregistration.com\/\">CheapDomainRegistration.com<\/a>).<\/p>\n<ol>\n<li>Generate your CSR:\n<pre class=\"code-sample-blue\">keytool -certreq -v -alias codesigncert -file mycsr.pem -keystore codesignstore<\/pre>\n<\/li>\n<li>Enter your keystore&#8217;s password and press\u00a0<strong>enter<\/strong>.<\/li>\n<li>Open your CSR. How you do that depends on your OS:<br \/>\n<table>\n<tbody>\n<tr>\n<th>OS<\/th>\n<th>Command<\/th>\n<\/tr>\n<tr>\n<td>Mac OS X<\/td>\n<td>\n<pre class=\"code-sample-blue\">nano mycsr.pem<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>Windows<\/td>\n<td>\n<pre class=\"code-sample-blue\">start notepad \"mycsr.pem\"<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>Copy your CSR, including the entirety of the lines containing\u00a0<strong>BEGIN NEW CERTIFICATE REQUEST<\/strong>\u00a0and\u00a0<strong>END NEW CERTIFICATE REQUEST<\/strong>.<\/li>\n<\/ol>\n<h2>Next step<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.secureserver.net\/help\/article\/4777?prog_id=ifindhost&amp;locale=en\">Request code or driver signing cerificates<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To request a code signing certificate, you have to provide us a certificate signing request (CSR) generated from the machine you&#8217;ll use to sign the code. We&#8217;ll use the information in this file to validate your request and provide the<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[98],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-code-driver-signing-certificates","tag-you-must-generate-the-csr-from-your-local-machine-and-not-from-the-web-server-youre-using-to-host-the-file"],"_links":{"self":[{"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":2,"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":199,"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/posts\/197\/revisions\/199"}],"wp:attachment":[{"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cheapdomainregistration.com\/cheap-domain\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}