From a12bb1b93ca74059405087aac4e66386d21a5799 Mon Sep 17 00:00:00 2001 From: venaas Date: Tue, 18 Sep 2007 07:26:38 +0000 Subject: certificate uri matching git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.0@157 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- util.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 4dabf47..1afc519 100644 --- a/util.c +++ b/util.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Stig Venaas + * Copyright (C) 2006, 2007 Stig Venaas * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -61,7 +61,17 @@ char *stringcopy(char *s, int len) { r[len] = '\0'; return r; } - + +void printfchars(char *prefixfmt, char *prefix, char *charfmt, char *chars, int len) { + int i; + unsigned char *s = (unsigned char *)chars; + if (prefix) + printf(prefixfmt ? prefixfmt : "%s: ", prefix); + for (i = 0; i < len; i++) + printf(charfmt ? charfmt : "%c", s[i]); + printf("\n"); +} + char *addr2string(struct sockaddr *addr, socklen_t len) { struct sockaddr_in6 *sa6; struct sockaddr_in sa4; -- cgit v1.1