{"id":11154,"date":"2024-07-22T19:53:00","date_gmt":"2024-07-23T00:53:00","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=11154"},"modified":"2024-09-17T13:01:08","modified_gmt":"2024-09-17T18:01:08","slug":"verifying-key-and-cert-go-together","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=11154","title":{"rendered":"Verifying Public and Private Keys Go Together"},"content":{"rendered":"\n<p>I have no idea how exactly I managed this &#8212; but I was renewing certificates on a group of servers and had one that <em>would not work<\/em>. It&#8217;s a Java app, and it just threw a generic handshake error. Even adding debugging didn&#8217;t add any useful information. It just didn&#8217;t work. Turns out my pubilc key and private key files didn&#8217;t go together. I didn&#8217;t bother figuring out which one I got wrong &#8212; I just downloaded the zip file from our cert provider again. <\/p>\n\n\n\n<p>Using openssl to check the modulus of the cert and key &#8212; by getting an md5 checksum of the value, it&#8217;s a little easier to compare. This public private key pair go together &#8212; they&#8217;ve got the same modulus. My original files? Not so much &#8212; two different values!<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nlinux1570:certs # openssl x509 -noout -modulus -in \/opt\/elk\/opensearch_config\/certs\/20240722\/$(hostname).pem | openssl md5\n(stdin)= 52ca3e85fa7cb564dd395a8f801f9bdf\nlinux1570:certs # openssl rsa -noout -modulus -in \/opt\/elk\/opensearch_config\/certs\/20240722\/$(hostname)-nopass.key | openssl md5\n(stdin)= 52ca3e85fa7cb564dd395a8f801f9bdf\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>I have no idea how exactly I managed this &#8212; but I was renewing certificates on a group of servers and had one that would not work. It&#8217;s a Java app, and it just threw a generic handshake error. Even adding debugging didn&#8217;t add any useful information. It just didn&#8217;t work. Turns out my pubilc &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[234],"class_list":["post-11154","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-openssl"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11154"}],"version-history":[{"count":3,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11154\/revisions"}],"predecessor-version":[{"id":11157,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/11154\/revisions\/11157"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}