switch to KRB5_ENCTYPE
This commit is contained in:
@@ -147,7 +147,6 @@ _gsskrb5_wrap_size_limit (
|
||||
krb5_context context;
|
||||
krb5_keyblock *key;
|
||||
OM_uint32 ret;
|
||||
krb5_keytype keytype;
|
||||
const gsskrb5_ctx ctx = (const gsskrb5_ctx) context_handle;
|
||||
|
||||
GSSAPI_KRB5_INIT (&context);
|
||||
@@ -164,23 +163,25 @@ _gsskrb5_wrap_size_limit (
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
krb5_enctype_to_keytype (context, key->keytype, &keytype);
|
||||
|
||||
switch (keytype) {
|
||||
case KEYTYPE_DES :
|
||||
switch (key->keytype) {
|
||||
case KRB5_ENCTYPE_DES_CBC_CRC :
|
||||
case KRB5_ENCTYPE_DES_CBC_MD4 :
|
||||
case KRB5_ENCTYPE_DES_CBC_MD5 :
|
||||
#ifdef HEIM_WEAK_CRYPTO
|
||||
ret = sub_wrap_size(req_output_size, max_input_size, 8, 22);
|
||||
#else
|
||||
ret = GSS_S_FAILURE;
|
||||
#endif
|
||||
break;
|
||||
case ENCTYPE_ARCFOUR_HMAC_MD5:
|
||||
case ENCTYPE_ARCFOUR_HMAC_MD5_56:
|
||||
case KRB5_ENCTYPE_ARCFOUR_HMAC_MD5:
|
||||
case KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56:
|
||||
ret = _gssapi_wrap_size_arcfour(minor_status, ctx, context,
|
||||
conf_req_flag, qop_req,
|
||||
req_output_size, max_input_size, key);
|
||||
break;
|
||||
case KEYTYPE_DES3 :
|
||||
case KRB5_ENCTYPE_DES3_CBC_MD5 :
|
||||
case KRB5_ENCTYPE_DES3_CBC_SHA1 :
|
||||
ret = sub_wrap_size(req_output_size, max_input_size, 8, 34);
|
||||
break;
|
||||
default :
|
||||
@@ -558,10 +559,11 @@ _gsskrb5_wrap
|
||||
*minor_status = ret;
|
||||
return GSS_S_FAILURE;
|
||||
}
|
||||
krb5_enctype_to_keytype (context, key->keytype, &keytype);
|
||||
|
||||
switch (keytype) {
|
||||
case KEYTYPE_DES :
|
||||
switch (key->keytype) {
|
||||
case KRB5_ENCTYPE_DES_CBC_CRC :
|
||||
case KRB5_ENCTYPE_DES_CBC_MD4 :
|
||||
case KRB5_ENCTYPE_DES_CBC_MD5 :
|
||||
#ifdef HEIM_WEAK_CRYPTO
|
||||
ret = wrap_des (minor_status, ctx, context, conf_req_flag,
|
||||
qop_req, input_message_buffer, conf_state,
|
||||
@@ -570,13 +572,14 @@ _gsskrb5_wrap
|
||||
ret = GSS_S_FAILURE;
|
||||
#endif
|
||||
break;
|
||||
case KEYTYPE_DES3 :
|
||||
case KRB5_ENCTYPE_DES3_CBC_MD5 :
|
||||
case KRB5_ENCTYPE_DES3_CBC_SHA1 :
|
||||
ret = wrap_des3 (minor_status, ctx, context, conf_req_flag,
|
||||
qop_req, input_message_buffer, conf_state,
|
||||
output_message_buffer, key);
|
||||
break;
|
||||
case KEYTYPE_ARCFOUR:
|
||||
case KEYTYPE_ARCFOUR_56:
|
||||
case KRB5_ENCTYPE_ARCFOUR_HMAC_MD5:
|
||||
case KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56:
|
||||
ret = _gssapi_wrap_arcfour (minor_status, ctx, context, conf_req_flag,
|
||||
qop_req, input_message_buffer, conf_state,
|
||||
output_message_buffer, key);
|
||||
|
Reference in New Issue
Block a user