Hi, first convert the base64 encoded PEM certificate file into binary DER format:
openssl x509 -in strongswanCert.pem -outform der -out strongswanCert.der and then use the script bin2sql: http://wiki.strongswan.org/repositories/entry/strongswan/scripts/bin2sql.c to convert the contents of the binary file into a HEX string: cat strongSwanCert.der | scripts/bin2sql Best regards Andreas J. Tang wrote: > I am trying to decipher strongSwan's SQL interface. In test > sql/net2net-cert, moon's ipsec.sql has the statement > > INSERT INTO certificates ( > type, keytype, data > ) VALUES ( /* C=CH, O=Linux strongSwan, CN=strongSwan Root CA */ > 1, 1, X'308203b53082029da0....' > ); > > I realize that the data blob originates from > moon/etc/ipsec.d/cacerts/strongswanCert.pem. My question is how does > one convert a certificate (CA or host) to a SQL data blob? ====================================================================== Andreas Steffen andreas.stef...@strongswan.org strongSwan - the Linux VPN Solution! www.strongswan.org Institute for Internet Technologies and Applications University of Applied Sciences Rapperswil CH-8640 Rapperswil (Switzerland) ===========================================================[ITA-HSR]== _______________________________________________ Users mailing list Users@lists.strongswan.org https://lists.strongswan.org/mailman/listinfo/users