Revision 6616
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
2088 | 2088 |
// set up this server's client identity |
2089 | 2089 |
String subject = null; |
2090 | 2090 |
try { |
2091 |
// TODO: should there be alternative ways to get the key and certificate? |
|
2091 | 2092 |
X509Certificate certificate = CertificateManager.getInstance().loadCertificateFromFile(PropertyService.getProperty("replication.certificate.file")); |
2092 | 2093 |
PrivateKey key = CertificateManager.getInstance().loadPrivateKeyFromFile(PropertyService.getProperty("replication.privatekey.file")); |
2093 | 2094 |
subject = CertificateManager.getInstance().getSubjectDN(certificate); |
2094 | 2095 |
CertificateManager.getInstance().registerCertificate(subject, certificate, key); |
2095 | 2096 |
} catch (Exception e) { |
2096 | 2097 |
// this is pretty much required for replication communication |
2097 |
logReplication.warn("Could find server's client certificate/private key: " + e.getMessage()); |
|
2098 |
logReplication.warn("Could not find server's client certificate/private key: " + e.getMessage());
|
|
2098 | 2099 |
} |
2099 | 2100 |
SSLSocketFactory socketFactory = null; |
2100 | 2101 |
try { |
Also available in: Unified diff
add note about alternative methods for getting cert/key