How do I get TC to recognize Certificates?
Hello,
I am trying to get TC to recognize Certificates for SSL. I have a JKS file but I also have the 3 CER files that exist in the JKS file.
What I am curious to know is....
- What is the path I need to add the CER file so that TC can recognize them?
- Do I need to use the code below to get TC to pull them in?
- Can I set something in the Preferences to find the path of the CERT's?
- Is there a better or different format to put the cert's in, other than .cer?
Suggestions or Comments?
function CertificateInfoSample()
{
var fileName = Sys.Process("iexplore").Path; // Specify the file name here
//var fileName = Sys.Process("TestComplete").Path; // Specify the file name here
//var fileName = "C:\\AuthKey_ADB\\clientcert.jks"; // Specify the file name here
var certInfo = aqFileSystem.GetFileInfo(fileName).CertificateInfo;
Log.Message("Version: " + certInfo.Version);
Log.Message("Serial number: " + certInfo.SerialNumber);
Log.Message("Signature algorithm: " + certInfo.Algorithm);
Log.Message("Issuer: " + certInfo.Issuer);
Log.Message("Valid from: " + aqConvert.DateTimeToFormatStr(certInfo.NotBefore, "%#c"));
Log.Message("Valid to: " + aqConvert.DateTimeToFormatStr(certInfo.NotAfter, "%#c"));
Log.Message("Subject: " + certInfo.Subject);
Log.Message("Public key: " + certInfo.PublicKey);
}