Appearance
Example Policies
The policy language and its operators support a wide range of expressions. The examples below show policies for some commonly needed checks, all written in the Simple Text lexicon. Each example evaluates to a single boolean value: true means the certificate complies with the policy, and false means it does not.
Remember that the engine and its lexicons allow compound expressions, so these examples can be combined in different permutations using the boolean operators (&&, ||, !) and grouped with parentheses.
A specific policy OID is present
Checks that the certificate's certificate-policies extension contains the given policy OID.
X509.TBS.EXTENSION.CertificatePolicies.PolicyOIDs {?} 1.3.6.1.4.1.41179.0.1.2At least one of several policy OIDs is present
Takes the intersection of the certificate's policy OIDs with the supplied list and checks that the result is not empty.
(^(X509.TBS.EXTENSION.CertificatePolicies.PolicyOIDs {}& 1.3.6.1.4.1.41179.0.1.2,3.2.22.1)) > 0The secure email extended key usage is present
Checks that the certificate's extended key usage extension asserts the id-kp-emailProtection OID.
X509.TBS.EXTENSION.ExtKeyUsageSyntax {?} 1.3.6.1.5.5.7.3.4The certificate is an end-entity certificate
X509.TBS.EXTENSION.BasicConstraints.CA = falseThe certificate is a CA certificate
X509.TBS.EXTENSION.BasicConstraints.CA = trueThe key encipherment key usage bit is set
(X509.TBS.EXTENSION.KeyUsage & 32) > 0The digital signature key usage bit is set
(X509.TBS.EXTENSION.KeyUsage & 128) > 0Key encipherment is set and digital signature is not
((X509.TBS.EXTENSION.KeyUsage & 32) > 0) && ((X509.TBS.EXTENSION.KeyUsage & 128) = 0)Digital signature is set and key encipherment is not
((X509.TBS.EXTENSION.KeyUsage & 128) > 0) && ((X509.TBS.EXTENSION.KeyUsage & 32) = 0)