mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
net: Add option to temporarily accept certs that failed the handshake.
This commit is contained in:
parent
433c154595
commit
6a6662195e
8 changed files with 73 additions and 13 deletions
|
@ -4,6 +4,25 @@
|
|||
</head>
|
||||
<body>
|
||||
<p>${reason}</p>
|
||||
<pre>${bytes}</pre>
|
||||
<pre id="bytes">${bytes}</pre>
|
||||
<button id="leave" onclick="history.back()">Go back (recommended)</button>
|
||||
<button id="allow">Allow certificate temporarily</button>
|
||||
<script>
|
||||
let bytes = document.getElementById('bytes').textContent;
|
||||
let button = document.getElementById('allow');
|
||||
let exitButton = document.getElementById('leave');
|
||||
if (bytes.length) {
|
||||
button.onclick = function() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'chrome:allowcert?secret=${secret}&bytes=' + btoa(bytes));
|
||||
xhr.onloadend = function() {
|
||||
location.reload(true);
|
||||
};
|
||||
xhr.send();
|
||||
};
|
||||
} else {
|
||||
button.style.display = "none";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
button {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
background: white;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue