Class SubjectDNMatcher
- java.lang.Object
-
- org.certificateservices.messages.utils.SubjectDNMatcher
-
public class SubjectDNMatcher extends java.lang.ObjectHelp class used to match a DN field for a specific value Created by philip on 2017-08-07.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubjectDNMatcher.AvailableDNFields
-
Constructor Summary
Constructors Constructor Description SubjectDNMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.ASN1ObjectIdentifiergetIdentifier(java.lang.String dnSymbol)Returns the symbols related ASN1 identifier.booleansubjectMatch(java.security.cert.X509Certificate cert, java.lang.String subjectDNField, java.lang.String subjectDNValue)Help method to verify if a certificate matches the subject DN of a certificate.booleansubjectMatch(java.security.cert.X509Certificate cert, org.bouncycastle.asn1.ASN1ObjectIdentifier subjectDNField, java.lang.String subjectDNValue)Help method to verify if a certificate matches the subject DN of a certificate.
-
-
-
Method Detail
-
subjectMatch
public boolean subjectMatch(java.security.cert.X509Certificate cert, java.lang.String subjectDNField, java.lang.String subjectDNValue)Help method to verify if a certificate matches the subject DN of a certificate.- Parameters:
cert- the certificate to check if subject dn matches.subjectDNField- the subject dn field to match, ex OUsubjectDNValue- the value to match, ex backend- Returns:
- true if subject matches otherwise false.
-
subjectMatch
public boolean subjectMatch(java.security.cert.X509Certificate cert, org.bouncycastle.asn1.ASN1ObjectIdentifier subjectDNField, java.lang.String subjectDNValue)Help method to verify if a certificate matches the subject DN of a certificate.- Parameters:
cert- the certificate to check if subject dn matches.subjectDNField- the ASN1ObjectIdentifier subject dn field to match, ex OUsubjectDNValue- the value to match, ex backend- Returns:
- true if subject matches otherwise false.
-
getIdentifier
public org.bouncycastle.asn1.ASN1ObjectIdentifier getIdentifier(java.lang.String dnSymbol)
Returns the symbols related ASN1 identifier.- Parameters:
dnSymbol- the dn symbol- Returns:
- the related asn1 identifier or null if symbol was not found.
-
-