Skip to content

Commit b787b89

Browse files
committed
cleaned up comments
1 parent 01df67a commit b787b89

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • google-api-client/src/main/java/com/google/api/client/googleapis

‎google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static KeyStore getBundledKeystore() throws IOException, GeneralSecurityExceptio
107107

108108
/**
109109
* Loads the default JDK keystore (cacerts) containing trusted root certificates.
110-
* Uses Java's system properties to locate the default trust store.
110+
* Uses Java's system properties + known cert locations to locate the default trust store.
111111
*
112112
* @return the loaded keystore
113113
*/
@@ -128,7 +128,7 @@ static KeyStore getJdkDefaultKeyStore() throws IOException, GeneralSecurityExcep
128128
}
129129
}
130130

131-
throw new IOException("Unable to find JDK cacerts file in java.home: " + javaHome);
131+
throw new IOException("Unable to load default JDK cacerts file");
132132
}
133133

134134
/**
@@ -140,9 +140,8 @@ static KeyStore getJdkDefaultKeyStore() throws IOException, GeneralSecurityExcep
140140
* available, it falls back to loading the bundled Google certificate store.
141141
*
142142
* @since 1.14
143-
* @deprecated This method relies on a a bundled certificate store that is not maintained. Please
144-
* use {@link #getJdkDefaultKeyStore()} to load the JDK default keystore directly, or use your
145-
* own certificate store as needed.
143+
* @deprecated Depending on your build environment this method potentially can contain outdated certs if loading jdk default certs fails.
144+
* Instead of getting trusted certs directly use an HttpTransport wrapper such as {@link <a href="https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.javanet.NetHttpTransport">NetHttpTransport</a>} which use java jdk private classes to load default jdk certs specifically for your build environment. If you need to access the keystore directly please create your own keystore file.
146145
*/
147146
@Deprecated
148147
public static synchronized KeyStore getCertificateTrustStore()

0 commit comments

Comments
 (0)