-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create 0002-Fix-advance-tls-build-with-go-119.patch
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- ./google.golang.org/grpc/security/advancedtls/advancedtls.go | ||
+++ ./google.golang.org/grpc/security/advancedtls/advancedtls.go | ||
@@ -576,7 +576,7 @@ func buildVerifyFunc(c *advancedTLSCreds, | ||
if verifiedChains == nil { | ||
verifiedChains = CertificateChains{rawCertList} | ||
} | ||
- if err := checkChainRevocation(verifiedChains, *c.revocationOptions); err != nil { | ||
+ if err := CheckChainRevocation(verifiedChains, *c.revocationOptions); err != nil { | ||
return err | ||
} | ||
} | ||
|
||
--- ./google.golang.org/grpc/security/advancedtls/crl.go | ||
+++ ./google.golang.org/grpc/security/advancedtls/crl.go | ||
@@ -119,7 +119,7 @@ var ( | ||
|
||
// checkChainRevocation checks the verified certificate chain | ||
// for revoked certificates based on RFC5280. | ||
-func checkChainRevocation(verifiedChains [][]*x509.Certificate, cfg RevocationOptions) error { | ||
+func CheckChainRevocation(verifiedChains [][]*x509.Certificate, cfg RevocationOptions) error { | ||
// Iterate the verified chains looking for one that is RevocationUnrevoked. | ||
// A single RevocationUnrevoked chain is enough to allow the connection, and a single RevocationRevoked | ||
// chain does not mean the connection should fail. | ||
@@ -224,7 +224,7 @@ func checkCertRevocation(c *x509.Certificate, crl *CRL) (revocationStatus, error | ||
rawEntryIssuer := crl.rawIssuer | ||
|
||
// Loop through all the revoked certificates. | ||
- for _, revCert := range crl.certList.RevokedCertificateEntries { | ||
+ for _, revCert := range crl.certList.RevokedCertificates { | ||
// 5.3 Loop through CRL entry extensions for needed information. | ||
for _, ext := range revCert.Extensions { | ||
if oidCertificateIssuer.Equal(ext.Id) { | ||
-- |