You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2019/08/06 12:48:25 UTC
[cxf] 03/04: Make private methods protected
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit b7ae6e7c10ba8901e76749aeb6ebd90dc78a0e5d
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Aug 6 13:47:52 2019 +0100
Make private methods protected
---
.../cxf/xkms/x509/repo/ldap/LdapCertificateRepo.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/services/xkms/xkms-x509-repo-ldap/src/main/java/org/apache/cxf/xkms/x509/repo/ldap/LdapCertificateRepo.java b/services/xkms/xkms-x509-repo-ldap/src/main/java/org/apache/cxf/xkms/x509/repo/ldap/LdapCertificateRepo.java
index 75d4d33..54fade9 100644
--- a/services/xkms/xkms-x509-repo-ldap/src/main/java/org/apache/cxf/xkms/x509/repo/ldap/LdapCertificateRepo.java
+++ b/services/xkms/xkms-x509-repo-ldap/src/main/java/org/apache/cxf/xkms/x509/repo/ldap/LdapCertificateRepo.java
@@ -94,7 +94,7 @@ public class LdapCertificateRepo implements CertificateRepo {
return getCRLsFromLdap(rootDN, ldapConfig.getCrlFilter(), ldapConfig.getAttrCrlBinary());
}
- private List<X509Certificate> getCertificatesFromLdap(String tmpRootDN, String tmpFilter, String tmpAttrName) {
+ protected List<X509Certificate> getCertificatesFromLdap(String tmpRootDN, String tmpFilter, String tmpAttrName) {
try {
List<X509Certificate> certificates = new ArrayList<>();
NamingEnumeration<SearchResult> answer = ldapSearch.searchSubTree(tmpRootDN, tmpFilter);
@@ -115,7 +115,7 @@ public class LdapCertificateRepo implements CertificateRepo {
}
}
- private List<X509CRL> getCRLsFromLdap(String tmpRootDN, String tmpFilter, String tmpAttrName) {
+ protected List<X509CRL> getCRLsFromLdap(String tmpRootDN, String tmpFilter, String tmpAttrName) {
try {
List<X509CRL> crls = new ArrayList<>();
NamingEnumeration<SearchResult> answer = ldapSearch.searchSubTree(tmpRootDN, tmpFilter);
@@ -136,7 +136,7 @@ public class LdapCertificateRepo implements CertificateRepo {
}
}
- private void saveCertificate(X509Certificate cert, String dn, Map<String, String> appAttrs) {
+ protected void saveCertificate(X509Certificate cert, String dn, Map<String, String> appAttrs) {
Attributes attribs = new BasicAttributes();
attribs.put(new BasicAttribute(ATTR_OBJECT_CLASS, ldapConfig.getCertObjectClass()));
attribs.put(new BasicAttribute(ldapConfig.getAttrUID(), cert.getSubjectX500Principal().getName()));
@@ -156,7 +156,7 @@ public class LdapCertificateRepo implements CertificateRepo {
}
}
- private void addConstantAttributes(String names, String values, Attributes attribs) {
+ protected void addConstantAttributes(String names, String values, Attributes attribs) {
String[] arrNames = names.split(",");
String[] arrValues = values.split(",");
if (arrNames.length != arrValues.length) {
@@ -227,17 +227,17 @@ public class LdapCertificateRepo implements CertificateRepo {
}
- private String getDnForIdentifier(String id) {
+ protected String getDnForIdentifier(String id) {
String escapedIdentifier = id.replaceAll("\\/", Matcher.quoteReplacement("\\/"));
return String.format(ldapConfig.getServiceCertRDNTemplate(), escapedIdentifier) + "," + rootDN;
}
- private X509Certificate getCertificateForDn(String dn) throws NamingException {
+ protected X509Certificate getCertificateForDn(String dn) throws NamingException {
Attribute attr = ldapSearch.getAttribute(dn, ldapConfig.getAttrCrtBinary());
return getCert(attr);
}
- private X509Certificate getCertificateForUIDAttr(String uid) throws NamingException {
+ protected X509Certificate getCertificateForUIDAttr(String uid) throws NamingException {
String filter = String.format(filterUIDTemplate, uid);
Attribute attr = ldapSearch.findAttribute(rootDN, filter, ldapConfig.getAttrCrtBinary());
return getCert(attr);
@@ -257,7 +257,7 @@ public class LdapCertificateRepo implements CertificateRepo {
}
}
- private X509Certificate getCert(Attribute attr) {
+ protected X509Certificate getCert(Attribute attr) {
if (attr == null) {
return null;
}