aboutsummaryrefslogtreecommitdiffstats
path: root/src/openac
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-07-13 13:34:04 +0200
committerMartin Willi <martin@revosec.ch>2010-07-13 13:53:20 +0200
commit0406eeaacb9c9f927cd1625a2cda72427be9a6dc (patch)
treeb102097d6db3f9455a223ceeffdca796a9c4c525 /src/openac
parentda9724e6d0fe82db4191a2d15919b365f0f210b0 (diff)
downloadstrongswan-0406eeaacb9c9f927cd1625a2cda72427be9a6dc.tar.bz2
strongswan-0406eeaacb9c9f927cd1625a2cda72427be9a6dc.tar.xz
Support different encoding types in certificate.get_encoding()
Diffstat (limited to 'src/openac')
-rwxr-xr-xsrc/openac/openac.c10
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