Skip to content

Commit 514af23

Browse files
committed
bug: fix private key DER output
1 parent f6e4284 commit 514af23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/vapid.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ var vapid = {
9999
return webCrypto.exportKey("jwk", this._private_key)
100100
.then(k => {
101101
// verifying key
102-
let xv = this.url_atob(k.x);
103-
let yv = this.url_atob(k.y);
102+
let xv = String.fromCharCode.apply(null, this.url_atob(k.x));
103+
let yv = String.fromCharCode.apply(null, this.url_atob(k.y));
104104
// private key
105-
let dv = this.url_atob(k.d);
105+
let dv = String.fromCharCode.apply(null, this.url_atob(k.d));
106106

107107
// verifying key (public)
108108
let vk = '\x00\x04' + xv + yv;

0 commit comments

Comments
 (0)