Skip to content
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

SardineFactory should support keystore #254

Open
fgiloux opened this issue Jun 3, 2016 · 0 comments
Open

SardineFactory should support keystore #254

fgiloux opened this issue Jun 3, 2016 · 0 comments

Comments

@fgiloux
Copy link

fgiloux commented Jun 3, 2016

Hi,

I think that SardineFactory should get extended to support passing an SSL context as a parameter.
Something like:

public static Sardine begin(String username, String password, ProxySelector proxy, SSLContext sslContext) {
   if (sslContext != null) {
       final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext);
       return new SardineImpl(username, password, proxy) {
           @Override
           protected SSLConnectionSocketFactory createDefaultSecureSocketFactory() {
           return socketFactory;
       }
   } else
           return new SardineImpl(username, password, proxy);
};

This would allow specifying parameters for the SSL connection, like a key store and a trust store without directly calling an implementation class.

Best Regards,

Frédéric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants