dnet-applications/apps/dnet-orgs-database-application/scripts/import_certificates.sh

14 lines
361 B
Bash
Raw Normal View History

2020-11-04 10:30:29 +01:00
#!/bin/bash
CACERT_DIR=/Users/michele/.jenv/versions/1.8/jre/lib/security/cacerts
echo "Importing HTTPS Cerificates in $CACERT_DIR"
TMP_FILE=`mktemp /tmp/cert.XXXXXX`
echo -n | openssl s_client -connect openaire-dev.aai-dev.grnet.gr:443 | openssl x509 > $TMP_FILE
keytool -import -alias example -keystore $CACERT_DIR -file $TMP_FILE
echo
echo "Done."
echo