-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add hcp vault backend #42
Conversation
KeyFactory var9 = KeyFactory.getInstance("RSA"); | ||
PrivateKey privateKey = var9.generatePrivate(pkcs8EncodedKeySpec); | ||
KeyStore ikeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); | ||
ikeyStore.load((InputStream)null, "password".toCharArray()); |
Check failure
Code scanning / SonarCloud
Credentials should not be hard-coded
KeyStore ikeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); | ||
ikeyStore.load((InputStream)null, "password".toCharArray()); | ||
ikeyStore.setCertificateEntry("clientCert", clientCertificate); | ||
ikeyStore.setKeyEntry("key", privateKey, "password".toCharArray(), |
Check failure
Code scanning / SonarCloud
Credentials should not be hard-coded
ikeyStore.setCertificateEntry("clientCert", clientCertificate); | ||
ikeyStore.setKeyEntry("key", privateKey, "password".toCharArray(), | ||
new Certificate[]{clientCertificate}); | ||
keyManagerFactory.init(ikeyStore, "password".toCharArray()); |
Check failure
Code scanning / SonarCloud
Credentials should not be hard-coded
try { | ||
SSLContext disabledSslContxt = SSLContext.getInstance(TLSV_1_2); | ||
disabledSslContxt.init((KeyManager[])null, new TrustManager[]{new X509ExtendedTrustManager() { | ||
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
KeyFactory var9 = KeyFactory.getInstance("RSA"); | ||
PrivateKey privateKey = var9.generatePrivate(pkcs8EncodedKeySpec); | ||
KeyStore ikeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); | ||
ikeyStore.load((InputStream)null, "password".toCharArray()); |
Check failure
Code scanning / SonarCloud
Credentials should not be hard-coded
KeyStore ikeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); | ||
ikeyStore.load((InputStream)null, "password".toCharArray()); | ||
ikeyStore.setCertificateEntry("clientCert", clientCertificate); | ||
ikeyStore.setKeyEntry("key", privateKey, "password".toCharArray(), |
Check failure
Code scanning / SonarCloud
Credentials should not be hard-coded
ikeyStore.setCertificateEntry("clientCert", clientCertificate); | ||
ikeyStore.setKeyEntry("key", privateKey, "password".toCharArray(), | ||
new Certificate[]{clientCertificate}); | ||
keyManagerFactory.init(ikeyStore, "password".toCharArray()); |
Check failure
Code scanning / SonarCloud
Credentials should not be hard-coded
// leave blank to trust all clients | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
// leave blank to trust all clients | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
try { | ||
SSLContext disabledSslContxt = SSLContext.getInstance(TLSV_1_2); | ||
disabledSslContxt.init((KeyManager[])null, new TrustManager[]{new X509ExtendedTrustManager() { | ||
public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { |
Check failure
Code scanning / SonarCloud
Server certificates should be verified during SSL/TLS connections
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
Added an async connector for Vault.
Closes #41 .