node.js https server example
'use strict';
diff --git a/app/js/app.js b/app/js/app.js
index de8c908..5cf45a5 100644
--- a/app/js/app.js
+++ b/app/js/app.js
@@ -471,6 +471,8 @@
console.log('WINNING!');
console.log(certs);
$qs('#js-fullchain').innerHTML = certs;
+ $qs("#js-download-fullchain-link").href =
+ "data:text/octet-stream;base64," + window.btoa(certs);
// https://stackoverflow.com/questions/40314257/export-webcrypto-key-to-pem-format
function spkiToPEM(keydata){
@@ -530,6 +532,8 @@
}).then (function (keydata) {
var pem = spkiToPEM(keydata);
$qs('#js-privkey').innerHTML = pem;
+ $qs("#js-download-privkey-link").href =
+ "data:text/octet-stream;base64," + window.btoa(pem);
steps[i]();
}).catch(function(err){
console.error(err);
diff --git a/app/styles/main.css b/app/styles/main.css
index 934cbd3..6fd048d 100644
--- a/app/styles/main.css
+++ b/app/styles/main.css
@@ -191,12 +191,12 @@ pre {
display: none;
}
-.download-ver-file svg {
+.download-file svg {
fill: #5bc17f;
width: 1.333333333em;
}
-.download-ver-file a {
+.download-file a {
color: #5bc17f;
}
@@ -250,3 +250,8 @@ pre {
white-space: pre-line;
word-break: break-all;
}
+
+
+.cert-download-container {
+ margin: 0 -31%;
+}
\ No newline at end of file