list_ssl.php 2.5 KB

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