File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
core/src/main/java/io/grpc/internal
okhttp/src/main/java/io/grpc/okhttp Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ public class CertificateUtils {
3737 /**
3838 * Creates X509TrustManagers using the provided CA certs.
3939 */
40- public static TrustManager [] createTrustManager (byte [] rootCerts ) throws GeneralSecurityException {
40+ public static TrustManager [] createTrustManager (byte [] rootCerts )
41+ throws GeneralSecurityException {
4142 InputStream rootCertsStream = new ByteArrayInputStream (rootCerts );
4243 try {
4344 return io .grpc .internal .CertificateUtils .createTrustManager (rootCertsStream );
Original file line number Diff line number Diff line change 1717package io .grpc .okhttp ;
1818
1919import static com .google .common .base .Preconditions .checkArgument ;
20+ import static io .grpc .internal .CertificateUtils .createTrustManager ;
2021
2122import com .google .common .base .Preconditions ;
2223import com .google .errorprone .annotations .CanIgnoreReturnValue ;
@@ -425,7 +426,7 @@ static HandshakerSocketFactoryResult handshakerSocketFactoryFrom(ServerCredentia
425426 tm = tlsCreds .getTrustManagers ().toArray (new TrustManager [0 ]);
426427 } else if (tlsCreds .getRootCertificates () != null ) {
427428 try {
428- tm = OkHttpChannelBuilder . createTrustManager (tlsCreds .getRootCertificates ());
429+ tm = createTrustManager (tlsCreds .getRootCertificates ());
429430 } catch (GeneralSecurityException gse ) {
430431 log .log (Level .FINE , "Exception loading root certificates from credential" , gse );
431432 return HandshakerSocketFactoryResult .error (
You can’t perform that action at this time.
0 commit comments