Initializing help system before first use

x509getinfo

Purpose
Retrieve information stored in an X509 certificate.
Synopsis
function x509getinfo(x509:string, info:array(string) of text):integer
Arguments
x509 
Certificate file in PEM format
info 
Array where to store certificate information
Return value
Number of items stored in the array or -1 in case of error.
Example
The example below shows how to display the properties of a certificate:
declarations
 info:array(S:set of string) of text
end-declarations

if x509getinfo("srv.crt",info)<1 then
 writeln("Failed to load certificate")
else
 forall(s in S | exists(info(s)))
  writeln("   ", s, ":", info(s))
end-if
Further information
This function retrieves some of the information recorded in an X509 certificate. The data is recorded in the provided array indexed by the labels of the records in the certificate. The possible labels are:
Version 
Format version of the certificate
Serial 
Serial number
Issuer 
Issuer of the certificate
Subject 
Entity associated to the public key stored in the certificate
NotBefore 
Valid after this date
NotAfter 
Valid until this date
SgnAlg 
Algorithm used to sign the certificate
A self-signed certificate (such as those created with x509newcrt) will have identical values for Issuer and Subject.
Related topics
Module

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.