Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e4fc0a0
feat: support keystore in transport for mtls
arithmetic1728 Oct 15, 2020
3f3d403
fix format
arithmetic1728 Oct 15, 2020
0feec05
update code
arithmetic1728 Oct 15, 2020
a71a009
add tests
arithmetic1728 Oct 16, 2020
3c10eaa
update test and doc
arithmetic1728 Oct 16, 2020
275bad0
update names
arithmetic1728 Oct 23, 2020
e21791c
create keystore from cert and key string
arithmetic1728 Oct 23, 2020
2edb134
change certAndKey from string to inputstream
arithmetic1728 Oct 26, 2020
09847d7
add mtls file
arithmetic1728 Oct 27, 2020
c4bc00d
Update google-http-client/src/main/java/com/google/api/client/http/ja…
arithmetic1728 Oct 29, 2020
a97ea3d
Update google-http-client/src/main/java/com/google/api/client/http/ja…
arithmetic1728 Oct 29, 2020
7469467
Update google-http-client/src/main/java/com/google/api/client/util/Ss…
arithmetic1728 Oct 29, 2020
a61ed1a
Update google-http-client/src/main/java/com/google/api/client/util/Ss…
arithmetic1728 Oct 29, 2020
93c3452
Update google-http-client/src/test/java/com/google/api/client/util/Se…
arithmetic1728 Oct 29, 2020
d195f65
Update google-http-client/src/main/java/com/google/api/client/util/Ss…
arithmetic1728 Oct 29, 2020
13d7d19
update the code
arithmetic1728 Oct 29, 2020
bade79a
fix name
arithmetic1728 Oct 29, 2020
a8d60ea
chore: add Beta annotation for new mtls functions
arithmetic1728 Oct 30, 2020
271c262
resolve conflict
arithmetic1728 Oct 30, 2020
eb9a90d
update Beta
arithmetic1728 Oct 30, 2020
f90ac74
add since tag
arithmetic1728 Oct 30, 2020
509c481
Merge branch 'master' of https://github.com/googleapis/google-http-ja…
arithmetic1728 Oct 31, 2020
fc72936
feat: add isMtls property to ApacheHttpTransport
arithmetic1728 Oct 29, 2020
02e53d2
update Beta annotation
arithmetic1728 Oct 31, 2020
254675e
format
arithmetic1728 Nov 1, 2020
f477636
Merge pull request #2 from arithmetic1728/apache
arithmetic1728 Nov 1, 2020
a14cac4
fix tag
arithmetic1728 Nov 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update names
  • Loading branch information
arithmetic1728 committed Oct 23, 2020
commit 275bad0a08b8859b41d47b79441f70ba4bc5c048
Original file line number Diff line number Diff line change
Expand Up @@ -299,22 +299,22 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce
*
* @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore}
* or {@link SecurityUtils#loadKeyStoreFromCertificates})
* @param keyStore key store for client certificate and key. It is used to establish mutual TLS.
* @param keystorePassword password for keyStore parameter
* @param mtlsKeyStore key store for client certificate and key to establish mutual TLS.
* @param mtlsKeystorePassword password for mtlsKeyStore parameter
*/
public Builder trustCertificates(
KeyStore trustStore, KeyStore keyStore, String keystorePassword)
KeyStore trustStore, KeyStore mtlsKeyStore, String mtlsKeystorePassword)
throws GeneralSecurityException {
if (keyStore != null && keyStore.size() > 0) {
if (mtlsKeyStore != null && mtlsKeyStore.size() > 0) {
this.isMtls = true;
}
SSLContext sslContext = SslUtils.getTlsSslContext();
SslUtils.initSslContext(
sslContext,
trustStore,
SslUtils.getPkixTrustManagerFactory(),
keyStore,
keystorePassword,
mtlsKeyStore,
mtlsKeystorePassword,
SslUtils.getDefaultKeyManagerFactory());
return setSslSocketFactory(sslContext.getSocketFactory());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,21 @@ public static SSLContext initSslContext(
* SecurityUtils#getJavaKeyStore()})
* @param trustManagerFactory trust manager factory (for example {@link
* #getPkixTrustManagerFactory()})
* @param keyStore key store for client certificate and key
* @param keystorePassword password for keyStore parameter
* @param mtlsKeyStore key store for client certificate and key to establish mutual TLS
* @param mtlsKeystorePassword password for mtlsKeyStore parameter
* @param keyManagerFactory key manager factory (for example {@link
* #getDefaultKeyManagerFactory()})
*/
public static SSLContext initSslContext(
SSLContext sslContext,
KeyStore trustStore,
TrustManagerFactory trustManagerFactory,
KeyStore keyStore,
String keystorePassword,
KeyStore mtlsKeyStore,
String mtlsKeystorePassword,
KeyManagerFactory keyManagerFactory)
throws GeneralSecurityException {
trustManagerFactory.init(trustStore);
keyManagerFactory.init(keyStore, keystorePassword.toCharArray());
keyManagerFactory.init(mtlsKeyStore, mtlsKeystorePassword.toCharArray());
sslContext.init(
keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
return sslContext;
Expand Down