diff options
Diffstat (limited to 'src/pluto/x509.c')
-rw-r--r-- | src/pluto/x509.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/pluto/x509.c b/src/pluto/x509.c index 4f9c16d34..3b9f6d7a0 100644 --- a/src/pluto/x509.c +++ b/src/pluto/x509.c @@ -269,6 +269,17 @@ static err_t get_next_rdn(chunk_t *rdn, chunk_t * attribute, chunk_t *oid, } /** + * Prints a binary string in hexadecimal form + */ +static void hex_str(chunk_t bin, chunk_t *str) +{ + u_int i; + update_chunk(str, snprintf(str->ptr,str->len,"0x")); + for (i=0; i < bin.len; i++) + update_chunk(str, snprintf(str->ptr,str->len,"%02X",*bin.ptr++)); +} + +/** * Parses an ASN.1 distinguished name int its OID/value pairs */ static err_t dn_parse(chunk_t dn, chunk_t *str) @@ -356,18 +367,6 @@ int dn_count_wildcards(chunk_t dn) return wildcards; } -/** - * Prints a binary string in hexadecimal form - */ -void hex_str(chunk_t bin, chunk_t *str) -{ - u_int i; - update_chunk(str, snprintf(str->ptr,str->len,"0x")); - for (i=0; i < bin.len; i++) - update_chunk(str, snprintf(str->ptr,str->len,"%02X",*bin.ptr++)); -} - - /** Converts a binary DER-encoded ASN.1 distinguished name * into LDAP-style human-readable ASCII format */ |