remove hardcoded domain and use window.location.host, so this can
authordjm <djm@openbsd.org>
Tue, 11 Jan 2022 22:33:16 +0000 (22:33 +0000)
committerdjm <djm@openbsd.org>
Tue, 11 Jan 2022 22:33:16 +0000 (22:33 +0000)
be run anywhere

regress/usr.bin/ssh/unittests/sshsig/webauthn.html

index 1869c8b..5c9a32e 100644 (file)
@@ -372,8 +372,8 @@ function enrollStart(username) {
        let pkopts = {
                challenge: challenge,
                rp: {
-                       name: "mindrot.org",
-                       id: "mindrot.org",
+                       name: window.location.host,
+                       id: window.location.host,
                },
                user: {
                        id: userid,
@@ -590,7 +590,7 @@ async function assertform_submit(event) {
 function assertStart(message) {
        let assertReqOpts = {
                challenge: message,
-               rpId: "mindrot.org",
+               rpId: window.location.host,
                allowCredentials: [{
                        type: 'public-key',
                        id: window.enrollResult.rawId,