From: Ken Raeburn Date: Sat, 17 Jan 2009 00:06:06 +0000 (+0000) Subject: patch from Luke - minor cleanup X-Git-Tag: krb5-1.7-alpha1~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab4f8e479d78a9b3a31d8b0d5d4f87a0a82d24fa;p=krb5.git patch from Luke - minor cleanup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21761 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/k5sealv3.c b/src/lib/gssapi/krb5/k5sealv3.c index 56a4a4462..b12284fb1 100644 --- a/src/lib/gssapi/krb5/k5sealv3.c +++ b/src/lib/gssapi/krb5/k5sealv3.c @@ -320,9 +320,8 @@ gss_krb5int_unseal_token_v3(krb5_context *contextptr, krb5_keyblock *key; krb5_cksumtype cksumtype; - if(ctx->big_endian != 0) - goto defective; - + if (ctx->big_endian != 0) + goto defective; if (qop_state) *qop_state = GSS_C_QOP_DEFAULT; diff --git a/src/lib/gssapi/krb5/k5sealv3iov.c b/src/lib/gssapi/krb5/k5sealv3iov.c index 879d99748..e39665feb 100644 --- a/src/lib/gssapi/krb5/k5sealv3iov.c +++ b/src/lib/gssapi/krb5/k5sealv3iov.c @@ -298,8 +298,7 @@ gss_krb5int_unseal_v3_iov(krb5_context context, int conf_flag = 0; if (ctx->big_endian != 0) - return GSS_S_DEFECTIVE_TOKEN; - + return GSS_S_DEFECTIVE_TOKEN; if (qop_state != NULL) *qop_state = GSS_C_QOP_DEFAULT; diff --git a/src/lib/gssapi/krb5/util_crypt.c b/src/lib/gssapi/krb5/util_crypt.c index e93acb9ca..e2f306e97 100644 --- a/src/lib/gssapi/krb5/util_crypt.c +++ b/src/lib/gssapi/krb5/util_crypt.c @@ -99,9 +99,10 @@ kg_setup_keys(krb5_context context, *cksumtype = 0; ctx->proto = 0; + if (ctx->enc == NULL) { - ctx->signalg = -1; - ctx->sealalg = -1; + ctx->signalg = -1; + ctx->sealalg = -1; } code = krb5int_accessor(&kaccess, KRB5INT_ACCESS_VERSION); @@ -109,9 +110,9 @@ kg_setup_keys(krb5_context context, return code; code = (*kaccess.krb5int_c_mandatory_cksumtype)(context, subkey->enctype, - cksumtype); + cksumtype); if (code != 0) - return code; + return code; switch (subkey->enctype) { case ENCTYPE_DES_CBC_MD5: @@ -154,7 +155,7 @@ kg_setup_keys(krb5_context context, break; default: ctx->proto = 1; - + break; } return 0;