Tcl
Tcl
Load PEM Format Certificate (.pem)
See more Certificates Examples
Loads a PEM format digital certificate and fetches information about the cert.Chilkat Tcl Downloads
load ./chilkat.dll
set success 0
set cert [new_CkCert]
# LoadFromFile will load virtually any certificate format file.
# It will auto-recognize the format and load appropiately.
set success [CkCert_LoadFromFile $cert "/Users/chilkat/testData/cer/cert.pem"]
if {$success != 1} then {
puts [CkCert_lastErrorText $cert]
delete_CkCert $cert
exit
}
# DN = "Distinguished Name"
puts "SubjectDN:[CkCert_subjectDN $cert]"
puts "Common Name:[CkCert_subjectCN $cert]"
puts "Issuer Common Name:[CkCert_issuerCN $cert]"
puts "Serial Number:[CkCert_serialNumber $cert]"
delete_CkCert $cert