GithubHelp home page GithubHelp logo

Comments (3)

steve-perkins avatar steve-perkins commented on August 20, 2024

Sorry for the delayed response. Today is my first day back from vacation. It may be another day or two before I get caught on regular job stuff, and work through the current issues.

from vault-java-driver.

lingesh-happiestminds avatar lingesh-happiestminds commented on August 20, 2024

Hello @steve-perkins,
is this enhancement prioritized ?.
thanks

from vault-java-driver.

lingesh-happiestminds avatar lingesh-happiestminds commented on August 20, 2024

Hello @steve-perkins ,

I have overridden SSL CONTEXT to have ROOT CA as trusted Assure. this will be return during SslConfig.build(). Please suggest you have any other thoughts on the same.

private static SSLContext ROOT_CA_SSL_CONTEXT;
static {
    try {
    	ROOT_CA_SSL_CONTEXT = SSLContext.getInstance("TLS");
    	ROOT_CA_SSL_CONTEXT.init(null, new TrustManager[]{new X509TrustManager() {
            @Override
            public void checkClientTrusted(final X509Certificate[] x509Certificates, final String s) throws CertificateException {
            }

            @Override
            public void checkServerTrusted(final X509Certificate[] x509Certificates, final String s) throws CertificateException {
            }

            @Override
            public X509Certificate[] getAcceptedIssuers() {
            	X509Certificate[] x509Certificate = new X509Certificate[1];
            	InputStream inputStream = null;
            	try {
            	CertificateFactory fac = CertificateFactory.getInstance("X509");
        		inputStream = this.getClass().getResourceAsStream(ROOT_CA_PEM);
        		X509Certificate certificate = (X509Certificate) fac.generateCertificate(inputStream);
        		certificate.checkValidity();
        		x509Certificate[0]= certificate;
        		return x509Certificate;
        		} catch (Exception e) {
        			e.printStackTrace();
        		}finally {
        			try {
        				inputStream.close();
					} catch (IOException e) {
						e.printStackTrace();
					}
        		}
                return x509Certificate;
            }
        }}, new java.security.SecureRandom());
    } catch (NoSuchAlgorithmException | KeyManagementException e) {
        e.printStackTrace();
    }
}

from vault-java-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.