@@ -43,8 +43,7 @@ type TPM struct {
43
43
KeyHandle uint32 // path to the ptm device /dev/tpm0
44
44
ECCRawOutput bool // for ECC keys, output raw signatures. If false, signature is ans1 formatted
45
45
refreshMutex sync.Mutex
46
- PublicCertFile string // a provided public x509 certificate for the signer
47
- ExtTLSConfig * tls.Config // override tls.Config values
46
+ PublicCertFile string // a provided public x509 certificate for the signer
48
47
PCRs []int
49
48
50
49
x509Certificate x509.Certificate
@@ -70,15 +69,6 @@ func NewTPMCrypto(conf *TPM) (TPM, error) {
70
69
if conf .TpmPath != "" && conf .KeyHandle == 0 {
71
70
return TPM {}, fmt .Errorf ("salrashid123/x/oauth2/google: if TPMTokenConfig.TPMPath is specified, a KeyHandle must be set" )
72
71
}
73
- if conf .ExtTLSConfig != nil {
74
- if len (conf .ExtTLSConfig .Certificates ) > 0 {
75
- return TPM {}, fmt .Errorf ("certificates value in ExtTLSConfig Ignored" )
76
- }
77
-
78
- if len (conf .ExtTLSConfig .CipherSuites ) > 0 {
79
- return TPM {}, fmt .Errorf ("cipherSuites value in ExtTLSConfig Ignored" )
80
- }
81
- }
82
72
return * conf , nil
83
73
}
84
74
@@ -237,18 +227,3 @@ func (t TPM) TLSCertificate() tls.Certificate {
237
227
Certificate : [][]byte {t .x509Certificate .Raw },
238
228
}
239
229
}
240
-
241
- func (t TPM ) TLSConfig () * tls.Config {
242
-
243
- return & tls.Config {
244
- Certificates : []tls.Certificate {t .TLSCertificate ()},
245
-
246
- RootCAs : t .ExtTLSConfig .RootCAs ,
247
- ClientCAs : t .ExtTLSConfig .ClientCAs ,
248
- ClientAuth : t .ExtTLSConfig .ClientAuth ,
249
- ServerName : t .ExtTLSConfig .ServerName ,
250
- CipherSuites : t .ExtTLSConfig .CipherSuites ,
251
- MaxVersion : t .ExtTLSConfig .MaxVersion ,
252
- MinVersion : t .ExtTLSConfig .MinVersion ,
253
- }
254
- }
0 commit comments