@@ -381,7 +381,7 @@ func (s) TestClientServerHandshake(t *testing.T) {
381381 return & GetRootCAsResults {TrustCerts : cs .ServerTrust3 }, nil
382382 }
383383
384- makeStaticCRLProvider := func (crlPath string , allowUndetermined bool ) * RevocationConfig {
384+ makeStaticCRLRevocationConfig := func (crlPath string , allowUndetermined bool ) * RevocationConfig {
385385 rawCRL , err := os .ReadFile (crlPath )
386386 if err != nil {
387387 t .Fatalf ("readFile(%v) failed err = %v" , crlPath , err )
@@ -731,13 +731,13 @@ func (s) TestClientServerHandshake(t *testing.T) {
731731 // Expected Behavior: success, because none of the certificate chains sent in the connection are revoked
732732 {
733733 desc : "Client sets peer cert, reload root function with verifyFuncGood; Server sets peer cert, reload root function; Client uses CRL; mutualTLS" ,
734- clientCert : []tls.Certificate {cs .ClientCert3 },
734+ clientCert : []tls.Certificate {cs .ClientCertForCRL },
735735 clientGetRoot : getRootCAsForClientCRL ,
736736 clientVerifyFunc : clientVerifyFuncGood ,
737737 clientVType : CertVerification ,
738- clientRevocationConfig : makeStaticCRLProvider (testdata .Path ("crl/provider_crl_empty.pem" ), true ),
738+ clientRevocationConfig : makeStaticCRLRevocationConfig (testdata .Path ("crl/provider_crl_empty.pem" ), true ),
739739 serverMutualTLS : true ,
740- serverCert : []tls.Certificate {cs .ServerCert3 },
740+ serverCert : []tls.Certificate {cs .ServerCertForCRL },
741741 serverGetRoot : getRootCAsForServerCRL ,
742742 serverVType : CertVerification ,
743743 },
@@ -746,13 +746,13 @@ func (s) TestClientServerHandshake(t *testing.T) {
746746 // Expected Behavior: fail, server creds are revoked
747747 {
748748 desc : "Client sets peer cert, reload root function with verifyFuncGood; Server sets revoked cert; Client uses CRL; mutualTLS" ,
749- clientCert : []tls.Certificate {cs .ClientCert3 },
749+ clientCert : []tls.Certificate {cs .ClientCertForCRL },
750750 clientGetRoot : getRootCAsForClientCRL ,
751751 clientVerifyFunc : clientVerifyFuncGood ,
752752 clientVType : CertVerification ,
753- clientRevocationConfig : makeStaticCRLProvider (testdata .Path ("crl/provider_crl_server_revoked.pem" ), true ),
753+ clientRevocationConfig : makeStaticCRLRevocationConfig (testdata .Path ("crl/provider_crl_server_revoked.pem" ), true ),
754754 serverMutualTLS : true ,
755- serverCert : []tls.Certificate {cs .ServerCert3 },
755+ serverCert : []tls.Certificate {cs .ServerCertForCRL },
756756 serverGetRoot : getRootCAsForServerCRL ,
757757 serverVType : CertVerification ,
758758 serverExpectError : true ,
@@ -763,13 +763,13 @@ func (s) TestClientServerHandshake(t *testing.T) {
763763 // can't be properly processed, and we don't allow RevocationUndetermined.
764764 {
765765 desc : "Client sets peer cert, reload root function with verifyFuncGood; Server sets peer cert, reload root function; Client uses CRL; mutualTLS" ,
766- clientCert : []tls.Certificate {cs .ClientCert3 },
766+ clientCert : []tls.Certificate {cs .ClientCertForCRL },
767767 clientGetRoot : getRootCAsForClientCRL ,
768768 clientVerifyFunc : clientVerifyFuncGood ,
769769 clientVType : CertVerification ,
770- clientRevocationConfig : makeStaticCRLProvider (testdata .Path ("crl/provider_malicious_crl_empty.pem" ), false ),
770+ clientRevocationConfig : makeStaticCRLRevocationConfig (testdata .Path ("crl/provider_malicious_crl_empty.pem" ), false ),
771771 serverMutualTLS : true ,
772- serverCert : []tls.Certificate {cs .ServerCert3 },
772+ serverCert : []tls.Certificate {cs .ServerCertForCRL },
773773 serverGetRoot : getRootCAsForServerCRL ,
774774 serverVType : CertVerification ,
775775 serverExpectError : true ,
0 commit comments