{"id":27942,"date":"2014-07-23T11:00:32","date_gmt":"2014-07-23T08:00:32","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=27942"},"modified":"2022-11-21T15:21:37","modified_gmt":"2022-11-21T13:21:37","slug":"java-keystore-tutorial","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html","title":{"rendered":"Java Keystore Tutorial"},"content":{"rendered":"<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#introduction\">1. Introduction<\/a><\/dt>\n<dt><a href=\"#ssl\">2. SSL and how it works<\/a><\/dt>\n<dt><a href=\"#keys\">3. Private Keys<\/a><\/dt>\n<dt><a href=\"#public\">4. Public Certificates<\/a><\/dt>\n<dt><a href=\"#root\">5. Root Certificates<\/a><\/dt>\n<dt><a href=\"#root\">6. Certificate Authorities<\/a><\/dt>\n<dt><a href=\"#chain\">7. Certificate Chain<\/a><\/dt>\n<dt><a href=\"#keytool\">8. Keystore using Java keytool<\/a><\/dt>\n<dt><a href=\"#commands\">9. Keystore Commands<\/a><\/dt>\n<dt><a href=\"#self\">10. Configure SSL using Keystores and Self Signed Certificates on Apache Tomcat<\/a><\/dt>\n<\/dl>\n<\/div>\n<p>&nbsp;<\/p>\n<h1><a name=\"introduction\"><\/a>1. Introduction<\/h1>\n<p>Who of us didn&#8217;t visit ebay, amazon to buy anything or his personal bank account to check it. Do you think that those sites are secure enough to put your personal data like (credit card number or bank account number, etc.,)?<\/p>\n<p>Most of those sites use the Socket Layer (SSL) protocol to secure their Internet applications. SSL allows the data from a client, such as a Web browser, to be encrypted prior to transmission so that someone trying to sniff the data is unable to decipher it.<\/p>\n<p>Many Java application servers and Web servers support the use of keystores for SSL configuration. If you&#8217;re building secure Java programs, learning to build a keystore is the first step.<\/p>\n<h1><a name=\"ssl\"><\/a>2. SSL and how it works<\/h1>\n<p>A HTTP-based SSL connection is always initiated by the client using a URL starting with https:\/\/ instead of with http:\/\/. At the beginning of an SSL session, an SSL handshake is performed. This handshake produces the cryptographic parameters of the session. A simplified overview of how the SSL handshake is processed is shown in the diagram below.<\/p>\n<p><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_m4e1c1e9d.gif\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_m4e1c1e9d.gif\" alt=\"Java KeyStore Tutorial_html_m4e1c1e9d\" width=\"568\" height=\"512\" class=\"aligncenter size-full wp-image-27957\"><\/a><\/p>\n<p><strong>This is in short how it works:<\/strong><\/p>\n<ol>\n<li>A browser requests a secure page (usually https:\/\/).<\/li>\n<li>The web server sends its public key with its certificate.<\/li>\n<li>The browser checks that the certificate was issued by a trusted party (usually a trusted root CA), that the certificate is still valid and that the certificate is related to the site contacted.<\/li>\n<li>The browser then uses the public key, to encrypt a random symmetric encryption key and sends it to the server with the encrypted URL required as well as other encrypted http data.<\/li>\n<li>The web server decrypts the symmetric encryption key using its private key and uses the symmetric key to decrypt the URL and http data.<\/li>\n<li>The web server sends back the requested html document and http data encrypted with the symmetric key.<\/li>\n<li>The browser decrypts the http data and html document using the symmetric key and displays the information.<\/li>\n<\/ol>\n<p>The world of SSL has, essentially, three types of certificates: private keys, public keys (also called public certificates or site certificates), and root certificates.<\/p>\n<h1><a name=\"keys\"><\/a>3. Private Keys<\/h1>\n<p>The private key contains the identity information of the server, along with a key value. It should keep this key safe and protected by password because it&#8217;s used to negotiate the hash during the handshake. It can be used by someone to decrypt the traffic and get your personal information. It like leaving your house key in the door lock.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h1><a name=\"public\"><\/a>4. Public Certificates<\/h1>\n<p>The public certificate (public key) is the portion that is presented to a client, it likes your personal passport when you show in the Airport. The public certificate, tightly associated to the private key, is created from the private key using a Certificate Signing Request (CSR). After you create a private key, you create a CSR, which is sent to your Certificate Authority (CA). The CA returns a signed certificate, which has information about the server identity and about the CA.<\/p>\n<h1><a name=\"root\"><\/a>5. Root Certificates<\/h1>\n<p>Root CA Certificate is a CA Certificate which is simply a Self-signed Certificate. This certificate represents a entity which issues certificate and is known as Certificate Authority or the CA such as VeriSign, Thawte, etc.<\/p>\n<h1><a name=\"root\"><\/a>6. Certificate Authorities<\/h1>\n<p>Companies who will sign certificates for you such as VeriSign, Thawte, Commodo, GetTrust. Also, many companies and institutions act as their own CA, either by building a complete implementation from scratch, or by using an open source option, such as OpenSSL.<\/p>\n<h1><a name=\"chain\"><\/a>7. Certificate Chain<\/h1>\n<p>When a server and client establish an SSL connection, a certificate is presented to the client; the client should determine whether to trust this certificate, a process called the certificate chain. The client examines the issuer of a certificate, searches its list of trusted root certificates, and compares the issuer on the presented certificate to the subjects of the trusted certificates.<\/p>\n<p>If a match is found, the connection proceeds. If not, the Web browsers may pop up a dialog box, warning you that it cannot trust the certificate and offering the option to trust the certificate.<\/p>\n<h1><a name=\"keytool\"><\/a>8. Keystore using Java keytool<\/h1>\n<p>Java Keytool is a key and certificate management utility. It allows users to manage their own public\/private key pairs and certificates. Java Keytool stores the keys and certificates in what is called a <strong>keystore<\/strong>. It protects private keys with a password.<\/p>\n<p>Each certificate in a Java keystore is associated with a unique alias. When creating a Java keystore you will first create the .jks file that will initially only contain the private key, then generate a CSR. Then you will import the certificate to the keystore including any root certificates.<\/p>\n<h1><a name=\"commands\"><\/a>9. Keystore Commands<\/h1>\n<p><strong>Create Keystore, Keys and Certificate Requests<\/strong><\/p>\n<ul>\n<li>Generate a Java keystore and key pair\n<pre class=\"brush:bash\">keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -storepass password<\/pre>\n<\/li>\n<li><strong>Generate a certificate signing request (CSR) for an existing Java keystore<\/strong>\n<pre class=\"brush:bash\">keytool -certreq -alias mydomain -keystore keystore.jks -storepass password -file mydomain.csr<\/pre>\n<\/li>\n<li><strong>Generate a keystore and self-signed certificate<\/strong>\n<pre class=\"brush:bash\">keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360<\/pre>\n<\/li>\n<\/ul>\n<p><strong>Import Certificates<\/strong><\/p>\n<ul>\n<li>Import a root or intermediate CA certificate to an existing Java keystore<\/li>\n<pre class=\"brush:bash\">keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks -storepass password<\/pre>\n<li><strong>Import a signed primary certificate to an existing Java keystore<\/strong>\n<pre class=\"brush:bash\">keytool -import -trustcacerts -alias mydomain -file mydomain.crt -keystore keystore.jks -storepass password<\/pre>\n<\/li>\n<\/ul>\n<p><strong>Export Certificates<\/strong><\/p>\n<ul>\n<li><strong>Export a certificate from a keystore<\/strong>\n<pre class=\"brush:bash\">keytool -export -alias mydomain -file mydomain.crt -keystore keystore.jks -storepass password<\/pre>\n<\/li>\n<\/ul>\n<p><strong>Check\/List\/View Certificates<\/strong><\/p>\n<ul>\n<li><strong>Check a stand-alone certificate<\/strong>\n<pre class=\"brush:bash\">keytool -printcert -v -file mydomain.crt<\/pre>\n<\/li>\n<li><strong>Check which certificates are in a Java keystore<\/strong>\n<pre class=\"brush:bash\">keytool -list -v -keystore keystore.jks -storepass password<\/pre>\n<\/li>\n<li><strong>Check a particular keystore entry using an alias<\/strong>\n<pre class=\"brush:bash\">keytool -list -v -keystore keystore.jks -storepass password -alias mydomain<\/pre>\n<\/li>\n<\/ul>\n<p><strong>Delete Certificates<\/strong><\/p>\n<ul>\n<li><strong>Delete a certificate from a Java Keytool keystore<\/strong>\n<pre class=\"brush:bash\">keytool -delete -alias mydomain -keystore keystore.jks -storepass password<\/pre>\n<\/li>\n<\/ul>\n<p><strong>Change Passwords<\/strong><\/p>\n<ul>\n<li><strong>Change a Java keystore password<\/strong>\n<pre class=\"brush:bash\">keytool -storepasswd -new new_storepass -keystore keystore.jks -storepass password<\/pre>\n<\/li>\n<li><strong>Change a private key password<\/strong>\n<pre class=\"brush:bash\">keytool -keypasswd -alias client -keypass old_password -new new_password -keystore client.jks -storepass password<\/pre>\n<\/li>\n<\/ul>\n<h1><a name=\"self\"><\/a>10. Configure SSL using Keystores and Self Signed Certificates on Apache Tomcat<\/h1>\n<ol>\n<li>Generate new keystore and self-signed certificateusing this command, you will prompt to enter specific information such as user name, organization unit, company and location.\n<pre class=\"brush:bash\">keytool -genkey -alias tomcat -keyalg RSA -keystore \/home\/ashraf\/Desktop\/JavaCodeGeek\/keystore.jks -validity 360<\/pre>\n<p><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_m5d3841d.png\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_m5d3841d.png\" alt=\"Java KeyStore Tutorial_html_m5d3841d\" width=\"629\" height=\"466\" class=\"aligncenter size-full wp-image-27958\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_m5d3841d.png 629w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_m5d3841d-300x222.png 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/a><\/li>\n<li>You can list the certificate details you just created using this command\n<pre class=\"brush:bash\">keytool -list -keystore \/home\/ashraf\/Desktop\/JavaCodeGeek\/keystore.jks<\/pre>\n<p><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_131ca506.png\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_131ca506.png\" alt=\"Java KeyStore Tutorial_html_131ca506\" width=\"629\" height=\"462\" class=\"aligncenter size-full wp-image-27959\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_131ca506.png 629w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_131ca506-300x220.png 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/a><\/li>\n<li><a href=\"http:\/\/tomcat.apache.org\/download-70.cgi\">Download Tomcat 7<\/a><\/li>\n<li>Configure Tomcat\u2019s server to support for SSL or https connection. Adding a connector element in Tomcat\\conf\\server.xml\n<pre class=\"brush:bash\">&lt;Connector port=\"8443\" maxThreads=\"150\" scheme=\"https\" secure=\"true\" \nSSLEnabled=\"true\" keystoreFile=\"\/home\/ashraf\/Desktop\/JavaCodeGeek\/.keystore\" keystorePass=\"password\" clientAuth=\"false\" keyAlias=\"tomcat\" sslProtocol=\"TLS\" \/&gt;<\/pre>\n<\/li>\n<li>Start Tomcat and go to<a href=\"https:\/\/localhost:8443\/\">https:\/\/localhost:8443\/<\/a>, you will find the following security issue where the browser will present untrusted error messages. In the case of e-commerce, such error messages result in immediate lack of confidence in the website and organizations risk losing confidence and business from the majority of consumers, that&#8217;s normal as your certificate isn&#8217;t signed yet by CA such as Thawte or Verisign who will verify the identity of the requester and issue a signed certificate.<a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_15195a43.png\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/Java-KeyStore-Tutorial_html_15195a43-1024x538.png\" alt=\"Java KeyStore Tutorial_html_15195a43\" width=\"800\" height=\"400\" class=\"aligncenter size-large wp-image-27956\"><\/a><\/li>\n<li>You can click Proceed anyway till you receive you signed certificate.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4. Public Certificates 5. Root Certificates 6. Certificate Authorities 7. Certificate Chain 8. Keystore using Java keytool 9. Keystore Commands 10. Configure SSL using Keystores and Self Signed Certificates on &hellip;<\/p>\n","protected":false},"author":589,"featured_media":148,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[985],"class_list":["post-27942","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-java","tag-keystore"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Keystore Example<\/title>\n<meta name=\"description\" content=\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Keystore Example\" \/>\n<meta property=\"og:description\" content=\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-23T08:00:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T13:21:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ashraf Sarhan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashraf Sarhan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html\"},\"author\":{\"name\":\"Ashraf Sarhan\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/41260c61175c3d1b7630c05d8b01a050\"},\"headline\":\"Java Keystore Tutorial\",\"datePublished\":\"2014-07-23T08:00:32+00:00\",\"dateModified\":\"2022-11-21T13:21:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html\"},\"wordCount\":1094,\"commentCount\":29,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"keywords\":[\"Keystore\"],\"articleSection\":[\"Core Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html\",\"name\":\"Java Keystore Example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"datePublished\":\"2014-07-23T08:00:32+00:00\",\"dateModified\":\"2022-11-21T13:21:37+00:00\",\"description\":\"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/07\\\/java-keystore-tutorial.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/core-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java Keystore Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/41260c61175c3d1b7630c05d8b01a050\",\"name\":\"Ashraf Sarhan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/ashraf_sarhan_photo-96x96.jpg\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/ashraf_sarhan_photo-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/ashraf_sarhan_photo-96x96.jpg\",\"caption\":\"Ashraf Sarhan\"},\"description\":\"With over 8 years of experience in the field, I have developed and maintained large-scale distributed applications for various domains, including library, audio books, and quant trading. I am passionate about OpenSource, CNCF\\\/DevOps, Microservices, and BigData, and I constantly seek to learn new technologies and tools. I hold two Oracle certifications in Java programming and business component development.\",\"sameAs\":[\"https:\\\/\\\/www.javacodegeeks.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ashraf-sarhan\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Keystore Example","description":"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html","og_locale":"en_US","og_type":"article","og_title":"Java Keystore Example","og_description":"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4.","og_url":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-07-23T08:00:32+00:00","article_modified_time":"2022-11-21T13:21:37+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","type":"image\/jpeg"}],"author":"Ashraf Sarhan","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ashraf Sarhan","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html"},"author":{"name":"Ashraf Sarhan","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/41260c61175c3d1b7630c05d8b01a050"},"headline":"Java Keystore Tutorial","datePublished":"2014-07-23T08:00:32+00:00","dateModified":"2022-11-21T13:21:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html"},"wordCount":1094,"commentCount":29,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","keywords":["Keystore"],"articleSection":["Core Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html","url":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html","name":"Java Keystore Example","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","datePublished":"2014-07-23T08:00:32+00:00","dateModified":"2022-11-21T13:21:37+00:00","description":"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. Introduction 2. SSL and how it works 3. Private Keys 4.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/07\/java-keystore-tutorial.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/core-java"},{"@type":"ListItem","position":4,"name":"Java Keystore Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/41260c61175c3d1b7630c05d8b01a050","name":"Ashraf Sarhan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/04\/ashraf_sarhan_photo-96x96.jpg","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/04\/ashraf_sarhan_photo-96x96.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/04\/ashraf_sarhan_photo-96x96.jpg","caption":"Ashraf Sarhan"},"description":"With over 8 years of experience in the field, I have developed and maintained large-scale distributed applications for various domains, including library, audio books, and quant trading. I am passionate about OpenSource, CNCF\/DevOps, Microservices, and BigData, and I constantly seek to learn new technologies and tools. I hold two Oracle certifications in Java programming and business component development.","sameAs":["https:\/\/www.javacodegeeks.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/ashraf-sarhan"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/589"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=27942"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/27942\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/148"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=27942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=27942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=27942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}