【发布时间】:2011-11-23 23:12:58
【问题描述】:
我有一个带有自签名证书的私有 blob 存储 (swift)。
我想将此商店与 jclouds 一起使用。现在,以下工作:
Properties overrides = new Properties();
overrides.setProperty(Constants.PROPERTY_ENDPOINT, "https://example.com:8080/auth");
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
BlobStoreContext context = new BlobStoreContextFactory().createContext("swift",
userCredentials.getIdent(), userCredentials.getSecret(),
ImmutableSet.<Module> of(), overrides);
但是,既然我有证书,有没有办法让这更安全并告诉 jclouds 使用该特定证书而不是信任任何证书?
我确实知道如何将证书加载到Certificate 对象中,并且我也知道如何使用证书创建KeyStore 对象。
我的问题是:如何让 jclouds 使用我的 Certificate 或 KeyStore 进行证书验证?
【问题讨论】:
标签: java https ssl-certificate jclouds