diff options
author | Martin Willi <martin@strongswan.org> | 2009-09-11 15:35:10 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-09-11 15:39:35 +0200 |
commit | 3b878dae7e7bb00f8d886426dc4f75bf45b8113f (patch) | |
tree | be56294135f3b29788390b4695de1c973b454302 /src/pluto/pgpcert.c | |
parent | 3a7bd9bd49685c96313038436b770115651b7caa (diff) | |
download | strongswan-3b878dae7e7bb00f8d886426dc4f75bf45b8113f.tar.bz2 strongswan-3b878dae7e7bb00f8d886426dc4f75bf45b8113f.tar.xz |
Removed chunk_from_buf() in favor of a simpler chunk_from_chars() macro
Diffstat (limited to 'src/pluto/pgpcert.c')
-rw-r--r-- | src/pluto/pgpcert.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pluto/pgpcert.c b/src/pluto/pgpcert.c index e1561665a..2b1f5cbb8 100644 --- a/src/pluto/pgpcert.c +++ b/src/pluto/pgpcert.c @@ -261,10 +261,9 @@ static bool parse_pgp_pubkey_packet(chunk_t *packet, pgpcert_t *cert) /* compute V4 or V3 fingerprint according to section 12.2 of RFC 4880 */ if (cert->version == 4) { - char pubkey_packet_header_buf[] = { + chunk_t pubkey_packet_header = chunk_from_chars( 0x99, pubkey_packet.len / 256, pubkey_packet.len % 256 - }; - chunk_t pubkey_packet_header = chunk_from_buf(pubkey_packet_header_buf); + ); chunk_t hash; hasher_t *hasher; |