#!/usr/bin/env bash

set -euo pipefail

cat "$1" | openssl cms -print -cmsout | awk '/recipientInfos:/{p=1} p && /serialNumber:/'