@@ -249,6 +249,11 @@ type Options struct {
249
249
// RevocationOptions is the configurations for certificate revocation checks.
250
250
// It could be nil if such checks are not needed.
251
251
RevocationOptions * RevocationOptions
252
+ // RevocationConfig is the configurations for certificate revocation checks.
253
+ // It could be nil if such checks are not needed.
254
+ //
255
+ // Deprecated: use RevocationOptions instead.
256
+ RevocationConfig * RevocationConfig
252
257
// MinVersion contains the minimum TLS version that is acceptable.
253
258
//
254
259
// Deprecated: use MinTLSVersion instead.
@@ -689,6 +694,12 @@ func buildVerifyFunc(c *advancedTLSCreds,
689
694
// NewClientCreds uses ClientOptions to construct a TransportCredentials based
690
695
// on TLS.
691
696
func NewClientCreds (o * Options ) (credentials.TransportCredentials , error ) {
697
+ // TODO(gtcooke94) RevocationConfig is deprecated, eventually remove this block.
698
+ // This will ensure that users still explicitly setting RevocationConfig will get
699
+ // the setting in the right place.
700
+ if o .RevocationConfig != nil {
701
+ o .RevocationOptions = o .RevocationConfig
702
+ }
692
703
conf , err := o .clientConfig ()
693
704
if err != nil {
694
705
return nil , err
@@ -708,6 +719,12 @@ func NewClientCreds(o *Options) (credentials.TransportCredentials, error) {
708
719
// NewServerCreds uses ServerOptions to construct a TransportCredentials based
709
720
// on TLS.
710
721
func NewServerCreds (o * Options ) (credentials.TransportCredentials , error ) {
722
+ // TODO(gtcooke94) RevocationConfig is deprecated, eventually remove this block.
723
+ // This will ensure that users still explicitly setting RevocationConfig will get
724
+ // the setting in the right place.
725
+ if o .RevocationConfig != nil {
726
+ o .RevocationOptions = o .RevocationConfig
727
+ }
711
728
conf , err := o .serverConfig ()
712
729
if err != nil {
713
730
return nil , err
0 commit comments