prefix internal structures with _krb5_
This commit is contained in:
@@ -37,12 +37,12 @@
|
||||
* AES
|
||||
*/
|
||||
|
||||
static struct key_type keytype_aes128 = {
|
||||
static struct _krb5_key_type keytype_aes128 = {
|
||||
KEYTYPE_AES128,
|
||||
"aes-128",
|
||||
128,
|
||||
16,
|
||||
sizeof(struct evp_schedule),
|
||||
sizeof(struct _krb5_evp_schedule),
|
||||
NULL,
|
||||
_krb5_evp_schedule,
|
||||
_krb5_AES_salt,
|
||||
@@ -51,12 +51,12 @@ static struct key_type keytype_aes128 = {
|
||||
EVP_aes_128_cbc
|
||||
};
|
||||
|
||||
static struct key_type keytype_aes256 = {
|
||||
static struct _krb5_key_type keytype_aes256 = {
|
||||
KEYTYPE_AES256,
|
||||
"aes-256",
|
||||
256,
|
||||
32,
|
||||
sizeof(struct evp_schedule),
|
||||
sizeof(struct _krb5_evp_schedule),
|
||||
NULL,
|
||||
_krb5_evp_schedule,
|
||||
_krb5_AES_salt,
|
||||
@@ -65,7 +65,7 @@ static struct key_type keytype_aes256 = {
|
||||
EVP_aes_256_cbc
|
||||
};
|
||||
|
||||
struct checksum_type _krb5_checksum_hmac_sha1_aes128 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes128 = {
|
||||
CKSUMTYPE_HMAC_SHA1_96_AES_128,
|
||||
"hmac-sha1-96-aes128",
|
||||
64,
|
||||
@@ -75,7 +75,7 @@ struct checksum_type _krb5_checksum_hmac_sha1_aes128 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct checksum_type _krb5_checksum_hmac_sha1_aes256 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes256 = {
|
||||
CKSUMTYPE_HMAC_SHA1_96_AES_256,
|
||||
"hmac-sha1-96-aes256",
|
||||
64,
|
||||
@@ -91,7 +91,7 @@ AES_PRF(krb5_context context,
|
||||
const krb5_data *in,
|
||||
krb5_data *out)
|
||||
{
|
||||
struct checksum_type *ct = crypto->et->checksum;
|
||||
struct _krb5_checksum_type *ct = crypto->et->checksum;
|
||||
krb5_error_code ret;
|
||||
Checksum result;
|
||||
krb5_keyblock *derived;
|
||||
@@ -139,7 +139,7 @@ AES_PRF(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct encryption_type _krb5_enctype_aes128_cts_hmac_sha1 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_aes128_cts_hmac_sha1 = {
|
||||
ETYPE_AES128_CTS_HMAC_SHA1_96,
|
||||
"aes128-cts-hmac-sha1-96",
|
||||
16,
|
||||
@@ -154,7 +154,7 @@ struct encryption_type _krb5_enctype_aes128_cts_hmac_sha1 = {
|
||||
AES_PRF
|
||||
};
|
||||
|
||||
struct encryption_type _krb5_enctype_aes256_cts_hmac_sha1 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_aes256_cts_hmac_sha1 = {
|
||||
ETYPE_AES256_CTS_HMAC_SHA1_96,
|
||||
"aes256-cts-hmac-sha1-96",
|
||||
16,
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#define DES3_OLD_ENCTYPE 1
|
||||
#endif
|
||||
|
||||
struct checksum_type *_krb5_checksum_types[] = {
|
||||
struct _krb5_checksum_type *_krb5_checksum_types[] = {
|
||||
&_krb5_checksum_none,
|
||||
#ifdef HEIM_WEAK_CRYPTO
|
||||
&_krb5_checksum_crc32,
|
||||
@@ -63,7 +63,7 @@ int _krb5_num_checksums
|
||||
* these should currently be in reverse preference order.
|
||||
* (only relevant for !F_PSEUDO) */
|
||||
|
||||
struct encryption_type *_krb5_etypes[] = {
|
||||
struct _krb5_encryption_type *_krb5_etypes[] = {
|
||||
&_krb5_enctype_aes256_cts_hmac_sha1,
|
||||
&_krb5_enctype_aes128_cts_hmac_sha1,
|
||||
&_krb5_enctype_des3_cbc_sha1,
|
||||
|
@@ -37,12 +37,12 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
static struct key_type keytype_arcfour = {
|
||||
static struct _krb5_key_type keytype_arcfour = {
|
||||
KEYTYPE_ARCFOUR,
|
||||
"arcfour",
|
||||
128,
|
||||
16,
|
||||
sizeof(struct evp_schedule),
|
||||
sizeof(struct _krb5_evp_schedule),
|
||||
NULL,
|
||||
_krb5_evp_schedule,
|
||||
_krb5_arcfour_salt,
|
||||
@@ -64,7 +64,7 @@ _krb5_HMAC_MD5_checksum(krb5_context context,
|
||||
Checksum *result)
|
||||
{
|
||||
EVP_MD_CTX *m;
|
||||
struct checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
|
||||
struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
|
||||
const char signature[] = "signaturekey";
|
||||
Checksum ksign_c;
|
||||
struct _krb5_key_data ksign;
|
||||
@@ -105,7 +105,7 @@ _krb5_HMAC_MD5_checksum(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct checksum_type _krb5_checksum_hmac_md5 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_hmac_md5 = {
|
||||
CKSUMTYPE_HMAC_MD5,
|
||||
"hmac-md5",
|
||||
64,
|
||||
@@ -130,7 +130,7 @@ ARCFOUR_subencrypt(krb5_context context,
|
||||
void *ivec)
|
||||
{
|
||||
EVP_CIPHER_CTX ctx;
|
||||
struct checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
|
||||
struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
|
||||
Checksum k1_c, k2_c, k3_c, cksum;
|
||||
struct _krb5_key_data ke;
|
||||
krb5_keyblock kb;
|
||||
@@ -197,7 +197,7 @@ ARCFOUR_subdecrypt(krb5_context context,
|
||||
void *ivec)
|
||||
{
|
||||
EVP_CIPHER_CTX ctx;
|
||||
struct checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
|
||||
struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5);
|
||||
Checksum k1_c, k2_c, k3_c, cksum;
|
||||
struct _krb5_key_data ke;
|
||||
krb5_keyblock kb;
|
||||
@@ -309,7 +309,7 @@ ARCFOUR_encrypt(krb5_context context,
|
||||
return ARCFOUR_subdecrypt (context, key, data, len, keyusage, ivec);
|
||||
}
|
||||
|
||||
struct encryption_type _krb5_enctype_arcfour_hmac_md5 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_arcfour_hmac_md5 = {
|
||||
ETYPE_ARCFOUR_HMAC_MD5,
|
||||
"arcfour-hmac-md5",
|
||||
1,
|
||||
|
@@ -62,7 +62,7 @@ _krb5_des_checksum(krb5_context context,
|
||||
size_t len,
|
||||
Checksum *cksum)
|
||||
{
|
||||
struct evp_schedule *ctx = key->schedule->data;
|
||||
struct _krb5_evp_schedule *ctx = key->schedule->data;
|
||||
EVP_MD_CTX *m;
|
||||
DES_cblock ivec;
|
||||
unsigned char *p = cksum->checksum.data;
|
||||
@@ -95,7 +95,7 @@ _krb5_des_verify(krb5_context context,
|
||||
size_t len,
|
||||
Checksum *C)
|
||||
{
|
||||
struct evp_schedule *ctx = key->schedule->data;
|
||||
struct _krb5_evp_schedule *ctx = key->schedule->data;
|
||||
EVP_MD_CTX *m;
|
||||
unsigned char tmp[24];
|
||||
unsigned char res[16];
|
||||
@@ -141,7 +141,7 @@ RSA_MD5_checksum(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct checksum_type _krb5_checksum_rsa_md5 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_rsa_md5 = {
|
||||
CKSUMTYPE_RSA_MD5,
|
||||
"rsa-md5",
|
||||
64,
|
||||
|
@@ -49,7 +49,7 @@ krb5_DES_random_key(krb5_context context,
|
||||
|
||||
static void
|
||||
krb5_DES_schedule_old(krb5_context context,
|
||||
struct key_type *kt,
|
||||
struct _krb5_key_type *kt,
|
||||
struct _krb5_key_data *key)
|
||||
{
|
||||
DES_set_key_unchecked(key->key->keyvalue.data, key->schedule->data);
|
||||
@@ -68,7 +68,7 @@ krb5_DES_random_to_key(krb5_context context,
|
||||
_krb5_xor(k, (const unsigned char*)"\0\0\0\0\0\0\0\xf0");
|
||||
}
|
||||
|
||||
static struct key_type keytype_des_old = {
|
||||
static struct _krb5_key_type keytype_des_old = {
|
||||
KEYTYPE_DES,
|
||||
"des-old",
|
||||
56,
|
||||
@@ -80,12 +80,12 @@ static struct key_type keytype_des_old = {
|
||||
krb5_DES_random_to_key
|
||||
};
|
||||
|
||||
static struct key_type keytype_des = {
|
||||
static struct _krb5_key_type keytype_des = {
|
||||
KEYTYPE_DES,
|
||||
"des",
|
||||
56,
|
||||
8,
|
||||
sizeof(struct evp_schedule),
|
||||
sizeof(struct _krb5_evp_schedule),
|
||||
krb5_DES_random_key,
|
||||
_krb5_evp_schedule,
|
||||
_krb5_des_salt,
|
||||
@@ -170,7 +170,7 @@ RSA_MD5_DES_verify(krb5_context context,
|
||||
return _krb5_des_verify(context, EVP_md5(), key, data, len, C);
|
||||
}
|
||||
|
||||
struct checksum_type _krb5_checksum_crc32 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_crc32 = {
|
||||
CKSUMTYPE_CRC32,
|
||||
"crc32",
|
||||
1,
|
||||
@@ -180,7 +180,7 @@ struct checksum_type _krb5_checksum_crc32 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct checksum_type _krb5_checksum_rsa_md4 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_rsa_md4 = {
|
||||
CKSUMTYPE_RSA_MD4,
|
||||
"rsa-md4",
|
||||
64,
|
||||
@@ -190,7 +190,7 @@ struct checksum_type _krb5_checksum_rsa_md4 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct checksum_type _krb5_checksum_rsa_md4_des = {
|
||||
struct _krb5_checksum_type _krb5_checksum_rsa_md4_des = {
|
||||
CKSUMTYPE_RSA_MD4_DES,
|
||||
"rsa-md4-des",
|
||||
64,
|
||||
@@ -200,7 +200,7 @@ struct checksum_type _krb5_checksum_rsa_md4_des = {
|
||||
RSA_MD4_DES_verify
|
||||
};
|
||||
|
||||
struct checksum_type _krb5_checksum_rsa_md5_des = {
|
||||
struct _krb5_checksum_type _krb5_checksum_rsa_md5_des = {
|
||||
CKSUMTYPE_RSA_MD5_DES,
|
||||
"rsa-md5-des",
|
||||
64,
|
||||
@@ -219,7 +219,7 @@ evp_des_encrypt_null_ivec(krb5_context context,
|
||||
int usage,
|
||||
void *ignore_ivec)
|
||||
{
|
||||
struct evp_schedule *ctx = key->schedule->data;
|
||||
struct _krb5_evp_schedule *ctx = key->schedule->data;
|
||||
EVP_CIPHER_CTX *c;
|
||||
DES_cblock ivec;
|
||||
memset(&ivec, 0, sizeof(ivec));
|
||||
@@ -238,7 +238,7 @@ evp_des_encrypt_key_ivec(krb5_context context,
|
||||
int usage,
|
||||
void *ignore_ivec)
|
||||
{
|
||||
struct evp_schedule *ctx = key->schedule->data;
|
||||
struct _krb5_evp_schedule *ctx = key->schedule->data;
|
||||
EVP_CIPHER_CTX *c;
|
||||
DES_cblock ivec;
|
||||
memcpy(&ivec, key->key->keyvalue.data, sizeof(ivec));
|
||||
@@ -283,7 +283,7 @@ DES_PCBC_encrypt_key_ivec(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct encryption_type _krb5_enctype_des_cbc_crc = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des_cbc_crc = {
|
||||
ETYPE_DES_CBC_CRC,
|
||||
"des-cbc-crc",
|
||||
8,
|
||||
@@ -298,7 +298,7 @@ struct encryption_type _krb5_enctype_des_cbc_crc = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct encryption_type _krb5_enctype_des_cbc_md4 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des_cbc_md4 = {
|
||||
ETYPE_DES_CBC_MD4,
|
||||
"des-cbc-md4",
|
||||
8,
|
||||
@@ -313,7 +313,7 @@ struct encryption_type _krb5_enctype_des_cbc_md4 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct encryption_type _krb5_enctype_des_cbc_md5 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des_cbc_md5 = {
|
||||
ETYPE_DES_CBC_MD5,
|
||||
"des-cbc-md5",
|
||||
8,
|
||||
@@ -328,7 +328,7 @@ struct encryption_type _krb5_enctype_des_cbc_md5 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct encryption_type _krb5_enctype_des_cbc_none = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des_cbc_none = {
|
||||
ETYPE_DES_CBC_NONE,
|
||||
"des-cbc-none",
|
||||
8,
|
||||
@@ -343,7 +343,7 @@ struct encryption_type _krb5_enctype_des_cbc_none = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct encryption_type _krb5_enctype_des_cfb64_none = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des_cfb64_none = {
|
||||
ETYPE_DES_CFB64_NONE,
|
||||
"des-cfb64-none",
|
||||
1,
|
||||
@@ -358,7 +358,7 @@ struct encryption_type _krb5_enctype_des_cfb64_none = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct encryption_type _krb5_enctype_des_pcbc_none = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des_pcbc_none = {
|
||||
ETYPE_DES_PCBC_NONE,
|
||||
"des-pcbc-none",
|
||||
8,
|
||||
|
@@ -54,12 +54,12 @@ DES3_random_key(krb5_context context,
|
||||
|
||||
|
||||
#ifdef DES3_OLD_ENCTYPE
|
||||
static struct key_type keytype_des3 = {
|
||||
static struct _krb5_key_type keytype_des3 = {
|
||||
KEYTYPE_DES3,
|
||||
"des3",
|
||||
168,
|
||||
24,
|
||||
sizeof(struct evp_schedule),
|
||||
sizeof(struct _krb5_evp_schedule),
|
||||
DES3_random_key,
|
||||
_krb5_evp_schedule,
|
||||
_krb5_des3_salt,
|
||||
@@ -69,12 +69,12 @@ static struct key_type keytype_des3 = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct key_type keytype_des3_derived = {
|
||||
static struct _krb5_key_type keytype_des3_derived = {
|
||||
KEYTYPE_DES3,
|
||||
"des3",
|
||||
168,
|
||||
24,
|
||||
sizeof(struct evp_schedule),
|
||||
sizeof(struct _krb5_evp_schedule),
|
||||
DES3_random_key,
|
||||
_krb5_evp_schedule,
|
||||
_krb5_des3_salt_derived,
|
||||
@@ -106,7 +106,7 @@ RSA_MD5_DES3_verify(krb5_context context,
|
||||
return _krb5_des_verify(context, EVP_md5(), key, data, len, C);
|
||||
}
|
||||
|
||||
struct checksum_type _krb5_checksum_rsa_md5_des3 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_rsa_md5_des3 = {
|
||||
CKSUMTYPE_RSA_MD5_DES3,
|
||||
"rsa-md5-des3",
|
||||
64,
|
||||
@@ -117,7 +117,7 @@ struct checksum_type _krb5_checksum_rsa_md5_des3 = {
|
||||
};
|
||||
#endif
|
||||
|
||||
struct checksum_type _krb5_checksum_hmac_sha1_des3 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_hmac_sha1_des3 = {
|
||||
CKSUMTYPE_HMAC_SHA1_DES3,
|
||||
"hmac-sha1-des3",
|
||||
64,
|
||||
@@ -128,7 +128,7 @@ struct checksum_type _krb5_checksum_hmac_sha1_des3 = {
|
||||
};
|
||||
|
||||
#ifdef DES3_OLD_ENCTYPE
|
||||
struct encryption_type _krb5_enctype_des3_cbc_md5 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des3_cbc_md5 = {
|
||||
ETYPE_DES3_CBC_MD5,
|
||||
"des3-cbc-md5",
|
||||
8,
|
||||
@@ -144,7 +144,7 @@ struct encryption_type _krb5_enctype_des3_cbc_md5 = {
|
||||
};
|
||||
#endif
|
||||
|
||||
struct encryption_type _krb5_enctype_des3_cbc_sha1 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des3_cbc_sha1 = {
|
||||
ETYPE_DES3_CBC_SHA1,
|
||||
"des3-cbc-sha1",
|
||||
8,
|
||||
@@ -160,7 +160,7 @@ struct encryption_type _krb5_enctype_des3_cbc_sha1 = {
|
||||
};
|
||||
|
||||
#ifdef DES3_OLD_ENCTYPE
|
||||
struct encryption_type _krb5_enctype_old_des3_cbc_sha1 = {
|
||||
struct _krb5_encryption_type _krb5_enctype_old_des3_cbc_sha1 = {
|
||||
ETYPE_OLD_DES3_CBC_SHA1,
|
||||
"old-des3-cbc-sha1",
|
||||
8,
|
||||
@@ -176,7 +176,7 @@ struct encryption_type _krb5_enctype_old_des3_cbc_sha1 = {
|
||||
};
|
||||
#endif
|
||||
|
||||
struct encryption_type _krb5_enctype_des3_cbc_none = {
|
||||
struct _krb5_encryption_type _krb5_enctype_des3_cbc_none = {
|
||||
ETYPE_DES3_CBC_NONE,
|
||||
"des3-cbc-none",
|
||||
8,
|
||||
|
@@ -35,10 +35,10 @@
|
||||
|
||||
void
|
||||
_krb5_evp_schedule(krb5_context context,
|
||||
struct key_type *kt,
|
||||
struct _krb5_key_type *kt,
|
||||
struct _krb5_key_data *kd)
|
||||
{
|
||||
struct evp_schedule *key = kd->schedule->data;
|
||||
struct _krb5_evp_schedule *key = kd->schedule->data;
|
||||
const EVP_CIPHER *c = (*kt->evp)();
|
||||
|
||||
EVP_CIPHER_CTX_init(&key->ectx);
|
||||
@@ -51,7 +51,7 @@ _krb5_evp_schedule(krb5_context context,
|
||||
void
|
||||
_krb5_evp_cleanup(krb5_context context, struct _krb5_key_data *kd)
|
||||
{
|
||||
struct evp_schedule *key = kd->schedule->data;
|
||||
struct _krb5_evp_schedule *key = kd->schedule->data;
|
||||
EVP_CIPHER_CTX_cleanup(&key->ectx);
|
||||
EVP_CIPHER_CTX_cleanup(&key->dctx);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ _krb5_evp_encrypt(krb5_context context,
|
||||
int usage,
|
||||
void *ivec)
|
||||
{
|
||||
struct evp_schedule *ctx = key->schedule->data;
|
||||
struct _krb5_evp_schedule *ctx = key->schedule->data;
|
||||
EVP_CIPHER_CTX *c;
|
||||
c = encryptp ? &ctx->ectx : &ctx->dctx;
|
||||
if (ivec == NULL) {
|
||||
@@ -97,7 +97,7 @@ _krb5_evp_encrypt_cts(krb5_context context,
|
||||
void *ivec)
|
||||
{
|
||||
size_t i, blocksize;
|
||||
struct evp_schedule *ctx = key->schedule->data;
|
||||
struct _krb5_evp_schedule *ctx = key->schedule->data;
|
||||
char tmp[EVP_MAX_BLOCK_LENGTH], ivec2[EVP_MAX_BLOCK_LENGTH];
|
||||
EVP_CIPHER_CTX *c;
|
||||
unsigned char *p;
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#define DES3_OLD_ENCTYPE 1
|
||||
#endif
|
||||
|
||||
static struct key_type keytype_null = {
|
||||
static struct _krb5_key_type keytype_null = {
|
||||
KEYTYPE_NULL,
|
||||
"null",
|
||||
0,
|
||||
@@ -59,7 +59,7 @@ NONE_checksum(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct checksum_type _krb5_checksum_none = {
|
||||
struct _krb5_checksum_type _krb5_checksum_none = {
|
||||
CKSUMTYPE_NONE,
|
||||
"none",
|
||||
1,
|
||||
@@ -81,7 +81,7 @@ NULL_encrypt(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct encryption_type _krb5_enctype_null = {
|
||||
struct _krb5_encryption_type _krb5_enctype_null = {
|
||||
ETYPE_NULL,
|
||||
"null",
|
||||
1,
|
||||
|
@@ -44,7 +44,7 @@ _krb5_pk_octetstring2key(krb5_context context,
|
||||
const heim_octet_string *k_n,
|
||||
krb5_keyblock *key)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(type);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(type);
|
||||
krb5_error_code ret;
|
||||
size_t keylen, offset;
|
||||
void *keydata;
|
||||
@@ -205,7 +205,7 @@ _krb5_pk_kdf(krb5_context context,
|
||||
const Ticket *ticket,
|
||||
krb5_keyblock *key)
|
||||
{
|
||||
struct encryption_type *et;
|
||||
struct _krb5_encryption_type *et;
|
||||
krb5_error_code ret;
|
||||
krb5_data other;
|
||||
size_t keylen, offset;
|
||||
|
@@ -51,7 +51,7 @@ static struct _krb5_key_data *_new_derived_key(krb5_crypto crypto, unsigned usag
|
||||
|
||||
static void free_key_schedule(krb5_context,
|
||||
struct _krb5_key_data *,
|
||||
struct encryption_type *);
|
||||
struct _krb5_encryption_type *);
|
||||
|
||||
/************************************************************
|
||||
* *
|
||||
@@ -62,7 +62,7 @@ krb5_enctype_keysize(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *keysize)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(type);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(type);
|
||||
if(et == NULL) {
|
||||
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
N_("encryption type %d not supported", ""),
|
||||
@@ -78,7 +78,7 @@ krb5_enctype_keybits(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *keybits)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(type);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(type);
|
||||
if(et == NULL) {
|
||||
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
"encryption type %d not supported",
|
||||
@@ -95,7 +95,7 @@ krb5_generate_random_keyblock(krb5_context context,
|
||||
krb5_keyblock *key)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
struct encryption_type *et = _krb5_find_enctype(type);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(type);
|
||||
if(et == NULL) {
|
||||
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
N_("encryption type %d not supported", ""),
|
||||
@@ -119,8 +119,8 @@ _key_schedule(krb5_context context,
|
||||
struct _krb5_key_data *key)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
struct encryption_type *et = _krb5_find_enctype(key->key->keytype);
|
||||
struct key_type *kt;
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(key->key->keytype);
|
||||
struct _krb5_key_type *kt;
|
||||
|
||||
if (et == NULL) {
|
||||
krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
@@ -170,7 +170,7 @@ SHA1_checksum(krb5_context context,
|
||||
/* HMAC according to RFC2104 */
|
||||
krb5_error_code
|
||||
_krb5_internal_hmac(krb5_context context,
|
||||
struct checksum_type *cm,
|
||||
struct _krb5_checksum_type *cm,
|
||||
const void *data,
|
||||
size_t len,
|
||||
unsigned usage,
|
||||
@@ -234,7 +234,7 @@ krb5_hmac(krb5_context context,
|
||||
krb5_keyblock *key,
|
||||
Checksum *result)
|
||||
{
|
||||
struct checksum_type *c = _krb5_find_checksum(cktype);
|
||||
struct _krb5_checksum_type *c = _krb5_find_checksum(cktype);
|
||||
struct _krb5_key_data kd;
|
||||
krb5_error_code ret;
|
||||
|
||||
@@ -264,7 +264,7 @@ _krb5_SP_HMAC_SHA1_checksum(krb5_context context,
|
||||
unsigned usage,
|
||||
Checksum *result)
|
||||
{
|
||||
struct checksum_type *c = _krb5_find_checksum(CKSUMTYPE_SHA1);
|
||||
struct _krb5_checksum_type *c = _krb5_find_checksum(CKSUMTYPE_SHA1);
|
||||
Checksum res;
|
||||
char sha1_data[20];
|
||||
krb5_error_code ret;
|
||||
@@ -279,7 +279,7 @@ _krb5_SP_HMAC_SHA1_checksum(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct checksum_type _krb5_checksum_sha1 = {
|
||||
struct _krb5_checksum_type _krb5_checksum_sha1 = {
|
||||
CKSUMTYPE_SHA1,
|
||||
"sha1",
|
||||
64,
|
||||
@@ -289,7 +289,7 @@ struct checksum_type _krb5_checksum_sha1 = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct checksum_type *
|
||||
struct _krb5_checksum_type *
|
||||
_krb5_find_checksum(krb5_cksumtype type)
|
||||
{
|
||||
int i;
|
||||
@@ -303,7 +303,7 @@ static krb5_error_code
|
||||
get_checksum_key(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage, /* not krb5_key_usage */
|
||||
struct checksum_type *ct,
|
||||
struct _krb5_checksum_type *ct,
|
||||
struct _krb5_key_data **key)
|
||||
{
|
||||
krb5_error_code ret = 0;
|
||||
@@ -333,7 +333,7 @@ get_checksum_key(krb5_context context,
|
||||
|
||||
static krb5_error_code
|
||||
create_checksum (krb5_context context,
|
||||
struct checksum_type *ct,
|
||||
struct _krb5_checksum_type *ct,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
void *data,
|
||||
@@ -370,7 +370,7 @@ create_checksum (krb5_context context,
|
||||
}
|
||||
|
||||
static int
|
||||
arcfour_checksum_p(struct checksum_type *ct, krb5_crypto crypto)
|
||||
arcfour_checksum_p(struct _krb5_checksum_type *ct, krb5_crypto crypto)
|
||||
{
|
||||
return (ct->type == CKSUMTYPE_HMAC_MD5) &&
|
||||
(crypto->key.key->keytype == KEYTYPE_ARCFOUR);
|
||||
@@ -385,7 +385,7 @@ krb5_create_checksum(krb5_context context,
|
||||
size_t len,
|
||||
Checksum *result)
|
||||
{
|
||||
struct checksum_type *ct = NULL;
|
||||
struct _krb5_checksum_type *ct = NULL;
|
||||
unsigned keyusage;
|
||||
|
||||
/* type 0 -> pick from crypto */
|
||||
@@ -426,7 +426,7 @@ verify_checksum(krb5_context context,
|
||||
struct _krb5_key_data *dkey;
|
||||
int keyed_checksum;
|
||||
Checksum c;
|
||||
struct checksum_type *ct;
|
||||
struct _krb5_checksum_type *ct;
|
||||
|
||||
ct = _krb5_find_checksum(cksum->cksumtype);
|
||||
if (ct == NULL || (ct->flags & F_DISABLED)) {
|
||||
@@ -447,7 +447,7 @@ verify_checksum(krb5_context context,
|
||||
}
|
||||
keyed_checksum = (ct->flags & F_KEYED) != 0;
|
||||
if(keyed_checksum) {
|
||||
struct checksum_type *kct;
|
||||
struct _krb5_checksum_type *kct;
|
||||
if (crypto == NULL) {
|
||||
krb5_set_error_message(context, KRB5_PROG_SUMTYPE_NOSUPP,
|
||||
N_("Checksum type %s is keyed but no "
|
||||
@@ -517,7 +517,7 @@ krb5_verify_checksum(krb5_context context,
|
||||
size_t len,
|
||||
Checksum *cksum)
|
||||
{
|
||||
struct checksum_type *ct;
|
||||
struct _krb5_checksum_type *ct;
|
||||
unsigned keyusage;
|
||||
|
||||
ct = _krb5_find_checksum(cksum->cksumtype);
|
||||
@@ -543,7 +543,7 @@ krb5_crypto_get_checksum_type(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
krb5_cksumtype *type)
|
||||
{
|
||||
struct checksum_type *ct = NULL;
|
||||
struct _krb5_checksum_type *ct = NULL;
|
||||
|
||||
if (crypto != NULL) {
|
||||
ct = crypto->et->keyed_checksum;
|
||||
@@ -568,7 +568,7 @@ krb5_checksumsize(krb5_context context,
|
||||
krb5_cksumtype type,
|
||||
size_t *size)
|
||||
{
|
||||
struct checksum_type *ct = _krb5_find_checksum(type);
|
||||
struct _krb5_checksum_type *ct = _krb5_find_checksum(type);
|
||||
if(ct == NULL) {
|
||||
krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP,
|
||||
N_("checksum type %d not supported", ""),
|
||||
@@ -583,7 +583,7 @@ KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_checksum_is_keyed(krb5_context context,
|
||||
krb5_cksumtype type)
|
||||
{
|
||||
struct checksum_type *ct = _krb5_find_checksum(type);
|
||||
struct _krb5_checksum_type *ct = _krb5_find_checksum(type);
|
||||
if(ct == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP,
|
||||
@@ -598,7 +598,7 @@ KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_checksum_is_collision_proof(krb5_context context,
|
||||
krb5_cksumtype type)
|
||||
{
|
||||
struct checksum_type *ct = _krb5_find_checksum(type);
|
||||
struct _krb5_checksum_type *ct = _krb5_find_checksum(type);
|
||||
if(ct == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP,
|
||||
@@ -613,7 +613,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_checksum_disable(krb5_context context,
|
||||
krb5_cksumtype type)
|
||||
{
|
||||
struct checksum_type *ct = _krb5_find_checksum(type);
|
||||
struct _krb5_checksum_type *ct = _krb5_find_checksum(type);
|
||||
if(ct == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP,
|
||||
@@ -629,7 +629,7 @@ krb5_checksum_disable(krb5_context context,
|
||||
* *
|
||||
************************************************************/
|
||||
|
||||
struct encryption_type *
|
||||
struct _krb5_encryption_type *
|
||||
_krb5_find_enctype(krb5_enctype type)
|
||||
{
|
||||
int i;
|
||||
@@ -645,7 +645,7 @@ krb5_enctype_to_string(krb5_context context,
|
||||
krb5_enctype etype,
|
||||
char **string)
|
||||
{
|
||||
struct encryption_type *e;
|
||||
struct _krb5_encryption_type *e;
|
||||
e = _krb5_find_enctype(etype);
|
||||
if(e == NULL) {
|
||||
krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
@@ -684,7 +684,7 @@ krb5_enctype_to_keytype(krb5_context context,
|
||||
krb5_enctype etype,
|
||||
krb5_keytype *keytype)
|
||||
{
|
||||
struct encryption_type *e = _krb5_find_enctype(etype);
|
||||
struct _krb5_encryption_type *e = _krb5_find_enctype(etype);
|
||||
if(e == NULL) {
|
||||
krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
N_("encryption type %d not supported", ""),
|
||||
@@ -699,7 +699,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_valid(krb5_context context,
|
||||
krb5_enctype etype)
|
||||
{
|
||||
struct encryption_type *e = _krb5_find_enctype(etype);
|
||||
struct _krb5_encryption_type *e = _krb5_find_enctype(etype);
|
||||
if(e == NULL) {
|
||||
krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
N_("encryption type %d not supported", ""),
|
||||
@@ -757,7 +757,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cksumtype_valid(krb5_context context,
|
||||
krb5_cksumtype ctype)
|
||||
{
|
||||
struct checksum_type *c = _krb5_find_checksum(ctype);
|
||||
struct _krb5_checksum_type *c = _krb5_find_checksum(ctype);
|
||||
if (c == NULL) {
|
||||
krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP,
|
||||
N_("checksum type %d not supported", ""),
|
||||
@@ -805,7 +805,7 @@ encrypt_internal_derived(krb5_context context,
|
||||
unsigned char *p, *q;
|
||||
krb5_error_code ret;
|
||||
struct _krb5_key_data *dkey;
|
||||
const struct encryption_type *et = crypto->et;
|
||||
const struct _krb5_encryption_type *et = crypto->et;
|
||||
|
||||
checksum_sz = CHECKSUMSIZE(et->keyed_checksum);
|
||||
|
||||
@@ -870,7 +870,7 @@ encrypt_internal(krb5_context context,
|
||||
Checksum cksum;
|
||||
unsigned char *p, *q;
|
||||
krb5_error_code ret;
|
||||
const struct encryption_type *et = crypto->et;
|
||||
const struct _krb5_encryption_type *et = crypto->et;
|
||||
|
||||
checksum_sz = CHECKSUMSIZE(et->checksum);
|
||||
|
||||
@@ -932,7 +932,7 @@ encrypt_internal_special(krb5_context context,
|
||||
krb5_data *result,
|
||||
void *ivec)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
size_t cksum_sz = CHECKSUMSIZE(et->checksum);
|
||||
size_t sz = len + cksum_sz + et->confoundersize;
|
||||
char *tmp, *p;
|
||||
@@ -974,7 +974,7 @@ decrypt_internal_derived(krb5_context context,
|
||||
unsigned char *p;
|
||||
krb5_error_code ret;
|
||||
struct _krb5_key_data *dkey;
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
unsigned long l;
|
||||
|
||||
checksum_sz = CHECKSUMSIZE(et->keyed_checksum);
|
||||
@@ -1053,7 +1053,7 @@ decrypt_internal(krb5_context context,
|
||||
unsigned char *p;
|
||||
Checksum cksum;
|
||||
size_t checksum_sz, l;
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
|
||||
if ((len % et->padsize) != 0) {
|
||||
krb5_clear_error_message(context);
|
||||
@@ -1118,7 +1118,7 @@ decrypt_internal_special(krb5_context context,
|
||||
krb5_data *result,
|
||||
void *ivec)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
size_t cksum_sz = CHECKSUMSIZE(et->checksum);
|
||||
size_t sz = len - cksum_sz - et->confoundersize;
|
||||
unsigned char *p;
|
||||
@@ -1208,7 +1208,7 @@ krb5_encrypt_iov_ivec(krb5_context context,
|
||||
unsigned char *p, *q;
|
||||
krb5_error_code ret;
|
||||
struct _krb5_key_data *dkey;
|
||||
const struct encryption_type *et = crypto->et;
|
||||
const struct _krb5_encryption_type *et = crypto->et;
|
||||
krb5_crypto_iov *tiv, *piv, *hiv;
|
||||
|
||||
if (num_data < 0) {
|
||||
@@ -1400,7 +1400,7 @@ krb5_decrypt_iov_ivec(krb5_context context,
|
||||
unsigned char *p, *q;
|
||||
krb5_error_code ret;
|
||||
struct _krb5_key_data *dkey;
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
krb5_crypto_iov *tiv, *hiv;
|
||||
|
||||
if (num_data < 0) {
|
||||
@@ -1625,7 +1625,7 @@ krb5_verify_checksum_iov(krb5_context context,
|
||||
unsigned int num_data,
|
||||
krb5_cksumtype *type)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
Checksum cksum;
|
||||
krb5_crypto_iov *civ;
|
||||
krb5_error_code ret;
|
||||
@@ -1839,7 +1839,7 @@ krb5_decrypt_EncryptedData(krb5_context context,
|
||||
|
||||
krb5_error_code
|
||||
_krb5_derive_key(krb5_context context,
|
||||
struct encryption_type *et,
|
||||
struct _krb5_encryption_type *et,
|
||||
struct _krb5_key_data *key,
|
||||
const void *constant,
|
||||
size_t len)
|
||||
@@ -1847,7 +1847,7 @@ _krb5_derive_key(krb5_context context,
|
||||
unsigned char *k = NULL;
|
||||
unsigned int nblocks = 0, i;
|
||||
krb5_error_code ret = 0;
|
||||
struct key_type *kt = et->keytype;
|
||||
struct _krb5_key_type *kt = et->keytype;
|
||||
|
||||
ret = _key_schedule(context, key);
|
||||
if(ret)
|
||||
@@ -1952,7 +1952,7 @@ krb5_derive_key(krb5_context context,
|
||||
krb5_keyblock **derived_key)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
struct encryption_type *et;
|
||||
struct _krb5_encryption_type *et;
|
||||
struct _krb5_key_data d;
|
||||
|
||||
*derived_key = NULL;
|
||||
@@ -2067,7 +2067,7 @@ krb5_crypto_init(krb5_context context,
|
||||
static void
|
||||
free_key_schedule(krb5_context context,
|
||||
struct _krb5_key_data *key,
|
||||
struct encryption_type *et)
|
||||
struct _krb5_encryption_type *et)
|
||||
{
|
||||
if (et->keytype->cleanup)
|
||||
(*et->keytype->cleanup)(context, key);
|
||||
@@ -2077,7 +2077,7 @@ free_key_schedule(krb5_context context,
|
||||
|
||||
void
|
||||
_krb5_free_key_data(krb5_context context, struct _krb5_key_data *key,
|
||||
struct encryption_type *et)
|
||||
struct _krb5_encryption_type *et)
|
||||
{
|
||||
krb5_free_keyblock(context, key->key);
|
||||
if(key->schedule) {
|
||||
@@ -2088,7 +2088,7 @@ _krb5_free_key_data(krb5_context context, struct _krb5_key_data *key,
|
||||
|
||||
static void
|
||||
free_key_usage(krb5_context context, struct _krb5_key_usage *ku,
|
||||
struct encryption_type *et)
|
||||
struct _krb5_encryption_type *et)
|
||||
{
|
||||
_krb5_free_key_data(context, &ku->key, et);
|
||||
}
|
||||
@@ -2218,7 +2218,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_disable(krb5_context context,
|
||||
krb5_enctype enctype)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(enctype);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(enctype);
|
||||
if(et == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
@@ -2245,7 +2245,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_enable(krb5_context context,
|
||||
krb5_enctype enctype)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(enctype);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(enctype);
|
||||
if(et == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
@@ -2289,7 +2289,7 @@ wrapped_length (krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
size_t data_len)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
size_t padsize = et->padsize;
|
||||
size_t checksumsize = CHECKSUMSIZE(et->checksum);
|
||||
size_t res;
|
||||
@@ -2304,7 +2304,7 @@ wrapped_length_dervied (krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
size_t data_len)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
size_t padsize = et->padsize;
|
||||
size_t res;
|
||||
|
||||
@@ -2340,7 +2340,7 @@ static size_t
|
||||
crypto_overhead (krb5_context context,
|
||||
krb5_crypto crypto)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
size_t res;
|
||||
|
||||
res = CHECKSUMSIZE(et->checksum);
|
||||
@@ -2354,7 +2354,7 @@ static size_t
|
||||
crypto_overhead_dervied (krb5_context context,
|
||||
krb5_crypto crypto)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
size_t res;
|
||||
|
||||
if (et->keyed_checksum)
|
||||
@@ -2401,7 +2401,7 @@ krb5_random_to_key(krb5_context context,
|
||||
krb5_keyblock *key)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
struct encryption_type *et = _krb5_find_enctype(type);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(type);
|
||||
if(et == NULL) {
|
||||
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
N_("encryption type %d not supported", ""),
|
||||
@@ -2435,7 +2435,7 @@ krb5_crypto_prf_length(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *length)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(type);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(type);
|
||||
|
||||
if(et == NULL || et->prf_length == 0) {
|
||||
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
@@ -2454,7 +2454,7 @@ krb5_crypto_prf(krb5_context context,
|
||||
const krb5_data *input,
|
||||
krb5_data *output)
|
||||
{
|
||||
struct encryption_type *et = crypto->et;
|
||||
struct _krb5_encryption_type *et = crypto->et;
|
||||
|
||||
krb5_data_zero(output);
|
||||
|
||||
@@ -2646,8 +2646,8 @@ krb5_enctypes_compatible_keys(krb5_context context,
|
||||
krb5_enctype etype1,
|
||||
krb5_enctype etype2)
|
||||
{
|
||||
struct encryption_type *e1 = _krb5_find_enctype(etype1);
|
||||
struct encryption_type *e2 = _krb5_find_enctype(etype2);
|
||||
struct _krb5_encryption_type *e1 = _krb5_find_enctype(etype1);
|
||||
struct _krb5_encryption_type *e2 = _krb5_find_enctype(etype2);
|
||||
return e1 != NULL && e2 != NULL && e1->keytype == e2->keytype;
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ struct _krb5_key_data {
|
||||
struct _krb5_key_usage;
|
||||
|
||||
struct krb5_crypto_data {
|
||||
struct encryption_type *et;
|
||||
struct _krb5_encryption_type *et;
|
||||
struct _krb5_key_data key;
|
||||
int num_key_usage;
|
||||
struct _krb5_key_usage *key_usage;
|
||||
@@ -68,21 +68,21 @@ struct salt_type {
|
||||
krb5_salt, krb5_data, krb5_keyblock*);
|
||||
};
|
||||
|
||||
struct key_type {
|
||||
struct _krb5_key_type {
|
||||
krb5_keytype type; /* XXX */
|
||||
const char *name;
|
||||
size_t bits;
|
||||
size_t size;
|
||||
size_t schedule_size;
|
||||
void (*random_key)(krb5_context, krb5_keyblock*);
|
||||
void (*schedule)(krb5_context, struct key_type *, struct _krb5_key_data *);
|
||||
void (*schedule)(krb5_context, struct _krb5_key_type *, struct _krb5_key_data *);
|
||||
struct salt_type *string_to_key;
|
||||
void (*random_to_key)(krb5_context, krb5_keyblock*, const void*, size_t);
|
||||
void (*cleanup)(krb5_context, struct _krb5_key_data *);
|
||||
const EVP_CIPHER *(*evp)(void);
|
||||
};
|
||||
|
||||
struct checksum_type {
|
||||
struct _krb5_checksum_type {
|
||||
krb5_cksumtype type;
|
||||
const char *name;
|
||||
size_t blocksize;
|
||||
@@ -100,15 +100,15 @@ struct checksum_type {
|
||||
Checksum *csum);
|
||||
};
|
||||
|
||||
struct encryption_type {
|
||||
struct _krb5_encryption_type {
|
||||
krb5_enctype type;
|
||||
const char *name;
|
||||
size_t blocksize;
|
||||
size_t padsize;
|
||||
size_t confoundersize;
|
||||
struct key_type *keytype;
|
||||
struct checksum_type *checksum;
|
||||
struct checksum_type *keyed_checksum;
|
||||
struct _krb5_key_type *keytype;
|
||||
struct _krb5_checksum_type *checksum;
|
||||
struct _krb5_checksum_type *keyed_checksum;
|
||||
unsigned flags;
|
||||
krb5_error_code (*encrypt)(krb5_context context,
|
||||
struct _krb5_key_data *key,
|
||||
@@ -127,20 +127,20 @@ struct encryption_type {
|
||||
|
||||
/* Checksums */
|
||||
|
||||
extern struct checksum_type _krb5_checksum_none;
|
||||
extern struct checksum_type _krb5_checksum_crc32;
|
||||
extern struct checksum_type _krb5_checksum_rsa_md4;
|
||||
extern struct checksum_type _krb5_checksum_rsa_md4_des;
|
||||
extern struct checksum_type _krb5_checksum_rsa_md5_des;
|
||||
extern struct checksum_type _krb5_checksum_rsa_md5_des3;
|
||||
extern struct checksum_type _krb5_checksum_rsa_md5;
|
||||
extern struct checksum_type _krb5_checksum_hmac_sha1_des3;
|
||||
extern struct checksum_type _krb5_checksum_hmac_sha1_aes128;
|
||||
extern struct checksum_type _krb5_checksum_hmac_sha1_aes256;
|
||||
extern struct checksum_type _krb5_checksum_hmac_md5;
|
||||
extern struct checksum_type _krb5_checksum_sha1;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_none;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_crc32;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_rsa_md4;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_rsa_md4_des;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_rsa_md5_des;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_rsa_md5_des3;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_rsa_md5;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_hmac_sha1_des3;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes128;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes256;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_hmac_md5;
|
||||
extern struct _krb5_checksum_type _krb5_checksum_sha1;
|
||||
|
||||
extern struct checksum_type *_krb5_checksum_types[];
|
||||
extern struct _krb5_checksum_type *_krb5_checksum_types[];
|
||||
extern int _krb5_num_checksums;
|
||||
|
||||
/* Salts */
|
||||
@@ -153,27 +153,27 @@ extern struct salt_type _krb5_des3_salt_derived[];
|
||||
|
||||
/* Encryption types */
|
||||
|
||||
extern struct encryption_type _krb5_enctype_aes256_cts_hmac_sha1;
|
||||
extern struct encryption_type _krb5_enctype_aes128_cts_hmac_sha1;
|
||||
extern struct encryption_type _krb5_enctype_des3_cbc_sha1;
|
||||
extern struct encryption_type _krb5_enctype_des3_cbc_md5;
|
||||
extern struct encryption_type _krb5_enctype_des3_cbc_none;
|
||||
extern struct encryption_type _krb5_enctype_arcfour_hmac_md5;
|
||||
extern struct encryption_type _krb5_enctype_des_cbc_md5;
|
||||
extern struct encryption_type _krb5_enctype_old_des3_cbc_sha1;
|
||||
extern struct encryption_type _krb5_enctype_des_cbc_crc;
|
||||
extern struct encryption_type _krb5_enctype_des_cbc_md4;
|
||||
extern struct encryption_type _krb5_enctype_des_cbc_md5;
|
||||
extern struct encryption_type _krb5_enctype_des_cbc_none;
|
||||
extern struct encryption_type _krb5_enctype_des_cfb64_none;
|
||||
extern struct encryption_type _krb5_enctype_des_pcbc_none;
|
||||
extern struct encryption_type _krb5_enctype_null;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_aes256_cts_hmac_sha1;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_aes128_cts_hmac_sha1;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des3_cbc_sha1;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des3_cbc_md5;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des3_cbc_none;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_arcfour_hmac_md5;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_cbc_md5;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_old_des3_cbc_sha1;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_cbc_crc;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_cbc_md4;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_cbc_md5;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_cbc_none;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_cfb64_none;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_des_pcbc_none;
|
||||
extern struct _krb5_encryption_type _krb5_enctype_null;
|
||||
|
||||
extern struct encryption_type *_krb5_etypes[];
|
||||
extern struct _krb5_encryption_type *_krb5_etypes[];
|
||||
extern int _krb5_num_etypes;
|
||||
|
||||
/* Interface to the EVP crypto layer provided by hcrypto */
|
||||
struct evp_schedule {
|
||||
struct _krb5_evp_schedule {
|
||||
EVP_CIPHER_CTX ectx;
|
||||
EVP_CIPHER_CTX dctx;
|
||||
};
|
||||
|
@@ -45,7 +45,7 @@ AES_string_to_key(krb5_context context,
|
||||
{
|
||||
krb5_error_code ret;
|
||||
uint32_t iter;
|
||||
struct encryption_type *et;
|
||||
struct _krb5_encryption_type *et;
|
||||
struct _krb5_key_data kd;
|
||||
|
||||
if (opaque.length == 0)
|
||||
|
@@ -39,7 +39,7 @@ krb5_salttype_to_string (krb5_context context,
|
||||
krb5_salttype stype,
|
||||
char **string)
|
||||
{
|
||||
struct encryption_type *e;
|
||||
struct _krb5_encryption_type *e;
|
||||
struct salt_type *st;
|
||||
|
||||
e = _krb5_find_enctype (etype);
|
||||
@@ -71,7 +71,7 @@ krb5_string_to_salttype (krb5_context context,
|
||||
const char *string,
|
||||
krb5_salttype *salttype)
|
||||
{
|
||||
struct encryption_type *e;
|
||||
struct _krb5_encryption_type *e;
|
||||
struct salt_type *st;
|
||||
|
||||
e = _krb5_find_enctype (etype);
|
||||
@@ -187,7 +187,7 @@ krb5_string_to_key_data_salt_opaque (krb5_context context,
|
||||
krb5_data opaque,
|
||||
krb5_keyblock *key)
|
||||
{
|
||||
struct encryption_type *et =_krb5_find_enctype(enctype);
|
||||
struct _krb5_encryption_type *et =_krb5_find_enctype(enctype);
|
||||
struct salt_type *st;
|
||||
if(et == NULL) {
|
||||
krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP,
|
||||
@@ -247,7 +247,7 @@ krb5_string_to_key_derived(krb5_context context,
|
||||
krb5_enctype etype,
|
||||
krb5_keyblock *key)
|
||||
{
|
||||
struct encryption_type *et = _krb5_find_enctype(etype);
|
||||
struct _krb5_encryption_type *et = _krb5_find_enctype(etype);
|
||||
krb5_error_code ret;
|
||||
struct _krb5_key_data kd;
|
||||
size_t keylen;
|
||||
|
Reference in New Issue
Block a user