|
NAMEOpenXPKI::Server::API2::Plugin::Cert::validate_certificateCOMMANDSvalidate_certificateValidate a certificate by creating the chain, extra certificates passed via chain or in a pkcs7 container are used together with the certificates held in the database.If a PKCS7 container is provided, pem and chain are ignored. If chain is given but pem is not, the first item of the given array is taken as entity, the remaining certificates are used to build the chain. The recommended use is to pass the entity via pem and any extra chain certificates via chain, where chain can be omitted if the required chain certificates are all in the database. If anchor is set, the resulting chain is tested against the list. If any of the given certificates is found in the chain, the result is TRUSTED. Otherwise it is UNTRUSTED. The return value is a HashRef: { status => '...', # validation result chain => [ ... ], # full certificate chain starting with the entity } "status" can be one of:
Parameters
CRL Check For certificates that are managed by this PKI instance, the revocation status is ALWAYS checked based in the information in the database. If you want to validate externally issued certificates, you can pass the crl_check parameter with one of the following values (default is none). There is currently no special return value for CRL checks, failure to validate will just return the status "BROKEN".
Changes compared to API v1: The new parameter "chain" is used to specify a chain (instead of passing an ArrayRef to "PEM"): CTX('api')->validate_certificate(PEM => [ .. ]); # old CTX('api2')->validate_certificate(chain => [ .. ]); # new The previously unused parameter "NOCRL" was removed.
Visit the GSP FreeBSD Man Page Interface. |