projects
/
mech_eap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use AD-KDCIssued to protect RADIUS authdata. Cleanup.
[mech_eap.git]
/
wrap_iov.c
diff --git
a/wrap_iov.c
b/wrap_iov.c
index
994dded
..
ae43ef9
100644
(file)
--- a/
wrap_iov.c
+++ b/
wrap_iov.c
@@
-105,21
+105,14
@@
gssEapWrapOrGetMIC(OM_uint32 *minor,
flags = rfc4121Flags(ctx, FALSE);
flags = rfc4121Flags(ctx, FALSE);
- switch (toktype) {
- case TOK_TYPE_WRAP:
+ if (toktype == TOK_TYPE_WRAP) {
keyUsage = CTX_IS_INITIATOR(ctx)
? KEY_USAGE_INITIATOR_SEAL
: KEY_USAGE_ACCEPTOR_SEAL;
keyUsage = CTX_IS_INITIATOR(ctx)
? KEY_USAGE_INITIATOR_SEAL
: KEY_USAGE_ACCEPTOR_SEAL;
- break;
- case TOK_TYPE_GSS_CB:
- keyUsage = KEY_USAGE_CHANNEL_BINDINGS;
- break;
- case TOK_TYPE_MIC:
- default:
+ } else {
keyUsage = CTX_IS_INITIATOR(ctx)
? KEY_USAGE_INITIATOR_SIGN
: KEY_USAGE_ACCEPTOR_SIGN;
keyUsage = CTX_IS_INITIATOR(ctx)
? KEY_USAGE_INITIATOR_SIGN
: KEY_USAGE_ACCEPTOR_SIGN;
- break;
}
gssEapIovMessageLength(iov, iov_count, &dataLen, &assocDataLen);
}
gssEapIovMessageLength(iov, iov_count, &dataLen, &assocDataLen);
@@
-295,8
+288,7
@@
gssEapWrapOrGetMIC(OM_uint32 *minor,
if (code != 0)
goto cleanup;
if (code != 0)
goto cleanup;
- if (toktype != TOK_TYPE_GSS_CB)
- ctx->sendSeq++;
+ ctx->sendSeq++;
if (toktype == TOK_TYPE_WRAP) {
/* Fix up EC field */
if (toktype == TOK_TYPE_WRAP) {
/* Fix up EC field */
@@
-304,7
+296,7
@@
gssEapWrapOrGetMIC(OM_uint32 *minor,
/* Fix up RRC field */
store_uint16_be(rrc, outbuf + 6);
}
/* Fix up RRC field */
store_uint16_be(rrc, outbuf + 6);
}
- } else if (toktype == TOK_TYPE_MIC
|| toktype == TOK_TYPE_GSS_CB
) {
+ } else if (toktype == TOK_TYPE_MIC) {
trailer = NULL;
goto wrap_with_checksum;
} else if (toktype == TOK_TYPE_DELETE_CONTEXT) {
trailer = NULL;
goto wrap_with_checksum;
} else if (toktype == TOK_TYPE_DELETE_CONTEXT) {