summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/gssapi/krb5/wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/gssapi/krb5/wrap.c')
-rw-r--r--source4/heimdal/lib/gssapi/krb5/wrap.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/source4/heimdal/lib/gssapi/krb5/wrap.c b/source4/heimdal/lib/gssapi/krb5/wrap.c
index bedeace4dd..6d00f2adcf 100644
--- a/source4/heimdal/lib/gssapi/krb5/wrap.c
+++ b/source4/heimdal/lib/gssapi/krb5/wrap.c
@@ -210,19 +210,10 @@ wrap_des
int32_t seq_number;
size_t len, total_len, padlength, datalen;
- if (IS_DCE_STYLE(ctx)) {
- padlength = 0;
- datalen = input_message_buffer->length;
- len = 22 + 8;
- _gsskrb5_encap_length (len, &len, &total_len, GSS_KRB5_MECHANISM);
- total_len += datalen;
- datalen += 8;
- } else {
- padlength = 8 - (input_message_buffer->length % 8);
- datalen = input_message_buffer->length + padlength + 8;
- len = datalen + 22;
- _gsskrb5_encap_length (len, &len, &total_len, GSS_KRB5_MECHANISM);
- }
+ padlength = 8 - (input_message_buffer->length % 8);
+ datalen = input_message_buffer->length + padlength + 8;
+ len = datalen + 22;
+ _gsskrb5_encap_length (len, &len, &total_len, GSS_KRB5_MECHANISM);
output_message_buffer->length = total_len;
output_message_buffer->value = malloc (total_len);
@@ -345,19 +336,10 @@ wrap_des3
Checksum cksum;
krb5_data encdata;
- if (IS_DCE_STYLE(ctx)) {
- padlength = 0;
- datalen = input_message_buffer->length;
- len = 34 + 8;
- _gsskrb5_encap_length (len, &len, &total_len, GSS_KRB5_MECHANISM);
- total_len += datalen;
- datalen += 8;
- } else {
- padlength = 8 - (input_message_buffer->length % 8);
- datalen = input_message_buffer->length + padlength + 8;
- len = datalen + 34;
- _gsskrb5_encap_length (len, &len, &total_len, GSS_KRB5_MECHANISM);
- }
+ padlength = 8 - (input_message_buffer->length % 8);
+ datalen = input_message_buffer->length + padlength + 8;
+ len = datalen + 34;
+ _gsskrb5_encap_length (len, &len, &total_len, GSS_KRB5_MECHANISM);
output_message_buffer->length = total_len;
output_message_buffer->value = malloc (total_len);