Skip to content

Commit

Permalink
Add test case for opening certificate file
Browse files Browse the repository at this point in the history
  • Loading branch information
coty committed Dec 1, 2022
1 parent 7bbc71e commit a944cf9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Scripts/Certificate Test/Script1669898750398.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import javax.net.ssl.*
import java.io.File
import java.io.FileInputStream
import java.io.FileNotFoundException
import java.io.IOException
import java.security.*
import java.security.cert.CertificateException
import java.security.cert.X509Certificate

import internal.GlobalVariable as GlobalVariable

File clientSslCertificate = new File(GlobalVariable.clientCertPath);
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(new FileInputStream(clientSslCertificate), GlobalVariable.certificatePassword.toCharArray());
8 changes: 8 additions & 0 deletions Test Cases/Certificate Test.tc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestCaseEntity>
<description></description>
<name>Certificate Test</name>
<tag></tag>
<comment></comment>
<testCaseGuid>a66c6386-8d1f-4dd9-b6e7-ee930bb41fed</testCaseGuid>
</TestCaseEntity>

0 comments on commit a944cf9

Please sign in to comment.