{"id":8580,"date":"2020-10-16T00:42:28","date_gmt":"2020-10-15T22:42:28","guid":{"rendered":"http:\/\/tajdini.net\/blog\/?p=8580"},"modified":"2020-12-20T11:17:55","modified_gmt":"2020-12-20T09:17:55","slug":"adding-trusted-root-certificate-to-the-servers","status":"publish","type":"post","link":"https:\/\/tajdini.net\/blog\/cryptography-and-pki\/adding-trusted-root-certificate-to-the-servers\/","title":{"rendered":"Adding Trusted Root Certificate to the Servers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you want to send or receive messages signed by root authorities and these authorities are not installed on the server, you must add a trusted root certificate manually.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following steps to add or remove trusted root certificates to\/from a server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mac OS X<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Function<\/td><td>Method<\/td><\/tr><\/thead><tbody><tr><td>Add<\/td><td>Use command: sudo security add-trusted-cert -d -r trustRoot -k \/Library\/Keychains\/System.keychain ~\/new-root-certificate.crt<\/td><\/tr><tr><td>Remove<\/td><td>Use command: sudo security delete-certificate -c &#8220;&lt;name of existing certificate&gt;&#8221;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Windows<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Function<\/td><td>Method<\/td><\/tr><\/thead><tbody><tr><td>Add<\/td><td>Use command: certutil -addstore -f &#8220;ROOT&#8221; new-root-certificate.crt<\/td><\/tr><tr><td>Remove<\/td><td>Use command: certutil -delstore &#8220;ROOT&#8221; serial-number-hex<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Linux (Ubuntu, Debian)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Function<\/td><td>Method<\/td><\/tr><\/thead><tbody><tr><td>Add<\/td><td>Copy your CA to <code>dir \/usr\/local\/share\/ca-certificates\/<\/code> Use command: <code>sudo cp foo.crt \/usr\/local\/share\/ca-certificates\/foo.crt<\/code> Update the CA store: <code>sudo update-ca-certificates<\/code><\/td><\/tr><tr><td>Remove<\/td><td>Remove your CA. Update the CA store: <code>sudo update-ca-certificates --fresh<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2>Linux (CentOs 6)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Function<\/td><td>Method<\/td><\/tr><\/thead><tbody><tr><td>Add<\/td><td>Install the ca-certificates package: <code>yum install ca-certificates<\/code> Enable the dynamic CA configuration feature: <code>update-ca-trust force-enable<\/code> Add it as a new file to \/etc\/pki\/ca-trust\/source\/anchors\/: <code>cp foo.crt \/etc\/pki\/ca-trust\/source\/anchors\/<\/code> Use command: <code>update-ca-trust extract<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Linux (CentOs 5)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td>Function<\/td><td>Method<\/td><\/tr><\/thead><tbody><tr><td>Add<\/td><td>Append your trusted certificate to file \/etc\/pki\/tls\/certs\/ca-bundle.crt <code>cat foo.crt &gt;&gt;\/etc\/pki\/tls\/certs\/ca-bundle.crt<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to send or receive messages signed by root authorities and these authorities are not installed on the server, you must add a trusted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8582,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[223,226,227],"tags":[125,240,245,4,5,262,6],"class_list":["post-8580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cryptography-and-pki","category-identity-and-active-directory","category-linux-and-open-source","tag-active-directory","tag-certificates","tag-debian","tag-linux","tag-pki","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/comments?post=8580"}],"version-history":[{"count":1,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8580\/revisions"}],"predecessor-version":[{"id":8581,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/posts\/8580\/revisions\/8581"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/media\/8582"}],"wp:attachment":[{"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/media?parent=8580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/categories?post=8580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tajdini.net\/blog\/wp-json\/wp\/v2\/tags?post=8580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}