}
/* Variable-Key tests */
-static void vk_test_1(int len)
+static void vk_test_1(int len, krb5_enctype etype)
{
int i;
enc_key.length = len;
+ enc_key.enctype = etype;
printf("\nKEYSIZE=%d\n\n", len * 8);
memset(plain, 0, sizeof(plain));
hexdump("PT", plain, 16);
}
static void vk_test()
{
- vk_test_1(16);
- vk_test_1(32);
+ vk_test_1(16, ENCTYPE_AES128_CTS_HMAC_SHA1_96);
+ vk_test_1(32, ENCTYPE_AES256_CTS_HMAC_SHA1_96);
}
/* Variable-Text tests */
-static void vt_test_1(int len)
+static void vt_test_1(int len, krb5_enctype etype)
{
int i;
enc_key.length = len;
+ enc_key.enctype = etype;
printf("\nKEYSIZE=%d\n\n", len * 8);
memset(key, 0, len);
hexdump("KEY", key, len);
}
static void vt_test()
{
- vt_test_1(16);
- vt_test_1(32);
+ vt_test_1(16, ENCTYPE_AES128_CTS_HMAC_SHA1_96);
+ vt_test_1(32, ENCTYPE_AES256_CTS_HMAC_SHA1_96);
}
const char *whoami;
+#if 0
static void printhex (size_t len, const char *p)
{
while (len--)
static void printdata (krb5_data *d) { printhex (d->length, d->data); }
static void printkey (krb5_keyblock *k) { printhex (k->length, k->contents); }
+#endif
#define JURISIC "Juri\305\241i\304\207" /* hi Miro */
#define ESZETT "\303\237"
#define GCLEF "\360\235\204\236" /* outside BMP, woo hoo! */
-static void
-keyToData (krb5_keyblock *k, krb5_data *d)
-{
- d->length = k->length;
- d->data = k->contents;
-}
-
+#if 0
static void
check_error (int r, int line) {
if (r != 0) {
}
}
#define CHECK check_error(r, __LINE__)
-
-extern struct krb5_enc_provider krb5int_enc_des3;
-struct krb5_enc_provider *enc = &krb5int_enc_des3;
-extern struct krb5_enc_provider krb5int_enc_aes128, krb5int_enc_aes256;
+#endif
static void printd (const char *descr, krb5_data *d) {
int i, j;
deciv.data = decivbuf;
keyblock.contents = aeskey;
keyblock.length = 16;
+ keyblock.enctype = ENCTYPE_AES128_CTS_HMAC_SHA1_96;
err = krb5_k_create_key(NULL, &keyblock, &key);
if (err) {