/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 rm -f /tmp/newhostkey.txt
west #
 ckaid=$(ipsec newhostkey --keytype ecdsa 2>&1 | grep "showhostkey" | sed "s/^.*ckaid //")
west #
 # sanitizing brought to you by id-sanitize.sed
west #
 ipsec showhostkey --list
< 1> ECDSA keyid: <<KEYID#1>> ckaid: <<CKAID#1>>
west #
 ipsec showhostkey --dump
< 1> ECDSA keyid: <<KEYID#1>> ckaid: <<CKAID#1>>
west #
 ipsec showhostkey --left --ckaid "${ckaid}"
	# ecdsakey <<KEYID#1>>
	leftecdsakey=0s<<RAW-PUBKEY#1>>
west #
 ipsec showhostkey --left --pubkey --ckaid "${ckaid}"
	leftpubkey=<<PEM-PUBKEY#1>>
west #
 ipsec showhostkey --ipseckey --ckaid "${ckaid}"
west.    IN    IPSECKEY  10 0 3 . <<RAW-PUBKEY#1>>
west #
 ipsec showhostkey --ipseckey --pubkey --ckaid "${ckaid}"
west.    IN    IPSECKEY  10 0 4 . <<PEM-PUBKEY#1>>
west #
 # see description.txt for why they are different
west #
 ipsec showhostkey --pem --ckaid "${ckaid}"
-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----
west #
 ipsec showhostkey --pem --ckaid "${ckaid}" | openssl pkey -inform PEM -pubin
-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----
west #
 

