@@ -377,7 +377,15 @@ func (s *Server) unlimitedDo(pkt *protocol.Packet, connName string) response {
377
377
sig , err := key .Sign (rand .Reader , pkt .Operation .Payload , crypto .Hash (0 ))
378
378
if err != nil {
379
379
log .Errorf ("Connection: %s: Signing error: %v" , connName , protocol .ErrCrypto , err )
380
- return makeErrResponse (pkt , protocol .ErrCrypto )
380
+ // This indicates that a remote keyserver is being used
381
+ var remoteConfigurationErr RemoteConfigurationErr
382
+ if errors .As (err , & remoteConfigurationErr ) {
383
+ log .Errorf ("Connection %v: %s: Signing error: %v\n " , connName , protocol .ErrRemoteConfiguration , err )
384
+ return makeErrResponse (pkt , protocol .ErrRemoteConfiguration )
385
+ } else {
386
+ log .Errorf ("Connection %v: %s: Signing error: %v\n " , connName , protocol .ErrCrypto , err )
387
+ return makeErrResponse (pkt , protocol .ErrCrypto )
388
+ }
381
389
}
382
390
return makeRespondResponse (pkt , sig )
383
391
@@ -486,8 +494,15 @@ func (s *Server) unlimitedDo(pkt *protocol.Packet, connName string) response {
486
494
continue
487
495
} else {
488
496
tracing .LogError (span , err )
489
- log .Errorf ("Connection %v: %s: Signing error: %v\n " , connName , protocol .ErrCrypto , err )
490
- return makeErrResponse (pkt , protocol .ErrCrypto )
497
+ // This indicates that a remote keyserver is being used
498
+ var remoteConfigurationErr RemoteConfigurationErr
499
+ if errors .As (err , & remoteConfigurationErr ) {
500
+ log .Errorf ("Connection %v: %s: Signing error: %v\n " , connName , protocol .ErrRemoteConfiguration , err )
501
+ return makeErrResponse (pkt , protocol .ErrRemoteConfiguration )
502
+ } else {
503
+ log .Errorf ("Connection %v: %s: Signing error: %v\n " , connName , protocol .ErrCrypto , err )
504
+ return makeErrResponse (pkt , protocol .ErrCrypto )
505
+ }
491
506
}
492
507
}
493
508
break
0 commit comments