]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Get rid of G_VFY_TOKEN_HDR_IGNORE_SEQ_SIZE
authorGreg Hudson <ghudson@mit.edu>
Sun, 8 Sep 2013 18:10:37 +0000 (14:10 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sun, 8 Sep 2013 18:18:26 +0000 (14:18 -0400)
This flag was introduced in the mskrb-integ merge but is not actually
used after r21742--while kg_unseal_iov_token sets it in vfyflags for
DCE-style contexts, it doesn't actually pass vfyflags to
g_verify_token_header or otherwise use it.  Moreover, the flag is not
necessary there; we correctly set input_length to the header length
(without data, padding, or trailer) for v1 tokens in a DCE-style
context.

src/lib/gssapi/generic/gssapiP_generic.h
src/lib/gssapi/generic/util_token.c
src/lib/gssapi/krb5/k5unsealiov.c

index ebc9096b6a5374fb09550f0d578663f24dabef9e..706805d57458f5d52335f12cc4764ce72bb06d17 100644 (file)
@@ -157,7 +157,6 @@ void g_make_token_header (const gss_OID_desc * mech, unsigned int body_size,
 
 /* flags for g_verify_token_header() */
 #define G_VFY_TOKEN_HDR_WRAPPER_REQUIRED        0x01
-#define G_VFY_TOKEN_HDR_IGNORE_SEQ_SIZE         0x02
 
 gss_int32 g_verify_token_header (const gss_OID_desc * mech,
                                  unsigned int *body_size,
index 0c4c90c16e5237d5f916910fd34ce9f2b1291119..6e339f4ac7f73ed7d1f10cf01597f6a1a377efbf 100644 (file)
@@ -194,8 +194,7 @@ g_verify_token_header(
     if ((seqsize = der_read_length(&buf, &toksize)) < 0)
         return(G_BAD_TOK_HEADER);
 
-    if ((flags & G_VFY_TOKEN_HDR_IGNORE_SEQ_SIZE) == 0 &&
-        seqsize != toksize)
+    if (seqsize != toksize)
         return(G_BAD_TOK_HEADER);
 
     if ((toksize-=1) < 0)
index 87fe34f9d420fe0a1e1cf99dd8b6201d2c9b1ff4..f80f4d05d60d591c1e0d709e8c32fcffff0af912 100644 (file)
@@ -315,7 +315,6 @@ kg_unseal_iov_token(OM_uint32 *minor_status,
     size_t input_length;
     unsigned int bodysize;
     int toktype2;
-    int vfyflags = 0;
 
     header = kg_locate_iov(iov, iov_count, GSS_IOV_BUFFER_TYPE_HEADER);
     if (header == NULL) {
@@ -343,9 +342,6 @@ kg_unseal_iov_token(OM_uint32 *minor_status,
             input_length += trailer->buffer.length;
     }
 
-    if (ctx->gss_flags & GSS_C_DCE_STYLE)
-        vfyflags |= G_VFY_TOKEN_HDR_IGNORE_SEQ_SIZE;
-
     code = g_verify_token_header(ctx->mech_used,
                                  &bodysize, &ptr, -1,
                                  input_length, 0);