Remove custom truststore remains (#280)

* nix: remove mkJavaTrustStore

this isn't used anymore

* build.ps1: remove custom non-existing da-truststore\cacerts argument
This commit is contained in:
Florian Klink 2019-04-08 11:19:44 +02:00 committed by moritzkiefer-da
parent 1b89882449
commit db787857aa
2 changed files with 1 additions and 28 deletions

View File

@ -8,7 +8,7 @@ $ErrorActionPreference = 'Stop'
function bazel() {
Write-Output ">> bazel $args"
$global:lastexitcode = 0
. bazel.exe --bazelrc=.\nix\bazelrc --host_jvm_args=-Djavax.net.ssl.trustStore="$(dadew where)\current\apps\da-truststore\cacerts" @args
. bazel.exe --bazelrc=.\nix\bazelrc @args
if ($global:lastexitcode -ne 0) {
Write-Output "<< bazel $args (failed, exit code: $global:lastexitcode)"
throw ("Bazel returned non-zero exit code: $global:lastexitcode")

View File

@ -1,27 +0,0 @@
{ lib, runCommand, jre, openssl, cacert, addnCerts ? [], ... }:
let
addnCertsScript = addnCertPaths: lib.concatMapStringsSep "\n" (certPath: ''
alias=$(openssl x509 -noout -in ${certPath} -subject| cut -d "/" -f 2 | cut -d "=" -f 2)
echo "Adding $alias"
${jre}/bin/keytool -import -noprompt -alias "$alias" -file ${certPath} -keystore $out -storepass 'changeit'
'') addnCertPaths;
in runCommand "java-truststore" {
nativeBuildInputs = [ jre openssl ];
} ''
if [ -f ${jre}/lib/openjdk/jre/lib/security/cacerts ]; then
# When using openJDK
cp ${jre}/lib/openjdk/jre/lib/security/cacerts $out
chmod 644 $out
elif [ -f ${jre}/jre/lib/security/cacerts ]; then
# When using Oracle JDK
cp ${jre}/jre/lib/security/cacerts $out
chmod 644 $out
else
echo "ERROR: JDK has no cacerts" >&2
exit 1
fi
${addnCertsScript addnCerts}
chmod 444 $out
''