Skip to content

Commit

Permalink
Added new KSA region
Browse files Browse the repository at this point in the history
  • Loading branch information
kaustubhkp committed Feb 11, 2024
1 parent 7d7612b commit a63bc45
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.1.6] - 2024-02-08
### Added
- Saudi region (KSA) URL

## [1.1.5] - 2022-12-28
### Changed
- Pinned certificate updated. New Expiry December 2030
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ task clean(type: Delete) {
}

ext {
libraryVersionName = '1.1.5'
libraryVersionName = '1.1.6'
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public enum Region {
NORTH_AMERICA("na."),
INDIA("in."),
CHINA("cn."),
MTF("mtf.");
MTF("mtf."),
SAUDI_ARABIA("ksa.");

String prefix;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,23 @@ public void testCreateSslKeystoreContainsInternalCertificate() throws Exception

KeyStore keyStore = trustProvider.createKeyStore();

assertTrue(keyStore.containsAlias("gateway.mastercard.com"));
assertTrue(keyStore.containsAlias("gateway.mastercard.com.ca_entrust"));
assertTrue(keyStore.containsAlias("gateway.mastercard.com.ca_digicert"));
}

@Test
public void testReadingInternalCertificateWorksAsExpected() throws Exception {
X509Certificate certificate = trustProvider.readCertificate(GatewaySSLContextProvider.INTERMEDIATE_CA);
String expectedSerialNo = "1372807406";
public void testReadingRootEntrustCertificateWorksAsExpected() throws Exception {
X509Certificate certificate = trustProvider.readCertificate(GatewaySSLContextProvider.ROOT_CERTIFICATE_ENTRUST);
String expectedSerialNo = "1246989352";

assertNotNull(certificate);
assertEquals(expectedSerialNo, certificate.getSerialNumber().toString());
}

@Test
public void testReadingRootDigiCertificateWorksAsExpected() throws Exception {
X509Certificate certificate = trustProvider.readCertificate(GatewaySSLContextProvider.ROOT_CERTIFICATE_DIGICERT);
String expectedSerialNo = "10944719598952040374951832963794454346";

assertNotNull(certificate);
assertEquals(expectedSerialNo, certificate.getSerialNumber().toString());
Expand Down

0 comments on commit a63bc45

Please sign in to comment.