* mk_auth.c (krb_check_auth): Modify call to rd_priv() by kludging
authorTom Yu <tlyu@mit.edu>
Tue, 24 Oct 2000 00:14:18 +0000 (00:14 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 24 Oct 2000 00:14:18 +0000 (00:14 +0000)
a cast of session key to C_Block *, since CNS is inconsistent in
this area as well.

* mk_priv.c (krb_mk_priv): Align with CNS by taking C_Block *.

* mk_safe.c (krb_mk_safe): Align with CNS by taking C_Block *.

* rd_priv.c (krb_rd_priv): Align with CNS by taking C_Block *.

* rd_safe.c (krb_rd_safe): Align with CNS by taking C_Block *.

* recvauth.c (krb_recvauth): Update call to mk_priv() to have the
correct type.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12805 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb4/ChangeLog
src/lib/krb4/mk_auth.c
src/lib/krb4/mk_priv.c
src/lib/krb4/mk_safe.c
src/lib/krb4/rd_priv.c
src/lib/krb4/rd_safe.c
src/lib/krb4/recvauth.c

index ce5439cee7d337dea6ead1768ad4b2c6e1c1d6ae..778ba1da5750c4b1c780a94da49b28647ab61ec5 100644 (file)
@@ -1,3 +1,20 @@
+2000-10-23  Tom Yu  <tlyu@mit.edu>
+
+       * mk_auth.c (krb_check_auth): Modify call to rd_priv() by kludging
+       a cast of session key to C_Block *, since CNS is inconsistent in
+       this area as well.
+
+       * mk_priv.c (krb_mk_priv): Align with CNS by taking C_Block *.
+
+       * mk_safe.c (krb_mk_safe): Align with CNS by taking C_Block *.
+
+       * rd_priv.c (krb_rd_priv): Align with CNS by taking C_Block *.
+
+       * rd_safe.c (krb_rd_safe): Align with CNS by taking C_Block *.
+
+       * recvauth.c (krb_recvauth): Update call to mk_priv() to have the
+       correct type.
+
 Tue Oct 10 05:03:50 2000  Ezra Peisach  <epeisach@mit.edu>
 
        * kparse.c: Provide prototype for static struol(). Do not define
index a94a25d85f44e5777a1aafea4399e5f68782cdba..45952c0f202f9381b0d32e5c62bed4af89413333 100644 (file)
@@ -205,7 +205,7 @@ krb_check_auth (buf, checksum, msg_data, session, schedule, laddr, faddr)
     key_sched(session, schedule);
 #endif /* !NOENCRYPTION */
     if (cc = krb_rd_priv(buf->dat, buf->length, schedule,
-                        session, faddr, laddr, msg_data))
+                        (C_Block *)session, faddr, laddr, msg_data))
        return(cc);
 
     /* fetch the (incremented) checksum that we supplied in the request */
index 47c96f59b0c32351e643593397d97159bc2bcf97..e8ce33358ff156d413d8892d202508b5c9a83e00 100644 (file)
@@ -87,7 +87,7 @@ krb_mk_priv(in,out,length,schedule,key,sender,receiver)
                                 * (header stuff) overlap */
     unsigned KRB4_32 length;   /* of in data */
     Key_schedule schedule;     /* precomputed key schedule */
-    C_Block key;               /* encryption key for seed and ivec */
+    C_Block FAR *key;          /* encryption key for seed and ivec */
     struct sockaddr_in FAR *sender;   /* sender address */
     struct sockaddr_in FAR *receiver; /* receiver address */
 {
@@ -198,7 +198,7 @@ krb_mk_priv(in,out,length,schedule,key,sender,receiver)
 #ifndef NOENCRYPTION
     /* pcbc encrypt, pad as needed, use key as ivec */
     pcbc_encrypt((C_Block *) q,(C_Block *) q, (long) (p-q), schedule,
-                 (C_Block *)key, ENCRYPT);
+                 key, ENCRYPT);
 #endif /* NOENCRYPTION */
 
     return (q - out + c_length);        /* resulting size */
