]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Pull the kdc_req_body out of the ASN.1 packet and pass in to be
authorSam Hartman <hartmans@mit.edu>
Thu, 26 Mar 2009 05:37:15 +0000 (05:37 +0000)
committerSam Hartman <hartmans@mit.edu>
Thu, 26 Mar 2009 05:37:15 +0000 (05:37 +0000)
checksummed; the code previously incorrectly passed in the entire
kdc_req.

do_as_req: decode kdc_req_body

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/fast@22137 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_as_req.c

index c3244a4f6aa1c7fd4f19ed93745f1c92163dbb44..a79bcb990cd5b16cfeac33b2e002ea2558148c21 100644 (file)
@@ -118,6 +118,7 @@ process_as_req(krb5_kdc_req *request, krb5_data *req_pkt,
     const char *emsg = 0;
     krb5_keylist_node *tmp_mkey_list;
     struct kdc_request_state *state = NULL;
+    krb5_data encoded_req_body;
     
 
 #if APPLE_PKINIT
@@ -140,7 +141,12 @@ process_as_req(krb5_kdc_req *request, krb5_data *req_pkt,
        status = "constructing state";
        goto errout;
     }
-    errcode = kdc_find_fast(&request, req_pkt, NULL /*TGS key*/, state);
+    if (fetch_asn1_field((unsigned char *) req_pkt->data,
+                        1, 4, &encoded_req_body) != 0) {
+    errcode = ASN1_BAD_ID;
+    status = "Finding req_body";
+}
+    errcode = kdc_find_fast(&request, &encoded_req_body, NULL /*TGS key*/, state);
     if (errcode) {
        status = "error decoding FAST";
        goto errout;