use of org.apache.cxf.configuration.security.DNConstraintsType in project cxf by apache.
the class HTTPJettyTransportActivator method configureCertConstraints.
private void configureCertConstraints(TLSServerParameters p, String k, String v) {
k = k.substring("certConstraints.".length());
CertificateConstraintsType cct = p.getCertConstraints();
if (cct == null) {
cct = new CertificateConstraintsType();
p.setCertConstraints(cct);
}
DNConstraintsType dnct = null;
if (k.startsWith("SubjectDNConstraints.")) {
dnct = cct.getSubjectDNConstraints();
if (dnct == null) {
dnct = new DNConstraintsType();
cct.setSubjectDNConstraints(dnct);
}
k = k.substring("SubjectDNConstraints.".length());
} else if (k.startsWith("IssuerDNConstraints.")) {
dnct = cct.getIssuerDNConstraints();
if (dnct == null) {
dnct = new DNConstraintsType();
cct.setIssuerDNConstraints(dnct);
}
k = k.substring("IssuerDNConstraints.".length());
}
if (dnct != null) {
if ("combinator".equals(k)) {
dnct.setCombinator(CombinatorType.fromValue(v));
} else if ("RegularExpression".equals(k)) {
dnct.getRegularExpression().add(k);
}
}
}
use of org.apache.cxf.configuration.security.DNConstraintsType in project cxf by apache.
the class HttpConduitConfigApplier method parseCertConstaints.
private void parseCertConstaints(TLSClientParameters p, String k, String v) {
k = k.substring("certConstraints.".length());
CertificateConstraintsType cct = p.getCertConstraints();
if (cct == null) {
cct = new CertificateConstraintsType();
p.setCertConstraints(cct);
}
DNConstraintsType dnct = null;
if (k.startsWith("SubjectDNConstraints.")) {
dnct = cct.getSubjectDNConstraints();
if (dnct == null) {
dnct = new DNConstraintsType();
cct.setSubjectDNConstraints(dnct);
}
k = k.substring("SubjectDNConstraints.".length());
} else if (k.startsWith("IssuerDNConstraints.")) {
dnct = cct.getIssuerDNConstraints();
if (dnct == null) {
dnct = new DNConstraintsType();
cct.setIssuerDNConstraints(dnct);
}
k = k.substring("IssuerDNConstraints.".length());
}
if (dnct != null) {
if ("combinator".equals(k)) {
dnct.setCombinator(CombinatorType.fromValue(v));
} else if ("RegularExpression".equals(k)) {
dnct.getRegularExpression().add(k);
}
}
}
use of org.apache.cxf.configuration.security.DNConstraintsType in project cxf by apache.
the class HTTPUndertowTransportActivator method configureCertConstraints.
private void configureCertConstraints(TLSServerParameters p, String k, String v) {
k = k.substring("certConstraints.".length());
CertificateConstraintsType cct = p.getCertConstraints();
if (cct == null) {
cct = new CertificateConstraintsType();
p.setCertConstraints(cct);
}
DNConstraintsType dnct = null;
if (k.startsWith("SubjectDNConstraints.")) {
dnct = cct.getSubjectDNConstraints();
if (dnct == null) {
dnct = new DNConstraintsType();
cct.setSubjectDNConstraints(dnct);
}
k = k.substring("SubjectDNConstraints.".length());
} else if (k.startsWith("IssuerDNConstraints.")) {
dnct = cct.getIssuerDNConstraints();
if (dnct == null) {
dnct = new DNConstraintsType();
cct.setIssuerDNConstraints(dnct);
}
k = k.substring("IssuerDNConstraints.".length());
}
if (dnct != null) {
if ("combinator".equals(k)) {
dnct.setCombinator(CombinatorType.fromValue(v));
} else if ("RegularExpression".equals(k)) {
dnct.getRegularExpression().add(k);
}
}
}
Aggregations