This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define file locations/password, change to match your machine | |
CA_BUNDLE="/etc/ssl/certs/ca-bundle.crt" | |
TRUSTSTORE="/path/to/my-truststore.jks" | |
TRUSTSTORE_PASS="changeit" | |
# Split the ca-bundle.crt into individual certificates | |
csplit -sz "$CA_BUNDLE" '/-----BEGIN CERTIFICATE-----/' '{*}' |