From 7086c9e8635a47966a7222e8efa30e873f0c1d95 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 3 Nov 2010 16:54:44 +0100 Subject: Silence compilation warnings in SLAPI plugins Signed-off-by: Simo Sorce --- daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c') diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c index bba63677..6746d63b 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/ipapwd_encoding.c @@ -112,6 +112,20 @@ void krb5int_c_free_keyblock_contents(krb5_context context, */ +/* ascii hex output of bytes in "in" + * out len is 32 (preallocated) + * in len is 16 */ +static const char hexchars[] = "0123456789ABCDEF"; +static void hexbuf(char *out, const uint8_t *in) +{ + int i; + + for (i = 0; i < 16; i++) { + out[i*2] = hexchars[in[i] >> 4]; + out[i*2+1] = hexchars[in[i] & 0x0f]; + } +} + struct berval *encode_keys(struct ipapwd_keyset *kset) { BerElement *be = NULL; -- cgit