@@ -308,7 +308,7 @@ func (p *Peer) initiateHandshake(ctx context.Context, peerIdentityKey *ec.Public
308308
309309 // Get our identity key to include in the initial request
310310 pubKey , err := p .wallet .GetPublicKey (ctx , wallet.GetPublicKeyArgs {
311- IdentityKey : true ,
311+ IdentityKey : true ,
312312 EncryptionArgs : wallet.EncryptionArgs {
313313 // No specific protocol or key ID needed for identity key
314314 },
@@ -595,6 +595,7 @@ func (p *Peer) handleCertificateRequest(ctx context.Context, message *AuthMessag
595595 return fmt .Errorf ("failed to serialize certificate request data: %w" , err )
596596 }
597597
598+ // Try to parse the signature
598599 signature , err := ec .ParseSignature (message .Signature )
599600 if err != nil {
600601 return fmt .Errorf ("failed to parse signature: %w" , err )
@@ -676,9 +677,10 @@ func (p *Peer) handleCertificateResponse(ctx context.Context, message *AuthMessa
676677 return fmt .Errorf ("failed to serialize certificate data: %w" , err )
677678 }
678679
680+ // Try to parse the signature
679681 signature , err := ec .ParseSignature (message .Signature )
680682 if err != nil {
681- return nil
683+ return fmt . Errorf ( "failed to parse signature: %w" , err )
682684 }
683685
684686 // Verify signature
@@ -772,9 +774,10 @@ func (p *Peer) handleGeneralMessage(ctx context.Context, message *AuthMessage, s
772774 session .LastUpdate = time .Now ().UnixMilli ()
773775 p .sessionManager .UpdateSession (session )
774776
777+ // Try to parse the signature
775778 signature , err := ec .ParseSignature (message .Signature )
776779 if err != nil {
777- return nil
780+ return fmt . Errorf ( "failed to parse signature: %w" , err )
778781 }
779782
780783 // Verify signature
0 commit comments