mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-04 00:36:58 +03:00
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:
parent
1b89882449
commit
db787857aa
@ -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")
|
||||
|
@ -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
|
||||
''
|
Loading…
Reference in New Issue
Block a user