Skip to content

Instantly share code, notes, and snippets.

@vi7
Last active February 12, 2026 09:35
Show Gist options
  • Select an option

  • Save vi7/7d7c2db6c3745f806cb890a960ae361b to your computer and use it in GitHub Desktop.

Select an option

Save vi7/7d7c2db6c3745f806cb890a960ae361b to your computer and use it in GitHub Desktop.
Simple bash script for openssl command to get info on all certificates in the provided certificate bundle text file
#!/usr/bin/env bash
bundle_file="${1:-bundle.crt}"
awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/' "$bundle_file" | \
while openssl x509 -noout -subject -dates -issuer 2>/dev/null; do
echo "---"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment