diff options
author | Martin Willi <martin@revosec.ch> | 2010-07-13 13:34:04 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-07-13 13:53:20 +0200 |
commit | 0406eeaacb9c9f927cd1625a2cda72427be9a6dc (patch) | |
tree | b102097d6db3f9455a223ceeffdca796a9c4c525 /src/openac | |
parent | da9724e6d0fe82db4191a2d15919b365f0f210b0 (diff) | |
download | strongswan-0406eeaacb9c9f927cd1625a2cda72427be9a6dc.tar.bz2 strongswan-0406eeaacb9c9f927cd1625a2cda72427be9a6dc.tar.xz |
Support different encoding types in certificate.get_encoding()
Diffstat (limited to 'src/openac')
-rwxr-xr-x | src/openac/openac.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/openac/openac.c b/src/openac/openac.c index a280192c2..3f28b0ac4 100755 --- a/src/openac/openac.c +++ b/src/openac/openac.c @@ -501,11 +501,13 @@ int main(int argc, char **argv) } /* write the attribute certificate to file */ - attr_chunk = attr_cert->get_encoding(attr_cert); - if (chunk_write(attr_chunk, outfile, "attribute cert", 0022, TRUE)) + if (attr_cert->get_encoding(attr_cert, CERT_ASN1_DER, &attr_chunk)) { - write_serial(serial); - status = 0; + if (chunk_write(attr_chunk, outfile, "attribute cert", 0022, TRUE)) + { + write_serial(serial); + status = 0; + } } } else |