@@ -127,28 +127,17 @@ export class BindingDocumentService {
127127 signature : string ,
128128 doc : { subject : string ; type : BindingDocumentType ; data : BindingDocumentData } ,
129129 ) : Promise < boolean > {
130- if ( ! this . registryUrl ) {
131- console . warn ( "[BindingDoc] verifyUserSignature: no registryUrl configured" ) ;
132- return false ;
133- }
130+ if ( ! this . registryUrl ) return false ;
134131 try {
135132 const payload = getCanonicalBindingDocumentString ( doc ) ;
136- console . log ( "[BindingDoc] verifyUserSignature:" , {
137- signer,
138- signaturePrefix : signature . substring ( 0 , 40 ) + "..." ,
139- payload : payload . substring ( 0 , 200 ) ,
140- registryBaseUrl : this . registryUrl ,
141- } ) ;
142133 const result = await verifySignature ( {
143134 eName : signer ,
144135 signature,
145136 payload,
146137 registryBaseUrl : this . registryUrl ,
147138 } ) ;
148- console . log ( "[BindingDoc] verifyUserSignature result:" , result ) ;
149139 return result . valid ;
150- } catch ( err ) {
151- console . error ( "[BindingDoc] verifyUserSignature threw:" , err ) ;
140+ } catch {
152141 return false ;
153142 }
154143 }
@@ -232,18 +221,6 @@ export class BindingDocumentService {
232221 const hasLegacyHashSignature = input . ownerSignature . signature === expectedHash ;
233222 const isProvisionerSigner = / ^ h t t p s ? : \/ \/ / . test ( input . ownerSignature . signer ) ;
234223
235- console . log ( "[BindingDoc] createBindingDocument signature check:" , {
236- signer : input . ownerSignature . signer ,
237- signaturePrefix : input . ownerSignature . signature . substring ( 0 , 40 ) + "..." ,
238- expectedHash,
239- hasLegacyHashSignature,
240- isProvisionerSigner,
241- normalizedSubject,
242- inputType : input . type ,
243- validatedDataKeys : Object . keys ( validatedData ) ,
244- canonicalPayload : getCanonicalBindingDocumentString ( docToVerify ) . substring ( 0 , 300 ) ,
245- } ) ;
246-
247224 const hasValidUserSignature =
248225 ! hasLegacyHashSignature &&
249226 ! isProvisionerSigner &&
@@ -253,12 +230,6 @@ export class BindingDocumentService {
253230 docToVerify ,
254231 ) ) ;
255232
256- console . log ( "[BindingDoc] createBindingDocument final verdict:" , {
257- hasLegacyHashSignature,
258- isProvisionerSigner,
259- hasValidUserSignature,
260- } ) ;
261-
262233 if ( ! hasLegacyHashSignature && ! isProvisionerSigner && ! hasValidUserSignature ) {
263234 throw new ValidationError ( "Invalid owner signature" ) ;
264235 }
0 commit comments