Skip to content

Commit

Permalink
Use environment variable for key store's password and minor updates (#…
Browse files Browse the repository at this point in the history
…402)

+ Use an environment variable for key store's password
+ Fix unit test's names
+ Update CHANGELOG
  • Loading branch information
amirhosv authored Sep 5, 2024
1 parent 0650b55 commit 1fb4cbd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Minor
* [PR 397:](https://github.com/corretto/amazon-corretto-crypto-provider/pull/397) Support for Concatenation KDFs
* [PR 399:](https://github.com/corretto/amazon-corretto-crypto-provider/pull/399) Support for Counter KDFs
* [PR 394:](https://github.com/corretto/amazon-corretto-crypto-provider/pull/394) Support for Ed25519 DSA

## 2.4.1

Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ task build(overwrite:true) {
alias: jcecertAlias,
jar: "${buildDir}/cmake/AmazonCorrettoCryptoProvider.jar",
destDir: "${buildDir}/lib",
storepass: jcecertPassword,
storepass: "${System.env.KEYSTORE_PASSWORD}" ,
keystore: "${project.gradle.gradleUserHomeDir}/${jcecertJks}",
tsaurl: "http://timestamp.digicert.com"
)
Expand Down Expand Up @@ -675,14 +675,14 @@ task fakePublish {
ant.signjar(
alias: jcecertAlias,
jar: "${destinationDir}/${newPrefix}-osx-x86_64.jar",
storepass: jcecertPassword,
storepass: "${System.env.KEYSTORE_PASSWORD}",
keystore: "${project.gradle.gradleUserHomeDir}/${jcecertJks}",
tsaurl: "http://timestamp.digicert.com"
)
ant.signjar(
alias: jcecertAlias,
jar: "${destinationDir}/${newPrefix}-osx-aarch_64.jar",
storepass: jcecertPassword,
storepass: "${System.env.KEYSTORE_PASSWORD}",
keystore: "${project.gradle.gradleUserHomeDir}/${jcecertJks}",
tsaurl: "http://timestamp.digicert.com"
)
Expand All @@ -691,14 +691,14 @@ task fakePublish {
ant.signjar(
alias: jcecertAlias,
jar: "${destinationDir}/${newPrefix}-linux-aarch_64.jar",
storepass: jcecertPassword,
storepass: "${System.env.KEYSTORE_PASSWORD}" ,
keystore: "${project.gradle.gradleUserHomeDir}/${jcecertJks}",
tsaurl: "http://timestamp.digicert.com"
)
ant.signjar(
alias: jcecertAlias,
jar: "${destinationDir}/${newPrefix}-linux-x86_64.jar",
storepass: jcecertPassword,
storepass: "${System.env.KEYSTORE_PASSWORD}",
keystore: "${project.gradle.gradleUserHomeDir}/${jcecertJks}",
tsaurl: "http://timestamp.digicert.com"
)
Expand All @@ -708,7 +708,7 @@ task fakePublish {

}

if (project.hasProperty('mavenUser') && project.hasProperty('jcecertAlias')) {
if (project.hasProperty('jcecertAlias')) {
publishing {
publications {
mavenJava(MavenPublication) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@ResourceLock(value = TestUtil.RESOURCE_GLOBAL, mode = ResourceAccessMode.READ)
public class CounterKdfTest {
@Test
public void concatenationKdfsAreNotAvailableInFipsMode() {
public void counterKdfsAreNotAvailableInFipsMode() {
Stream.of("CounterKdfWithHmacSHA256", "CounterKdfWithHmacSHA384", "CounterKdfWithHmacSHA512")
.forEach(
alg -> {
Expand All @@ -59,7 +59,7 @@ public void outputLengthCannotBeZeroOrNegative() {

// The rest of the tests are only available in non-FIPS mode.
@Test
public void concatenationKdfExpectsConcatenationKdfSpecAsKeySpec() throws Exception {
public void counterKdfExpectsCounterKdfSpecAsKeySpec() throws Exception {
assumeFalse(TestUtil.isFips());
final SecretKeyFactory skf =
SecretKeyFactory.getInstance("CounterKdfWithHmacSHA256", TestUtil.NATIVE_PROVIDER);
Expand Down

0 comments on commit 1fb4cbd

Please sign in to comment.