Skip to content

Commit 722a125

Browse files
address reviews
1 parent b8306fc commit 722a125

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

authentication/oidc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ func newOIDCAuthenticator(c map[string]interface{}, tenant string,
104104
for {
105105
block, rest = pem.Decode(rest)
106106
if block == nil {
107-
if len(config.issuerCAs) == 0 {
108-
return nil, fmt.Errorf("failed to parse issuer CA certificate PEM")
109-
}
110-
111107
break
112108
}
113109

@@ -118,6 +114,10 @@ func newOIDCAuthenticator(c map[string]interface{}, tenant string,
118114

119115
config.issuerCAs = append(config.issuerCAs, cert)
120116
}
117+
118+
if len(config.issuerCAs) == 0 {
119+
return nil, fmt.Errorf("failed to parse issuer CA certificate PEM")
120+
}
121121
}
122122

123123
t := &http.Transport{

0 commit comments

Comments
 (0)