Class EPPVerificationCodeTst
- java.lang.Object
-
- com.verisign.epp.codec.verificationcode.EPPVerificationCodeTst
-
public class EPPVerificationCodeTst extends java.lang.ObjectIs a unit test of the com.verisign.epp.codec.verificationcode package.
-
-
Constructor Summary
Constructors Constructor Description EPPVerificationCodeTst()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.security.cert.PKIXParametersloadPKIXParameters(java.lang.String aTrustStoreName)Loads the trust store file into thePKIXParametersused to verify the certificate chain The Java Trust Store is loaded with the trusted VSP certificates.static java.security.PublicKeyloadPublicKey(java.lang.String aKeyStoreName, java.lang.String aPublicKeyAlias)Loads the public key used to verify a digital signature signed with the associated private key, loaded byloadPrivateKeyEntry(String, String, String).static voidsetNumIterations(long aNumIterations)Sets the number of iterations to run per test.static voidsetup()JUNITsuitestatic method, which returns the tests associated withEPPVerificationCodeTst.voidtestDomainWithMultiVerificationCode()Unit test of extending the domain create command with multiple typed verification codes contained in the verification code extension.voidtestDomainWithVerificationCode()Unit test of extending the domain create command with a single untyped verification code contained in the verification code extension.voidtestEncodedSignedCode()Test different encoded signed codes that include:
Domain typed code Test encoding and decoding the Base64 encoded signed code value (no wrapper <verificationCode:code> XML element). Real-name typed code Negative test - Invalid vsp-id Negative test - Invalid code typevoidtestInfo()Test of the info extension with the cases:
Empty info extension - Includes the default case of an empty extension element.voidtestInfoResponse()Test of the info response extension with the cases:
Status - Return just the notApplicable verification status Status and Profile - Return the verification status and the profile Status, Profile, and Set Codes from Sponsoring Client - Return the status, profile, and two verification codes from the sponsoring registrar. Status, Profile, and Set Codes from Non-Sponsoring Client - Return the status, profile, and two verification codes from the non-sponsoring registrar. Status, Profile, and Missing Codes from Non-Sponsoring Client - Return the status, profile, and two missing codes from the non-sponsoring registrar. Status, Profile, Missing Codes, and Set Codes from Non-Sponsoring Client - Return the status, profile, and one missing code, and one set code from the non-sponsoring registrar. Status, Profile, and Set Codes from Sponsoring Client with Codes Set from Another Profile - Return the status, profile, and two verification codes from the sponsoring registrar, and include the set codes for the notApplicable profile.voidtestVerificationCode()Test theEPPVerificationCodeclass.
-
-
-
Method Detail
-
testVerificationCode
public void testVerificationCode()
Test theEPPVerificationCodeclass.
-
testDomainWithVerificationCode
public void testDomainWithVerificationCode()
Unit test of extending the domain create command with a single untyped verification code contained in the verification code extension.
-
testInfo
public void testInfo()
Test of the info extension with the cases:
- Empty info extension - Includes the default case of an empty extension element.
- Info extension with profile - Include the extension with the profile attribute set
-
testInfoResponse
public void testInfoResponse()
Test of the info response extension with the cases:
- Status - Return just the notApplicable verification status
- Status and Profile - Return the verification status and the profile
- Status, Profile, and Set Codes from Sponsoring Client - Return the status, profile, and two verification codes from the sponsoring registrar.
- Status, Profile, and Set Codes from Non-Sponsoring Client - Return the status, profile, and two verification codes from the non-sponsoring registrar.
- Status, Profile, and Missing Codes from Non-Sponsoring Client - Return the status, profile, and two missing codes from the non-sponsoring registrar.
- Status, Profile, Missing Codes, and Set Codes from Non-Sponsoring Client - Return the status, profile, and one missing code, and one set code from the non-sponsoring registrar.
- Status, Profile, and Set Codes from Sponsoring Client with Codes Set from Another Profile - Return the status, profile, and two verification codes from the sponsoring registrar, and include the set codes for the notApplicable profile.
-
testDomainWithMultiVerificationCode
public void testDomainWithMultiVerificationCode()
Unit test of extending the domain create command with multiple typed verification codes contained in the verification code extension.
-
testEncodedSignedCode
public void testEncodedSignedCode()
Test different encoded signed codes that include:
- Domain typed code
- Test encoding and decoding the Base64 encoded signed code value (no wrapper <verificationCode:code> XML element).
- Real-name typed code
- Negative test - Invalid vsp-id
- Negative test - Invalid code type
-
setup
public static void setup()
JUNITsuitestatic method, which returns the tests associated withEPPVerificationCodeTst.
-
setNumIterations
public static void setNumIterations(long aNumIterations)
Sets the number of iterations to run per test.- Parameters:
aNumIterations- number of iterations to run per test
-
loadPKIXParameters
public static java.security.cert.PKIXParameters loadPKIXParameters(java.lang.String aTrustStoreName) throws java.lang.ExceptionLoads the trust store file into thePKIXParametersused to verify the certificate chain The Java Trust Store is loaded with the trusted VSP certificates.- Parameters:
aTrustStoreName- Trust store file name- Returns:
- Initialized
PKIXParametersinstance. - Throws:
java.lang.Exception- Error initializing the PKIX parameters
-
loadPublicKey
public static java.security.PublicKey loadPublicKey(java.lang.String aKeyStoreName, java.lang.String aPublicKeyAlias) throws java.lang.ExceptionLoads the public key used to verify a digital signature signed with the associated private key, loaded byloadPrivateKeyEntry(String, String, String).- Parameters:
aKeyStoreName- Java Keystore containing the certificateaPublicKeyAlias- Java Keystore alias of thetrustedCertEntrycontaining the public key- Returns:
- Loaded
PublicKeyinstance - Throws:
java.lang.Exception- Error loading the public key
-
-