remove #if 0 debug stuff that haven't been used for a couple of years
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23575 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -4287,68 +4287,3 @@ krb5_crypto_debug(krb5_context context,
|
||||
}
|
||||
|
||||
#endif /* CRYPTO_DEBUG */
|
||||
|
||||
#if 0
|
||||
int
|
||||
main()
|
||||
{
|
||||
#if 0
|
||||
int i;
|
||||
krb5_context context;
|
||||
krb5_crypto crypto;
|
||||
struct key_data *d;
|
||||
krb5_keyblock key;
|
||||
char constant[4];
|
||||
unsigned usage = ENCRYPTION_USAGE(3);
|
||||
krb5_error_code ret;
|
||||
|
||||
ret = krb5_init_context(&context);
|
||||
if (ret)
|
||||
errx (1, "krb5_init_context failed: %d", ret);
|
||||
|
||||
key.keytype = ETYPE_NEW_DES3_CBC_SHA1;
|
||||
key.keyvalue.data = "\xb3\x85\x58\x94\xd9\xdc\x7c\xc8"
|
||||
"\x25\xe9\x85\xab\x3e\xb5\xfb\x0e"
|
||||
"\xc8\xdf\xab\x26\x86\x64\x15\x25";
|
||||
key.keyvalue.length = 24;
|
||||
|
||||
krb5_crypto_init(context, &key, 0, &crypto);
|
||||
|
||||
d = _new_derived_key(crypto, usage);
|
||||
if(d == NULL)
|
||||
krb5_errx(context, 1, "_new_derived_key failed");
|
||||
krb5_copy_keyblock(context, crypto->key.key, &d->key);
|
||||
_krb5_put_int(constant, usage, 4);
|
||||
derive_key(context, crypto->et, d, constant, sizeof(constant));
|
||||
return 0;
|
||||
#else
|
||||
int i;
|
||||
krb5_context context;
|
||||
krb5_crypto crypto;
|
||||
struct key_data *d;
|
||||
krb5_keyblock key;
|
||||
krb5_error_code ret;
|
||||
Checksum res;
|
||||
|
||||
char *data = "what do ya want for nothing?";
|
||||
|
||||
ret = krb5_init_context(&context);
|
||||
if (ret)
|
||||
errx (1, "krb5_init_context failed: %d", ret);
|
||||
|
||||
key.keytype = ETYPE_NEW_DES3_CBC_SHA1;
|
||||
key.keyvalue.data = "Jefe";
|
||||
/* "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
|
||||
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"; */
|
||||
key.keyvalue.length = 4;
|
||||
|
||||
d = ecalloc(1, sizeof(*d));
|
||||
d->key = &key;
|
||||
res.checksum.length = 20;
|
||||
res.checksum.data = emalloc(res.checksum.length);
|
||||
SP_HMAC_SHA1_checksum(context, d, data, 28, &res);
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user