cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get TC to recognize Certificates?

Contributor

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);

}

 

 

 

 

5 REPLIES 5
Highlighted
Community Hero

Re: How do I get TC to recognize Certificates?

It's been a while since I've done this but I believe you need to open Internet Explorer, go to Internet Options, and add the certificates into the Trusted Certifciate Authority there.  That SHOULD work.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Manager

Re: How do I get TC to recognize Certificates?

Hi @cst99003,

 

Does tristaanogre's suggestion help?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Contributor

Re: How do I get TC to recognize Certificates?

Hello @TanyaGorbunova ,

 

i have asked a few questions on this topic and the solution that have been proposed appear to be reasonable and things that I had already tried.  It was nice to have confirmation that what I was doing was correct.

 

But....  None of the solutuons at this time have resolved my issue.   I may need to get the certs moved into the correct location through Admin Privileges.

 

 

Thank you

 

Andrew

Community Manager

Re: How do I get TC to recognize Certificates?

Hi @cst99003,

Thanks for the update. Please keep us informed.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Hero

Re: How do I get TC to recognize Certificates?

Hi,

 

> I have a JKS file but I also have the 3 CER files that exist in the JKS file.

According to my knowledge...

.JKS is a Java container file that stores .cer certificates within it.

As a file, .jks file can be located anywhere on the hard drive.

Jave provides API to work with .jks and .cer files.

.CertificateInfo() method returns information about certificate embedded into an executable (.exe or .dll) that was used to sign this executable.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2