0161.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Adding Self-Signed PKI to Linux Trusted Certificate Authorities</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Home Lab,Home Lab Ideas,Install Guide,PKI,Public Key Infrastructure,SSL,SSL Certificates,Self-Signed,Self-Signed Certificate,Self-Signed HTTPS,Self-Signed PKI,Self-Signed SSL,X Certificate And Key Management,XCA,X Certificate Key Manager,Certificates,Certificate Authority,HTTPS,Linux,Debian,How To Add Self-signed Certificates To Linux,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Adding Self-Signed PKI to Linux Trusted Certificate Authorities">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="12/28/2022 07:13:03 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Adding Self-Signed PKI to Linux Trusted Certificate Authorities</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>Prerequisites</h2>
  26. <ul>
  27. <li class="noCheckbox">A XCA PKI database <a href="https://youtu.be/ezzj3x207lQ" target="_blank">https://youtu.be/ezzj3x207lQ</a></li>
  28. </ul>
  29. <h2>Exporting Certificates from XCA</h2>
  30. <ol>
  31. <li>Launch XCA</li>
  32. <li>Open the PKI database if it is not already (File &gt; Open DataBase), enter password</li>
  33. <li>Click on the Certificates tab</li>
  34. <li>Right click the Intermediate CA certificate &gt; Export &gt; File</li>
  35. <li>Set the file name with a .crt extension and verify the export format is PEM (*.crt)</li>
  36. <li>Click OK</li>
  37. <li>Right click the Root CA certificate &gt; Export &gt; File</li>
  38. <li>Set the file name with a .crt extension and verify the export format is PEM (*.crt)</li>
  39. <li>Click OK</li>
  40. </ol>
  41. <h2>Trusting the CA Ceritificates in a Linux Environment</h2>
  42. <ol>
  43. <li>Download WinSCP <a href="https://winscp.net/eng/downloads.php" target="_blank">Download</a></li>
  44. <li>Extract WinSCP and run the executable</li>
  45. <li>Connect to the target Linux device server via WinSCP</li>
  46. <li>Copy the created .crt files to ~/</li>
  47. <li>Log into the target Linux device (console or ssh)</li>
  48. <li>Run the following commands in a terminal window:
  49. <div class="codeBlock">sudo mkdir /usr/local/share/ca-certificates/self-signed<br />
  50. sudo cp ~/root-ca.crt /usr/local/share/ca-certificates/self-signed<br />
  51. sudo cp ~/intermediate-ca.crt /usr/local/share/ca-certificates/self-signed<br />
  52. sudo update-ca-certificates</div>
  53. </li>
  54. <li>An ouput stating 2 added should display</li>
  55. <li>Run the following command in a terminal window and verify the imported certificate authorities display in the list
  56. <div class="codeBlock">sudo ls /etc/ssl/certs</div>
  57. </li>
  58. </ol> </div>
  59. </div>
  60. </body>
  61. </html>