File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -130,9 +130,6 @@ export async function verify(
130
130
const notaryUrl = convertNotaryWsToHttp ( attestation . meta . notaryUrl ) ;
131
131
const publicKey = await new NotaryServer ( notaryUrl ) . publicKey ( ) ;
132
132
133
- if ( verifyingKey !== publicKey )
134
- throw new Error ( `Notary key doesn't match verifying key` ) ;
135
-
136
133
return {
137
134
version : '0.1.0-alpha.7' ,
138
135
sent : transcript . sent ( ) ,
@@ -150,10 +147,11 @@ export async function verify(
150
147
}
151
148
152
149
export function convertNotaryWsToHttp ( notaryWs : string ) {
153
- const { protocol, pathname, hostname } = new URL ( notaryWs ) ;
154
- const p = protocol === 'wss:' ? 'https:' : 'http' ;
150
+ const { protocol, pathname, hostname, port } = new URL ( notaryWs ) ;
151
+ const p = protocol === 'wss:' ? 'https:' : 'http:' ;
152
+ const pt = port ? `:${ port } ` : '' ;
155
153
const path = pathname === '/' ? '' : pathname . replace ( '/notarize' , '' ) ;
156
- return p + '//' + hostname + path ;
154
+ return p + '//' + hostname + pt + path ;
157
155
}
158
156
159
157
function defer ( ) : {
You can’t perform that action at this time.
0 commit comments