@@ -236,16 +236,6 @@ private byte[] BuildAuthData()
236236 attestedCredentialData : true
237237 ) ;
238238
239- // Log for debugging
240- Log . Debug ( "AuthenticatorAttestationResponse" ,
241- $ "Base authData length: { authData . Length } , RP ID: { requestOptions . RelyingPartyEntity . Id } ") ;
242- Log . Debug ( "AuthenticatorAttestationResponse" ,
243- $ "AAGUID length: { AaGuid1 . Length } , CredentialId length: { credentialId . Length } ") ;
244- Log . Debug ( "AuthenticatorAttestationResponse" ,
245- $ "CredentialPublicKey length: { credentialPublicKey . Length } ") ;
246- Log . Debug ( "AuthenticatorAttestationResponse" ,
247- $ "CredentialPublicKey CBOR hex: { BitConverter . ToString ( credentialPublicKey ) } ") ;
248-
249239 // Append AAGUID + credIdLen + credentialId + credentialPublicKey
250240 var credIdLen = new [ ]
251241 {
@@ -260,9 +250,6 @@ private byte[] BuildAuthData()
260250 . Concat ( credentialPublicKey )
261251 . ToArray ( ) ;
262252
263- Log . Debug ( "AuthenticatorAttestationResponse" ,
264- $ "Final authData length: { result . Length } ") ;
265-
266253 return result ;
267254 }
268255
@@ -282,16 +269,6 @@ public JSONObject ToJson()
282269 var authData = BuildAuthData ( ) ;
283270 var attestationObject = BuildAttestationObject ( ) ;
284271
285- // Log hex bytes for debugging - FULL dumps for comparison with KeePassDX
286- Log . Debug ( "AuthenticatorAttestationResponse" ,
287- $ "=== FULL AuthData ({ authData . Length } bytes) ===") ;
288- Log . Debug ( "AuthenticatorAttestationResponse" ,
289- BitConverter . ToString ( authData ) ) ;
290- Log . Debug ( "AuthenticatorAttestationResponse" ,
291- $ "=== FULL AttestationObject ({ attestationObject . Length } bytes) ===") ;
292- Log . Debug ( "AuthenticatorAttestationResponse" ,
293- BitConverter . ToString ( attestationObject ) ) ;
294-
295272 var json = new JSONObject ( ) ;
296273 json . Put ( "clientDataJSON" , clientDataResponse . BuildResponse ( ) ) ;
297274 json . Put ( "authenticatorData" , Base64EncodeUrlSafe ( authData ) ) ;
@@ -357,10 +334,6 @@ IClientDataResponse clientDataResponse
357334 {
358335 _userHandle = userHandle ;
359336
360- Log . Debug ( "AuthenticatorAssertionResponse" , "=== AUTHENTICATION DEBUG ===" ) ;
361- Log . Debug ( "AuthenticatorAssertionResponse" , $ "RP ID: { requestOptions . RpId } ") ;
362- Log . Debug ( "AuthenticatorAssertionResponse" , $ "Challenge (base64): { Base64 . EncodeToString ( requestOptions . Challenge , Base64Flags . UrlSafe | Base64Flags . NoPadding | Base64Flags . NoWrap ) } ") ;
363-
364337 _authenticatorData = AuthenticatorDataBuilder . BuildAuthenticatorData (
365338 relyingPartyId : Encoding . UTF8 . GetBytes ( requestOptions . RpId ) ,
366339 userPresent : userPresent ,
@@ -369,18 +342,11 @@ IClientDataResponse clientDataResponse
369342 backupState : backupState
370343 ) ;
371344
372- Log . Debug ( "AuthenticatorAssertionResponse" , $ "AuthenticatorData ({ _authenticatorData . Length } bytes): { BitConverter . ToString ( _authenticatorData ) } ") ;
373-
374345 var clientDataHash = clientDataResponse . HashData ( ) ;
375- Log . Debug ( "AuthenticatorAssertionResponse" , $ "ClientDataHash ({ clientDataHash . Length } bytes): { BitConverter . ToString ( clientDataHash ) } ") ;
376- Log . Debug ( "AuthenticatorAssertionResponse" , $ "ClientDataJSON: { Encoding . UTF8 . GetString ( Base64 . Decode ( clientDataResponse . BuildResponse ( ) , Base64Flags . UrlSafe | Base64Flags . NoPadding ) ) } ") ;
377346
378347 // Sign: authenticatorData || clientDataHash
379348 var dataToSign = _authenticatorData . Concat ( clientDataHash ) . ToArray ( ) ;
380- Log . Debug ( "AuthenticatorAssertionResponse" , $ "DataToSign ({ dataToSign . Length } bytes): { BitConverter . ToString ( dataToSign ) } ") ;
381-
382349 _signature = PasskeyCryptoHelper . Sign ( privateKeyPem , dataToSign ) ;
383- Log . Debug ( "AuthenticatorAssertionResponse" , $ "Signature ({ _signature . Length } bytes): { BitConverter . ToString ( _signature ) } ") ;
384350 }
385351
386352 public JSONObject ToJson ( IClientDataResponse clientDataResponse )
@@ -395,12 +361,6 @@ public JSONObject ToJson(IClientDataResponse clientDataResponse)
395361 json . Put ( "signature" , signatureB64 ) ;
396362 json . Put ( "userHandle" , _userHandle ) ;
397363
398- Log . Debug ( "AuthenticatorAssertionResponse" , "=== RESPONSE JSON FIELDS ===" ) ;
399- Log . Debug ( "AuthenticatorAssertionResponse" , $ "clientDataJSON: { clientDataJson } ") ;
400- Log . Debug ( "AuthenticatorAssertionResponse" , $ "authenticatorData (base64): { authenticatorDataB64 } ") ;
401- Log . Debug ( "AuthenticatorAssertionResponse" , $ "signature (base64): { signatureB64 } ") ;
402- Log . Debug ( "AuthenticatorAssertionResponse" , $ "userHandle: { _userHandle } ") ;
403-
404364 return json ;
405365 }
406366
@@ -425,24 +385,7 @@ public string ToJson()
425385 json . Put ( "authenticatorAttachment" , authenticatorAttachment ) ;
426386 json . Put ( "response" , response ) ;
427387
428-
429- var jsonString = json . ToString ( ) ;
430- Log . Debug ( "FidoPublicKeyCredential" , "=== COMPLETE CREDENTIAL JSON ===" ) ;
431- Log . Debug ( "FidoPublicKeyCredential" , $ "id: { id } ") ;
432- Log . Debug ( "FidoPublicKeyCredential" , $ "rawId: { id } ") ;
433- Log . Debug ( "FidoPublicKeyCredential" , $ "type: public-key") ;
434- Log . Debug ( "FidoPublicKeyCredential" , $ "authenticatorAttachment: { authenticatorAttachment } ") ;
435- Log . Debug ( "FidoPublicKeyCredential" , $ "Full JSON length: { jsonString . Length } ") ;
436-
437- // Log JSON in chunks to avoid truncation
438- const int chunkSize = 200 ;
439- for ( int i = 0 ; i < jsonString . Length ; i += chunkSize )
440- {
441- int length = Math . Min ( chunkSize , jsonString . Length - i ) ;
442- Log . Debug ( "FidoPublicKeyCredential" , $ "Complete JSON chunk { i / chunkSize } : { jsonString . Substring ( i , length ) } ") ;
443- }
444-
445- return jsonString ;
388+ return json . ToString ( ) ;
446389 }
447390 }
448391}
0 commit comments