@@ -517,15 +517,15 @@ func verifyPrivateKeyMatchesCertificate(certificate *x509.Certificate, privateKe
517517 if ! ok {
518518 return fmt .Errorf ("certificate public key is not RSA" )
519519 }
520- if publicKey .E != typed .PublicKey . E || publicKey .N .Cmp (typed . PublicKey .N ) != 0 {
520+ if publicKey .E != typed .E || publicKey .N .Cmp (typed .N ) != 0 {
521521 return fmt .Errorf ("rsa public key mismatch" )
522522 }
523523 case * ecdsa.PrivateKey :
524524 publicKey , ok := certificate .PublicKey .(* ecdsa.PublicKey )
525525 if ! ok {
526526 return fmt .Errorf ("certificate public key is not EC" )
527527 }
528- if publicKey .X .Cmp (typed .PublicKey . X ) != 0 || publicKey .Y .Cmp (typed .PublicKey . Y ) != 0 || publicKey .Curve != typed . PublicKey .Curve {
528+ if publicKey .X .Cmp (typed .X ) != 0 || publicKey .Y .Cmp (typed .Y ) != 0 || publicKey .Curve != typed .Curve {
529529 return fmt .Errorf ("ecdsa public key mismatch" )
530530 }
531531 case ed25519.PrivateKey :
@@ -609,15 +609,15 @@ func (p *Plugin) describeX509Chain() map[string]interface{} {
609609 }
610610
611611 chain := map [string ]interface {}{
612- "chain_depth" : len (certs ),
612+ "chain_depth" : len (certs ),
613613 "signing_algorithm" : sigAlg ,
614614 "leaf" : map [string ]interface {}{
615- "subject" : leaf .Subject .CommonName ,
616- "issuer" : leaf .Issuer .CommonName ,
617- "dns_names" : leaf .DNSNames ,
618- "serial" : leaf .SerialNumber .String (),
619- "not_before" : leaf .NotBefore .Format (time .RFC3339 ),
620- "not_after" : leaf .NotAfter .Format (time .RFC3339 ),
615+ "subject" : leaf .Subject .CommonName ,
616+ "issuer" : leaf .Issuer .CommonName ,
617+ "dns_names" : leaf .DNSNames ,
618+ "serial" : leaf .SerialNumber .String (),
619+ "not_before" : leaf .NotBefore .Format (time .RFC3339 ),
620+ "not_after" : leaf .NotAfter .Format (time .RFC3339 ),
621621 "public_key_algorithm" : leaf .PublicKeyAlgorithm .String (),
622622 },
623623 }
0 commit comments