index b0dbd17e4adbf5431bb4ce6948547cd86685ede0..5d810ea50a2eab3a5c45a1a6d05d1742be12de00 100644 (file)
@@ -69,7 +69,7 @@ krb_mk_safe(in,out,length,key,sender,receiver)
                                 * overlap
                                 */
     unsigned KRB4_32 length;   /* of in data */
-    C_Block key;               /* encryption key for seed and ivec */
+    C_Block FAR *key;          /* encryption key for seed and ivec */
     struct sockaddr_in *sender;        /* sender address */
     struct sockaddr_in *receiver; /* receiver address */
 {
@@ -143,7 +143,7 @@ krb_mk_safe(in,out,length,key,sender,receiver)
 #else /* Do encryption */
     /* calculate the checksum of length, timestamps, and input data */
     cksum = quad_cksum(q, (unsigned KRB4_32 *)big_cksum,
-                      p-q, 2, (C_Block *)key);
+                      p-q, 2, key);
 #endif /* NOENCRYPTION */
     DEB (("\ncksum = %u",cksum));
 
index 44add9a76dc341b7cb06e8113af9b069481f1460..9a2bb26d5f839c16daf15cbcc8f8730d46e4344b 100644 (file)
@@ -70,7 +70,7 @@ krb_rd_priv(in,in_length,schedule,key,sender,receiver,m_data)
     u_char *in;                        /* pointer to the msg received */
     unsigned KRB4_32 in_length; /* length of "in" msg */
     Key_schedule schedule;     /* precomputed key schedule */
-    C_Block key;               /* encryption key for seed and ivec */
+    C_Block FAR *key;          /* encryption key for seed and ivec */
     struct sockaddr_in *sender;
     struct sockaddr_in *receiver;
     MSG_DAT *m_data;           /*various input/output data from msg */
@@ -114,7 +114,7 @@ krb_rd_priv(in,in_length,schedule,key,sender,receiver,m_data)
 #ifndef NOENCRYPTION
     /* pcbc decrypt, use key as ivec */
     pcbc_encrypt((C_Block *)q, (C_Block *)q, (long)c_length,
-                 schedule, (C_Block *)key, DECRYPT);
+                 schedule, key, DECRYPT);
 #endif
 
     /* safely get application data length */
index f60e05922929a6cdaf93b2d57cdd45c92847e8b1..cade67b628cd42d6d4e514aee65952b1bf39ebb9 100644 (file)
@@ -52,7 +52,7 @@ KRB5_DLLIMP long KRB5_CALLCONV
 krb_rd_safe(in,in_length,key,sender,receiver,m_data)
     u_char FAR *in;                    /* pointer to the msg received */
     unsigned KRB4_32 in_length;                /* length of "in" msg */
-    C_Block FAR key;                   /* encryption key for seed and ivec */
+    C_Block FAR *key;                  /* encryption key for seed and ivec */
     struct sockaddr_in FAR *sender;    /* sender's address */
     struct sockaddr_in FAR *receiver;  /* receiver's address -- me */
     MSG_DAT FAR *m_data;               /* where to put message information */
@@ -180,7 +180,7 @@ krb_rd_safe protocol err sizeof(u_long) != sizeof(struct in_addr)");
 #else /* Do encryption */
     /* calculate the checksum of the length, timestamps, and
      * input data, on the sending byte order !! */
-    quad_cksum(q,calc_cksum,p-q,2,(C_Block *)key);
+    quad_cksum(q,calc_cksum,p-q,2,key);
 #endif /* NOENCRYPTION */
 
     DEB (("\n0: calc %l big %lx\n1: calc %lx big %lx\n2: calc %lx big %lx\n3: calc %lx big %lx\n",
index 2a6665648e1bfaf3cc8ca303c75d3fc8700cade2..9230b32c02ac253f084eeadedf1cec6182c85b08 100644 (file)
@@ -257,7 +257,7 @@ krb_recvauth(options, fd, ticket, service, instance, faddr, laddr, kdata,
                               tmp_buf,
                               (unsigned KRB4_32) sizeof(cksum),
                               schedule,
-                              kdata->session,
+                              &kdata->session,
                               laddr,
                               faddr);
        if (priv_len < 0) {