From 73eb230f852ec1dc7d5f51a5ee0175aad73bf270 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Mon, 13 Oct 1997 16:30:58 +0000 Subject: [PATCH] remove string_to_key git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3590 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/encrypt.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/lib/krb5/encrypt.c b/lib/krb5/encrypt.c index 3a5fbf384..05b8dd218 100644 --- a/lib/krb5/encrypt.c +++ b/lib/krb5/encrypt.c @@ -369,41 +369,6 @@ krb5_generate_random_keyblock(krb5_context context, } -/* is this something that anyone wants to use? */ -static krb5_error_code -krb5_key_to_string(krb5_context context, - krb5_keyblock key, - krb5_boolean include_keydata, - char **string) -{ - char *s; - char tmp[32]; /* enough to hold name of key type */ - int i; - if(include_keydata) - snprintf(tmp, sizeof(tmp), "", key.keytype); - else - snprintf(tmp, sizeof(tmp), "", - key.keytype, key.keyvalue.length); - for(i = 0; i < sizeof(km) / sizeof(km[0]); i++) - if(km[i].ktype == key.keytype){ - snprintf(tmp, sizeof(tmp), "%s", km[i].name); - break; - } - if(include_keydata){ - char *k = malloc(2 * key.keyvalue.length + 1); - *k = 0; - for(i = 0; i < key.keyvalue.length; i++){ - unsigned char c = ((unsigned char*)key.keyvalue.data)[i]; - sprintf(k + strlen(k), "%02x", c); - } - asprintf(string, "%s (key = %s)", tmp, k); - free(k); - }else - *string = strdup(tmp); - return 0; -} - - krb5_error_code krb5_keytype_to_etype(krb5_context context, krb5_keytype ktype, krb5_enctype *etype) -- 2.11.4.GIT