list_ssl.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!-- Begin toolbar -->
  2. <div class="toolbar">
  3. <div class="toolbar-inner">
  4. <div class="toolbar-right">
  5. </div>
  6. </div>
  7. </div>
  8. <!-- End toolbar -->
  9. <!-- Begin form -->
  10. <div class="container animate__animated animate__fadeIn">
  11. <form id="main-form" name="v_generate_csr" method="post">
  12. <input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
  13. <div class="form-container">
  14. <h1 class="u-mb20"><?= _("Generate Self-Signed SSL Certificate") ?></h1>
  15. <?php show_alert_message($_SESSION); ?>
  16. <div
  17. x-data="{
  18. text: '<?= base64_encode($v_crt) ?>',
  19. blob() {
  20. return window.URL.createObjectURL(new Blob([atob(this.text)], { type: 'text/plain' }))
  21. }
  22. }"
  23. class="u-mb20"
  24. >
  25. <label for="v_crt" class="form-label u-side-by-side">
  26. <?= _("SSL Certificate") ?>
  27. <a
  28. x-bind:href="blob()"
  29. download="<?= htmlentities($v_domain) ?>.crt"
  30. title="<?= _("Download") ?>"
  31. >
  32. <i class="fas fa-download"></i>
  33. <span class="u-hidden"><?= _("Download") ?></span>
  34. </a>
  35. </label>
  36. <textarea
  37. x-model="atob(text)"
  38. class="form-control u-min-height100"
  39. name="v_crt"
  40. id="v_crt"
  41. ></textarea>
  42. </div>
  43. <div
  44. x-data="{
  45. text: '<?= base64_encode($v_key) ?>',
  46. blob() {
  47. return window.URL.createObjectURL(new Blob([atob(this.text)], { type: 'text/plain' }))
  48. }
  49. }"
  50. class="u-mb20"
  51. >
  52. <label for="v_key" class="form-label u-side-by-side">
  53. <?= _("SSL Private Key") ?>
  54. <a
  55. x-bind:href="blob()"
  56. download="<?= htmlentities($v_domain) ?>.key"
  57. title="<?= _("Download") ?>"
  58. >
  59. <i class="fas fa-download"></i>
  60. <span class="u-hidden"><?= _("Download") ?></span>
  61. </a>
  62. </label>
  63. <textarea
  64. x-model="atob(text)"
  65. class="form-control u-min-height100"
  66. name="v_key"
  67. id="v_key"
  68. ></textarea>
  69. </div>
  70. <div
  71. x-data="{
  72. text: '<?= base64_encode($v_csr) ?>',
  73. blob() {
  74. return window.URL.createObjectURL(new Blob([atob(this.text)], { type: 'text/plain' }))
  75. }
  76. }"
  77. class="u-mb20"
  78. >
  79. <label for="v_csr" class="form-label u-side-by-side">
  80. <?= _("SSL CSR") ?>
  81. <a
  82. x-bind:href="blob()"
  83. download="<?= htmlentities($v_domain) ?>.csr"
  84. title="<?= _("Download") ?>"
  85. >
  86. <i class="fas fa-download"></i>
  87. <span class="u-hidden"><?= _("Download") ?></span>
  88. </a>
  89. </label>
  90. <textarea
  91. x-model="atob(text)"
  92. class="form-control u-min-height100"
  93. name="v_csr"
  94. id="v_csr"
  95. ></textarea>
  96. </div>
  97. </div>
  98. </form>
  99. </div>
  100. <!-- End form -->