diff options
Diffstat (limited to 'crypto/heimdal/lib')
-rw-r--r-- | crypto/heimdal/lib/asn1/libasn1.h | 51 | ||||
-rw-r--r-- | crypto/heimdal/lib/des/rc4.h | 76 | ||||
-rw-r--r-- | crypto/heimdal/lib/des/rc4_enc.c | 133 | ||||
-rw-r--r-- | crypto/heimdal/lib/des/rc4_skey.c | 101 | ||||
-rw-r--r-- | crypto/heimdal/lib/des/rc4test.c | 201 | ||||
-rw-r--r-- | crypto/heimdal/lib/hdb/hdb_locl.h | 1 | ||||
-rw-r--r-- | crypto/heimdal/lib/hdb/libasn1.h | 51 | ||||
-rw-r--r-- | crypto/heimdal/lib/kdfs/ChangeLog | 20 | ||||
-rw-r--r-- | crypto/heimdal/lib/kdfs/Makefile.am | 10 | ||||
-rw-r--r-- | crypto/heimdal/lib/kdfs/Makefile.in | 562 | ||||
-rw-r--r-- | crypto/heimdal/lib/kdfs/k5dfspag.c | 368 | ||||
-rw-r--r-- | crypto/heimdal/lib/krb5/address.c | 203 | ||||
-rw-r--r-- | crypto/heimdal/lib/krb5/crypto.c | 63 | ||||
-rw-r--r-- | crypto/heimdal/lib/krb5/krb5_locl.h | 12 | ||||
-rw-r--r-- | crypto/heimdal/lib/roken/make-print-version.c | 4 |
15 files changed, 34 insertions, 1822 deletions
diff --git a/crypto/heimdal/lib/asn1/libasn1.h b/crypto/heimdal/lib/asn1/libasn1.h deleted file mode 100644 index 8a4994a..0000000 --- a/crypto/heimdal/lib/asn1/libasn1.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: libasn1.h,v 1.9 2001/04/18 13:10:24 joda Exp $ */ - -#ifndef __LIBASN1_H__ -#define __LIBASN1_H__ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include "krb5_asn1.h" -#include "der.h" -#include "asn1_err.h" -#include <parse_units.h> - -#endif /* __LIBASN1_H__ */ diff --git a/crypto/heimdal/lib/des/rc4.h b/crypto/heimdal/lib/des/rc4.h deleted file mode 100644 index 15441f6..0000000 --- a/crypto/heimdal/lib/des/rc4.h +++ /dev/null @@ -1,76 +0,0 @@ -/* crypto/rc4/rc4.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* $Id: rc4.h,v 1.2 1999/10/21 12:58:31 joda Exp $ */ - -#ifndef HEADER_RC4_H -#define HEADER_RC4_H - -typedef unsigned int RC4_INT; - -typedef struct rc4_key_st { - RC4_INT x,y; - RC4_INT data[256]; -} RC4_KEY; - - -void RC4_set_key(RC4_KEY *key, int len, unsigned char *data); -void RC4(RC4_KEY *key, unsigned long len, unsigned char *indata, - unsigned char *outdata); - -#endif diff --git a/crypto/heimdal/lib/des/rc4_enc.c b/crypto/heimdal/lib/des/rc4_enc.c deleted file mode 100644 index 6b1686f..0000000 --- a/crypto/heimdal/lib/des/rc4_enc.c +++ /dev/null @@ -1,133 +0,0 @@ -/* crypto/rc4/rc4_enc.c */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#include "des_locl.h" -#include "rc4.h" - -RCSID("$Id: rc4_enc.c,v 1.2 1999/10/21 12:58:43 joda Exp $"); - -/* RC4 as implemented from a posting from - * Newsgroups: sci.crypt - * From: sterndark@netcom.com (David Sterndark) - * Subject: RC4 Algorithm revealed. - * Message-ID: <sternCvKL4B.Hyy@netcom.com> - * Date: Wed, 14 Sep 1994 06:35:31 GMT - */ - -void RC4(RC4_KEY *key, unsigned long len, unsigned char *indata, - unsigned char *outdata) - { - register RC4_INT *d; - register RC4_INT x,y,tx,ty; - int i; - - x=key->x; - y=key->y; - d=key->data; - -#define LOOP(in,out) \ - x=((x+1)&0xff); \ - tx=d[x]; \ - y=(tx+y)&0xff; \ - d[x]=ty=d[y]; \ - d[y]=tx; \ - (out) = d[(tx+ty)&0xff]^ (in); - -#ifndef RC4_INDEX -#define RC4_LOOP(a,b,i) LOOP(*((a)++),*((b)++)) -#else -#define RC4_LOOP(a,b,i) LOOP(a[i],b[i]) -#endif - - i=(int)(len>>3L); - if (i) - { - for (;;) - { - RC4_LOOP(indata,outdata,0); - RC4_LOOP(indata,outdata,1); - RC4_LOOP(indata,outdata,2); - RC4_LOOP(indata,outdata,3); - RC4_LOOP(indata,outdata,4); - RC4_LOOP(indata,outdata,5); - RC4_LOOP(indata,outdata,6); - RC4_LOOP(indata,outdata,7); -#ifdef RC4_INDEX - indata+=8; - outdata+=8; -#endif - if (--i == 0) break; - } - } - i=(int)len&0x07; - if (i) - { - for (;;) - { - RC4_LOOP(indata,outdata,0); if (--i == 0) break; - RC4_LOOP(indata,outdata,1); if (--i == 0) break; - RC4_LOOP(indata,outdata,2); if (--i == 0) break; - RC4_LOOP(indata,outdata,3); if (--i == 0) break; - RC4_LOOP(indata,outdata,4); if (--i == 0) break; - RC4_LOOP(indata,outdata,5); if (--i == 0) break; - RC4_LOOP(indata,outdata,6); if (--i == 0) break; - } - } - key->x=x; - key->y=y; - } diff --git a/crypto/heimdal/lib/des/rc4_skey.c b/crypto/heimdal/lib/des/rc4_skey.c deleted file mode 100644 index f5bce46..0000000 --- a/crypto/heimdal/lib/des/rc4_skey.c +++ /dev/null @@ -1,101 +0,0 @@ -/* crypto/rc4/rc4_skey.c */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#include "des_locl.h" -#include "rc4.h" - -RCSID("$Id: rc4_skey.c,v 1.2 1999/10/21 12:58:52 joda Exp $"); - -/* RC4 as implemented from a posting from - * Newsgroups: sci.crypt - * From: sterndark@netcom.com (David Sterndark) - * Subject: RC4 Algorithm revealed. - * Message-ID: <sternCvKL4B.Hyy@netcom.com> - * Date: Wed, 14 Sep 1994 06:35:31 GMT - */ - -void RC4_set_key(RC4_KEY *key, int len, register unsigned char *data) - { - register RC4_INT tmp; - register int id1,id2; - register RC4_INT *d; - unsigned int i; - - d= &(key->data[0]); - for (i=0; i<256; i++) - d[i]=i; - key->x = 0; - key->y = 0; - id1=id2=0; - -#define SK_LOOP(n) { \ - tmp=d[(n)]; \ - id2 = (data[id1] + tmp + id2) & 0xff; \ - if (++id1 == len) id1=0; \ - d[(n)]=d[id2]; \ - d[id2]=tmp; } - - for (i=0; i < 256; i+=4) - { - SK_LOOP(i+0); - SK_LOOP(i+1); - SK_LOOP(i+2); - SK_LOOP(i+3); - } - } - diff --git a/crypto/heimdal/lib/des/rc4test.c b/crypto/heimdal/lib/des/rc4test.c deleted file mode 100644 index 5abf8cf..0000000 --- a/crypto/heimdal/lib/des/rc4test.c +++ /dev/null @@ -1,201 +0,0 @@ -/* crypto/rc4/rc4test.c */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#ifdef NO_RC4 -int main(int argc, char *argv[]) -{ - printf("No RC4 support\n"); - return(0); -} -#else -#include <openssl/rc4.h> - -unsigned char keys[7][30]={ - {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, - {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, - {8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, - {4,0xef,0x01,0x23,0x45}, - {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, - {4,0xef,0x01,0x23,0x45}, - }; - -unsigned char data_len[7]={8,8,8,20,28,10}; -unsigned char data[7][30]={ - {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xff}, - {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, - {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, - {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xff}, - {0x12,0x34,0x56,0x78,0x9A,0xBC,0xDE,0xF0, - 0x12,0x34,0x56,0x78,0x9A,0xBC,0xDE,0xF0, - 0x12,0x34,0x56,0x78,0x9A,0xBC,0xDE,0xF0, - 0x12,0x34,0x56,0x78,0xff}, - {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, - {0}, - }; - -unsigned char output[7][30]={ - {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96,0x00}, - {0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79,0x00}, - {0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a,0x00}, - {0xd6,0xa1,0x41,0xa7,0xec,0x3c,0x38,0xdf, - 0xbd,0x61,0x5a,0x11,0x62,0xe1,0xc7,0xba, - 0x36,0xb6,0x78,0x58,0x00}, - {0x66,0xa0,0x94,0x9f,0x8a,0xf7,0xd6,0x89, - 0x1f,0x7f,0x83,0x2b,0xa8,0x33,0xc0,0x0c, - 0x89,0x2e,0xbe,0x30,0x14,0x3c,0xe2,0x87, - 0x40,0x01,0x1e,0xcf,0x00}, - {0xd6,0xa1,0x41,0xa7,0xec,0x3c,0x38,0xdf,0xbd,0x61,0x00}, - {0}, - }; - -int main(int argc, char *argv[]) - { - int i,err=0; - int j; - unsigned char *p; - RC4_KEY key; - unsigned char buf[512],obuf[512]; - - for (i=0; i<512; i++) buf[i]=0x01; - - for (i=0; i<6; i++) - { - RC4_set_key(&key,keys[i][0],&(keys[i][1])); - memset(obuf,0x00,sizeof(obuf)); - RC4(&key,data_len[i],&(data[i][0]),obuf); - if (memcmp(obuf,output[i],data_len[i]+1) != 0) - { - printf("error calculating RC4\n"); - printf("output:"); - for (j=0; j<data_len[i]+1; j++) - printf(" %02x",obuf[j]); - printf("\n"); - printf("expect:"); - p= &(output[i][0]); - for (j=0; j<data_len[i]+1; j++) - printf(" %02x",*(p++)); - printf("\n"); - err++; - } - else - printf("test %d ok\n",i); - } - printf("test end processing "); - for (i=0; i<data_len[3]; i++) - { - RC4_set_key(&key,keys[3][0],&(keys[3][1])); - memset(obuf,0x00,sizeof(obuf)); - RC4(&key,i,&(data[3][0]),obuf); - if ((memcmp(obuf,output[3],i) != 0) || (obuf[i] != 0)) - { - printf("error in RC4 length processing\n"); - printf("output:"); - for (j=0; j<i+1; j++) - printf(" %02x",obuf[j]); - printf("\n"); - printf("expect:"); - p= &(output[3][0]); - for (j=0; j<i; j++) - printf(" %02x",*(p++)); - printf(" 00\n"); - err++; - } - else - { - printf("."); - fflush(stdout); - } - } - printf("done\n"); - printf("test multi-call "); - for (i=0; i<data_len[3]; i++) - { - RC4_set_key(&key,keys[3][0],&(keys[3][1])); - memset(obuf,0x00,sizeof(obuf)); - RC4(&key,i,&(data[3][0]),obuf); - RC4(&key,data_len[3]-i,&(data[3][i]),&(obuf[i])); - if (memcmp(obuf,output[3],data_len[3]+1) != 0) - { - printf("error in RC4 multi-call processing\n"); - printf("output:"); - for (j=0; j<data_len[3]+1; j++) - printf(" %02x",obuf[j]); - printf("\n"); - printf("expect:"); - p= &(output[3][0]); - for (j=0; j<data_len[3]+1; j++) - printf(" %02x",*(p++)); - err++; - } - else - { - printf("."); - fflush(stdout); - } - } - printf("done\n"); - exit(err); - return(0); - } -#endif diff --git a/crypto/heimdal/lib/hdb/hdb_locl.h b/crypto/heimdal/lib/hdb/hdb_locl.h index 921eabd..1fe5f8f 100644 --- a/crypto/heimdal/lib/hdb/hdb_locl.h +++ b/crypto/heimdal/lib/hdb/hdb_locl.h @@ -32,6 +32,7 @@ */ /* $Id: hdb_locl.h,v 1.17 2001/08/22 20:30:28 assar Exp $ */ +/* $FreeBSD$ */ #ifndef __HDB_LOCL_H__ #define __HDB_LOCL_H__ diff --git a/crypto/heimdal/lib/hdb/libasn1.h b/crypto/heimdal/lib/hdb/libasn1.h deleted file mode 100644 index ef02d7c..0000000 --- a/crypto/heimdal/lib/hdb/libasn1.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1997, 2001 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: libasn1.h,v 1.5 2001/04/18 16:21:33 joda Exp $ */ - -#ifndef __LIBASN1_H__ -#define __LIBASN1_H__ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <stdlib.h> -#include <errno.h> -#include <krb5_asn1.h> -#include <der.h> -#include "hdb_asn1.h" -#include <asn1_err.h> -#include <parse_units.h> - -#endif /* __LIBASN1_H__ */ diff --git a/crypto/heimdal/lib/kdfs/ChangeLog b/crypto/heimdal/lib/kdfs/ChangeLog deleted file mode 100644 index 44c5abf..0000000 --- a/crypto/heimdal/lib/kdfs/ChangeLog +++ /dev/null @@ -1,20 +0,0 @@ -2002-01-23 Assar Westerlund <assar@sics.se> - - * k5dfspag.c: use SIG_DFL and not SIG_IGN for SIGCHLD. - from "Todd C. Miller" <Todd.Miller@courtesan.com> - -2001-02-07 Assar Westerlund <assar@sics.se> - - * k5dfspag.c: add config.h - -2000-12-11 Assar Westerlund <assar@sics.se> - - * Makefile.am (libkdfs_la_LDFLAGS): set version to 0:1:0 - -2000-07-02 Assar Westerlund <assar@sics.se> - - * k5dfspag.c: use krb5.h instead of krb5_locl.h - - * initial import from Ake Sandgren <ake@cs.umu.se> - - diff --git a/crypto/heimdal/lib/kdfs/Makefile.am b/crypto/heimdal/lib/kdfs/Makefile.am deleted file mode 100644 index c51d55e..0000000 --- a/crypto/heimdal/lib/kdfs/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -# $Id: Makefile.am,v 1.2 2000/12/11 00:46:47 assar Exp $ - -include $(top_srcdir)/Makefile.am.common - -lib_LTLIBRARIES = libkdfs.la - -libkdfs_la_SOURCES = \ - k5dfspag.c - -libkdfs_la_LDFLAGS = -version-info 0:1:0 diff --git a/crypto/heimdal/lib/kdfs/Makefile.in b/crypto/heimdal/lib/kdfs/Makefile.in deleted file mode 100644 index cd096c4..0000000 --- a/crypto/heimdal/lib/kdfs/Makefile.in +++ /dev/null @@ -1,562 +0,0 @@ -# Makefile.in generated automatically by automake 1.5 from Makefile.am. - -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# $Id: Makefile.am,v 1.2 2000/12/11 00:46:47 assar Exp $ - - -# $Id: Makefile.am.common,v 1.3 1999/04/01 14:58:43 joda Exp $ - - -# $Id: Makefile.am.common,v 1.31 2001/09/01 11:12:18 assar Exp $ - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_HEADER = $(INSTALL_DATA) -transform = @program_transform_name@ -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AS = @AS@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -DBLIB = @DBLIB@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_des = @DIR_des@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -EXEEXT = @EXEEXT@ -EXTRA_LIB45 = @EXTRA_LIB45@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_ = @INCLUDE_@ -INCLUDE_des = @INCLUDE_des@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LEX = @LEX@ -LIBOBJS = @LIBOBJS@ -LIBTOOL = @LIBTOOL@ -LIB_ = @LIB_@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_des = @LIB_des@ -LIB_des_a = @LIB_des_a@ -LIB_des_appl = @LIB_des_appl@ -LIB_des_so = @LIB_des_so@ -LIB_kdb = @LIB_kdb@ -LIB_otp = @LIB_otp@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@ -NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -RANLIB = @RANLIB@ -VERSION = @VERSION@ -VOID_RETSIGTYPE = @VOID_RETSIGTYPE@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -am__include = @am__include@ -am__quote = @am__quote@ -dpagaix_CFLAGS = @dpagaix_CFLAGS@ -dpagaix_LDADD = @dpagaix_LDADD@ -install_sh = @install_sh@ - -AUTOMAKE_OPTIONS = foreign no-dependencies 1.4b - -SUFFIXES = .et .h .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .x - -INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) - -AM_CFLAGS = $(WFLAGS) - -CP = cp - -buildinclude = $(top_builddir)/include - -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_crypt = @LIB_crypt@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_openpty = @LIB_openpty@ -LIB_pidfile = @LIB_pidfile@ -LIB_res_search = @LIB_res_search@ -LIB_setpcred = @LIB_setpcred@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ - -LIBS = @LIBS@ - -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -LIB_hesiod = @LIB_hesiod@ - -INCLUDE_krb4 = @INCLUDE_krb4@ -LIB_krb4 = @LIB_krb4@ - -INCLUDE_openldap = @INCLUDE_openldap@ -LIB_openldap = @LIB_openldap@ - -INCLUDE_readline = @INCLUDE_readline@ -LIB_readline = @LIB_readline@ - -LEXLIB = @LEXLIB@ - -NROFF_MAN = groff -mandoc -Tascii - -@KRB4_TRUE@LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) - -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la - -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la - -CHECK_LOCAL = $(PROGRAMS) - -lib_LTLIBRARIES = libkdfs.la - -libkdfs_la_SOURCES = \ - k5dfspag.c - - -libkdfs_la_LDFLAGS = -version-info 0:1:0 -subdir = lib/kdfs -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(lib_LTLIBRARIES) - -libkdfs_la_LIBADD = -am_libkdfs_la_OBJECTS = k5dfspag.lo -libkdfs_la_OBJECTS = $(am_libkdfs_la_OBJECTS) - -DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -depcomp = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ - $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CFLAGS = @CFLAGS@ -DIST_SOURCES = $(libkdfs_la_SOURCES) -DIST_COMMON = ChangeLog Makefile.am Makefile.in -SOURCES = $(libkdfs_la_SOURCES) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .x .c .lo .o .obj - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/kdfs/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && \ - CONFIG_HEADERS= CONFIG_LINKS= \ - CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) -libkdfs.la: $(libkdfs_la_OBJECTS) $(libkdfs_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libkdfs_la_LDFLAGS) $(libkdfs_la_OBJECTS) $(libkdfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< - -.c.obj: - $(COMPILE) -c `cygpath -w $<` - -.c.lo: - $(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< -uninstall-info-am: - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) - -GTAGS: - here=`CDPATH=: && cd $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH - -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = ../.. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - $(mkinstalldirs) "$(distdir)/$$dir"; \ - fi; \ - if test -d $$d/$$file; then \ - cp -pR $$d/$$file $(distdir) \ - || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="${top_distdir}" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) all-local - -installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) - -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES - -.PHONY: GTAGS all all-am all-local check check-am check-local clean \ - clean-generic clean-libLTLIBRARIES clean-libtool distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-exec install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES - - -install-suid-programs: - @foo='$(bin_SUIDS)'; \ - for file in $$foo; do \ - x=$(DESTDIR)$(bindir)/$$file; \ - if chown 0:0 $$x && chmod u+s $$x; then :; else \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(build_HEADERZ) - @foo='$(include_HEADERS) $(build_HEADERZ)'; \ - for f in $$foo; do \ - f=`basename $$f`; \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - if cmp -s $$file $(buildinclude)/$$f 2> /dev/null ; then \ - : ; else \ - echo " $(CP) $$file $(buildinclude)/$$f"; \ - $(CP) $$file $(buildinclude)/$$f; \ - fi ; \ - done - -all-local: install-build-headers -#NROFF_MAN = nroff -man -.1.cat1: - $(NROFF_MAN) $< > $@ -.3.cat3: - $(NROFF_MAN) $< > $@ -.5.cat5: - $(NROFF_MAN) $< > $@ -.8.cat8: - $(NROFF_MAN) $< > $@ - -dist-cat1-mans: - @foo='$(man1_MANS)'; \ - bar='$(man_MANS)'; \ - for i in $$bar; do \ - case $$i in \ - *.1) foo="$$foo $$i";; \ - esac; done ;\ - for i in $$foo; do \ - x=`echo $$i | sed 's/\.[^.]*$$/.cat1/'`; \ - echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \ - $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \ - done - -dist-cat3-mans: - @foo='$(man3_MANS)'; \ - bar='$(man_MANS)'; \ - for i in $$bar; do \ - case $$i in \ - *.3) foo="$$foo $$i";; \ - esac; done ;\ - for i in $$foo; do \ - x=`echo $$i | sed 's/\.[^.]*$$/.cat3/'`; \ - echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \ - $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \ - done - -dist-cat5-mans: - @foo='$(man5_MANS)'; \ - bar='$(man_MANS)'; \ - for i in $$bar; do \ - case $$i in \ - *.5) foo="$$foo $$i";; \ - esac; done ;\ - for i in $$foo; do \ - x=`echo $$i | sed 's/\.[^.]*$$/.cat5/'`; \ - echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \ - $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \ - done - -dist-cat8-mans: - @foo='$(man8_MANS)'; \ - bar='$(man_MANS)'; \ - for i in $$bar; do \ - case $$i in \ - *.8) foo="$$foo $$i";; \ - esac; done ;\ - for i in $$foo; do \ - x=`echo $$i | sed 's/\.[^.]*$$/.cat8/'`; \ - echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \ - $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \ - done - -dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans - -install-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-local: install-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -check-local:: - @foo='$(CHECK_LOCAL)'; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if ./$$i --version > /dev/null 2>&1; then \ - echo "PASS: $$i"; \ - else \ - echo "FAIL: $$i"; \ - failed=`expr $$failed + 1`; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="$$failed of $$all tests failed"; \ - fi; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - fi -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/crypto/heimdal/lib/kdfs/k5dfspag.c b/crypto/heimdal/lib/kdfs/k5dfspag.c deleted file mode 100644 index 97f66cd..0000000 --- a/crypto/heimdal/lib/kdfs/k5dfspag.c +++ /dev/null @@ -1,368 +0,0 @@ -/* - * lib/krb5/os/k5dfspag.c - * - * New Kerberos module to issue the DFS PAG syscalls. - * It also contains the routine to fork and exec the - * k5dcecon routine to do most of the work. - * - * This file is designed to be as independent of DCE - * and DFS as possible. The only dependencies are on - * the syscall numbers. If DFS not running or not installed, - * the sig handlers will catch and the signal and - * will continue. - * - * krb5_dfs_newpag and krb5_dfs_getpag should not be real - * Kerberos routines, since they should be setpag and getpag - * in the DCE library, but without the DCE baggage. - * Thus they don't have context, and don't return a krb5 error. - * - * - * - * krb5_dfs_pag() - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -RCSID("$Id: k5dfspag.c,v 1.5 2002/01/23 01:49:34 assar Exp $"); - -#include <krb5.h> - -#ifdef DCE - -#include <stdio.h> -#include <sys/stat.h> -#include <sys/wait.h> -#include <fcntl.h> -#include <sys/param.h> - -/* Only run this DFS PAG code on systems with POSIX - * All that we are interested in dor:, AIX 4.x, - * Solaris 2.5.x, HPUX 10.x Even SunOS 4.1.4, AIX 3.2.5 - * and SGI 5.3 are OK. This simplifies - * the build/configure which I don't want to change now. - * All of them also have waitpid as well. - */ - -#define POSIX_SETJMP -#define POSIX_SIGNALS -#define HAVE_WAITPID - -#include <signal.h> -#include <setjmp.h> -#ifndef POSIX_SETJMP -#undef sigjmp_buf -#undef sigsetjmp -#undef siglongjmp -#define sigjmp_buf jmp_buf -#define sigsetjmp(j,s) setjmp(j) -#define siglongjmp longjmp -#endif - -#ifdef POSIX_SIGNALS -typedef struct sigaction handler; -#define handler_init(H,F) (sigemptyset(&(H).sa_mask), \ - (H).sa_flags=0, \ - (H).sa_handler=(F)) -#define handler_swap(S,NEW,OLD) sigaction(S, &NEW, &OLD) -#define handler_set(S,OLD) sigaction(S, &OLD, NULL) -#else -typedef sigtype (*handler)(); -#define handler_init(H,F) ((H) = (F)) -#define handler_swap(S,NEW,OLD) ((OLD) = signal ((S), (NEW))) -#define handler_set(S,OLD) (signal ((S), (OLD))) -#endif - -#define krb5_sigtype void -#define WAIT_USES_INT -typedef krb5_sigtype sigtype; - - -/* - * Need some syscall numbers based on different systems. - * These are based on: - * HPUX 10.10 /opt/dce/include/dcedfs/syscall.h - * Solaris 2.5 /opt/dcelocal/share/include/dcedfs/syscall.h - * AIX 4.2 - needs some funny games with load and kafs_syscall - * to get the kernel extentions. There should be a better way! - * - * DEE 5/27/97 - * - */ - - -#define AFSCALL_SETPAG 2 -#define AFSCALL_GETPAG 11 - -#if defined(sun) -#define AFS_SYSCALL 72 - -#elif defined(hpux) -/* assume HPUX 10 + or is it 50 */ -#define AFS_SYSCALL 326 - -#elif defined(_AIX) -#ifndef DPAGAIX -#define DPAGAIX LIBEXECDIR ## "/dpagaix" -#endif -int *load(); -static int (*dpagaix)(int, int, int, int, int, int) = 0; - -#elif defined(sgi) || defined(_sgi) -#define AFS_SYSCALL 206+1000 - -#else -#define AFS_SYSCALL (Unknown_DFS_AFS_SYSCALL) -#endif - - -#ifdef WAIT_USES_INT - int wait_status; -#else /* WAIT_USES_INT */ - union wait wait_status; -#endif /* WAIT_USES_INT */ - -#ifndef K5DCECON -#define K5DCECON LIBEXECDIR ## "/k5dcecon" -#endif - -/* - * mysig() - * - * signal handler if DFS not running - * - */ - -static sigjmp_buf setpag_buf; - -static sigtype mysig() -{ - siglongjmp(setpag_buf, 1); -} - -/* - * krb5_dfs_pag_syscall() - * - * wrapper for the syscall with signal handlers - * - */ - -static int krb5_dfs_pag_syscall(opt1,opt2) - int opt1; - int opt2; -{ - handler sa1, osa1; - handler sa2, osa2; - int pag = -2; - - handler_init (sa1, mysig); - handler_init (sa2, mysig); - handler_swap (SIGSYS, sa1, osa1); - handler_swap (SIGSEGV, sa2, osa2); - - if (sigsetjmp(setpag_buf, 1) == 0) { - -#if defined(_AIX) - if (!dpagaix) - dpagaix = load(DPAGAIX, 0, 0); - if (dpagaix) - pag = (*dpagaix)(opt1, opt2, 0, 0, 0, 0); -#else - pag = syscall(AFS_SYSCALL, opt1, opt2, 0, 0, 0, 0); -#endif - - handler_set (SIGSYS, osa1); - handler_set (SIGSEGV, osa2); - return(pag); - } - - /* syscall failed! return 0 */ - handler_set (SIGSYS, osa1); - handler_set (SIGSEGV, osa2); - return(-2); -} - -/* - * krb5_dfs_newpag() - * - * issue a DCE/DFS setpag system call to set the newpag - * for this process. This takes advantage of a currently - * undocumented feature of the Transarc port of DFS. - * Even in DCE 1.2.2 for which the source is available, - * (but no vendors have released), this feature is not - * there, but it should be, or could be added. - * If new_pag is zero, then the syscall will get a new pag - * and return its value. - */ - -int krb5_dfs_newpag(new_pag) - int new_pag; -{ - return(krb5_dfs_pag_syscall(AFSCALL_SETPAG, new_pag)); -} - -/* - * krb5_dfs_getpag() - * - * get the current PAG. Used mostly as a test. - */ - -int krb5_dfs_getpag() -{ - return(krb5_dfs_pag_syscall(AFSCALL_GETPAG, 0)); -} - -/* - * krb5_dfs_pag() - * - * Given a principal and local username, - * fork and exec the k5dcecon module to create - * refresh or join a new DCE/DFS - * Process Authentication Group (PAG) - * - * This routine should be called after krb5_kuserok has - * determined that this combination of local user and - * principal are acceptable for the local host. - * - * It should also be called after a forwarded ticket has - * been received, and the KRB5CCNAME environment variable - * has been set to point at it. k5dcecon will convert this - * to a new DCE context and a new pag and replace KRB5CCNAME - * in the environment. - * - * If there is no forwarded ticket, k5dcecon will attempt - * to join an existing PAG for the same principal and local - * user. - * - * And it should be called before access to the home directory - * as this may be in DFS, not accessable by root, and require - * the PAG to have been setup. - * - * The krb5_afs_pag can be called after this routine to - * use the the cache obtained by k5dcecon to get an AFS token. - * DEE - 7/97 - */ - -int krb5_dfs_pag(context, flag, principal, luser) - krb5_context context; - int flag; /* 1 if a forwarded TGT is to be used */ - krb5_principal principal; - const char *luser; - -{ - - struct stat stx; - int fd[2]; - int i,j; - int pid; - int new_pag; - int pag; - char newccname[MAXPATHLEN] = ""; - char *princ; - int err; - struct sigaction newsig, oldsig; - -#ifdef WAIT_USES_INT - int wait_status; -#else /* WAIT_USES_INT */ - union wait wait_status; -#endif /* WAIT_USES_INT */ - - if (krb5_unparse_name(context, principal, &princ)) - return(0); - - /* test if DFS is running or installed */ - if (krb5_dfs_getpag() == -2) - return(0); /* DFS not running, dont try */ - - if (pipe(fd) == -1) - return(0); - - /* Make sure that telnetd.c's SIGCHLD action don't happen right now... */ - memset((char *)&newsig, 0, sizeof(newsig)); - newsig.sa_handler = SIG_DFL; - sigaction(SIGCHLD, &newsig, &oldsig); - - pid = fork(); - if (pid <0) - return(0); - - if (pid == 0) { /* child process */ - - close(1); /* close stdout */ - dup(fd[1]); /* point stdout at pipe here */ - close(fd[0]); /* don't use end of pipe here */ - close(fd[1]); /* pipe now as stdout */ - - execl(K5DCECON, "k5dcecon", - (flag) ? "-f" : "-s" , - "-l", luser, - "-p", princ, (char *)0); - - exit(127); /* incase execl fails */ - } - - /* parent, wait for child to finish */ - - close(fd[1]); /* dont need this end of pipe */ - -/* #if defined(sgi) || defined(_sgi) */ - /* wait_status.w_status = 0; */ - /* waitpid((pid_t) pid, &wait_status.w_status, 0); */ -/* #else */ - - - wait_status = 0; -#ifdef HAVE_WAITPID - err = waitpid((pid_t) pid, &wait_status, 0); -#else /* HAVE_WAITPID */ - err = wait4(pid, &wait_status, 0, (struct rusage *) NULL); -#endif /* HAVE_WAITPID */ -/* #endif */ - - sigaction(SIGCHLD, &oldsig, 0); - if (WIFEXITED(wait_status)){ - if (WEXITSTATUS(wait_status) == 0) { - i = 1; - j = 0; - while (i != 0) { - i = read(fd[0], &newccname[j], sizeof(newccname)-1-j); - if ( i > 0) - j += i; - if (j >= sizeof(newccname)-1) - i = 0; - } - close(fd[0]); - if (j > 0) { - newccname[j] = '\0'; - esetenv("KRB5CCNAME",newccname,1); - sscanf(&newccname[j-8],"%8x",&new_pag); - if (new_pag && strncmp("FILE:/opt/dcelocal/var/security/creds/dcecred_", newccname, 46) == 0) { - if((pag = krb5_dfs_newpag(new_pag)) != -2) { - return(pag); - } - } - } - } - } - return(0); /* something not right */ -} - -#else /* DCE */ - -/* - * krb5_dfs_pag - dummy version for the lib for systems - * which don't have DFS, or the needed setpag kernel code. - */ - -krb5_boolean -krb5_dfs_pag(context, principal, luser) - krb5_context context; - krb5_principal principal; - const char *luser; -{ - return(0); -} - -#endif /* DCE */ diff --git a/crypto/heimdal/lib/krb5/address.c b/crypto/heimdal/lib/krb5/address.c deleted file mode 100644 index 5dc756a..0000000 --- a/crypto/heimdal/lib/krb5/address.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "krb5_locl.h" - -RCSID("$Id: address.c,v 1.15 2001/05/14 06:14:44 assar Exp $"); - -#if 0 -/* This is the supposedly MIT-api version */ - -krb5_boolean -krb5_address_search(krb5_context context, - const krb5_address *addr, - krb5_address *const *addrlist) -{ - krb5_address *a; - - while((a = *addrlist++)) - if (krb5_address_compare (context, addr, a)) - return TRUE; - return FALSE; -} -#endif - -krb5_boolean -krb5_address_search(krb5_context context, - const krb5_address *addr, - const krb5_addresses *addrlist) -{ - int i; - - for (i = 0; i < addrlist->len; ++i) - if (krb5_address_compare (context, addr, &addrlist->val[i])) - return TRUE; - return FALSE; -} - -int -krb5_address_order(krb5_context context, - const krb5_address *addr1, - const krb5_address *addr2) -{ - return (addr1->addr_type - addr2->addr_type) - || memcmp (addr1->address.data, - addr2->address.data, - addr1->address.length); -} - -krb5_boolean -krb5_address_compare(krb5_context context, - const krb5_address *addr1, - const krb5_address *addr2) -{ - return krb5_address_order (context, addr1, addr2) == 0; -} - -krb5_error_code -krb5_copy_address(krb5_context context, - const krb5_address *inaddr, - krb5_address *outaddr) -{ - copy_HostAddress(inaddr, outaddr); - return 0; -} - -krb5_error_code -krb5_copy_addresses(krb5_context context, - const krb5_addresses *inaddr, - krb5_addresses *outaddr) -{ - copy_HostAddresses(inaddr, outaddr); - return 0; -} - -krb5_error_code -krb5_free_address(krb5_context context, - krb5_address *address) -{ - krb5_data_free (&address->address); - return 0; -} - -krb5_error_code -krb5_free_addresses(krb5_context context, - krb5_addresses *addresses) -{ - free_HostAddresses(addresses); - return 0; -} - -krb5_error_code -krb5_append_addresses(krb5_context context, - krb5_addresses *dest, - const krb5_addresses *source) -{ - krb5_address *tmp; - krb5_error_code ret; - int i; - if(source->len > 0) { - tmp = realloc(dest->val, (dest->len + source->len) * sizeof(*tmp)); - if(tmp == NULL) { - krb5_set_error_string(context, "realloc: out of memory"); - return ENOMEM; - } - dest->val = tmp; - for(i = 0; i < source->len; i++) { - /* skip duplicates */ - if(krb5_address_search(context, &source->val[i], dest)) - continue; - ret = krb5_copy_address(context, - &source->val[i], - &dest->val[dest->len]); - if(ret) - return ret; - dest->len++; - } - } - return 0; -} - -/* - * Create an address of type KRB5_ADDRESS_ADDRPORT from (addr, port) - */ - -krb5_error_code -krb5_make_addrport (krb5_context context, - krb5_address **res, const krb5_address *addr, int16_t port) -{ - krb5_error_code ret; - size_t len = addr->address.length + 2 + 4 * 4; - u_char *p; - - *res = malloc (sizeof(**res)); - if (*res == NULL) { - krb5_set_error_string(context, "malloc: out of memory"); - return ENOMEM; - } - (*res)->addr_type = KRB5_ADDRESS_ADDRPORT; - ret = krb5_data_alloc (&(*res)->address, len); - if (ret) { - krb5_set_error_string(context, "malloc: out of memory"); - free (*res); - return ret; - } - p = (*res)->address.data; - *p++ = 0; - *p++ = 0; - *p++ = (addr->addr_type ) & 0xFF; - *p++ = (addr->addr_type >> 8) & 0xFF; - - *p++ = (addr->address.length ) & 0xFF; - *p++ = (addr->address.length >> 8) & 0xFF; - *p++ = (addr->address.length >> 16) & 0xFF; - *p++ = (addr->address.length >> 24) & 0xFF; - - memcpy (p, addr->address.data, addr->address.length); - p += addr->address.length; - - *p++ = 0; - *p++ = 0; - *p++ = (KRB5_ADDRESS_IPPORT ) & 0xFF; - *p++ = (KRB5_ADDRESS_IPPORT >> 8) & 0xFF; - - *p++ = (2 ) & 0xFF; - *p++ = (2 >> 8) & 0xFF; - *p++ = (2 >> 16) & 0xFF; - *p++ = (2 >> 24) & 0xFF; - - memcpy (p, &port, 2); - p += 2; - - return 0; -} diff --git a/crypto/heimdal/lib/krb5/crypto.c b/crypto/heimdal/lib/krb5/crypto.c index db9e810..cf307e7 100644 --- a/crypto/heimdal/lib/krb5/crypto.c +++ b/crypto/heimdal/lib/krb5/crypto.c @@ -32,7 +32,8 @@ */ #include "krb5_locl.h" -RCSID("$Id: crypto.c,v 1.64 2002/04/29 16:31:54 joda Exp $"); +RCSID("$Id: crypto.c,v 1.60 2002/01/06 23:12:51 assar Exp $"); +/* RCSID("$FreeBSD$"); */ #undef CRYPTO_DEBUG #ifdef CRYPTO_DEBUG @@ -139,7 +140,7 @@ static struct key_data *_new_derived_key(krb5_crypto crypto, unsigned usage); ************************************************************/ static void -krb5_DES_random_key(krb5_context context, +DES_random_key(krb5_context context, krb5_keyblock *key) { des_cblock *k = key->keyvalue.data; @@ -150,7 +151,7 @@ krb5_DES_random_key(krb5_context context, } static void -krb5_DES_schedule(krb5_context context, +DES_schedule(krb5_context context, struct key_data *key) { des_set_key(key->key->keyvalue.data, key->schedule->data); @@ -188,7 +189,7 @@ DES_string_to_key_int(unsigned char *data, size_t length, des_cblock *key) } static krb5_error_code -krb5_DES_string_to_key(krb5_context context, +DES_string_to_key(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, @@ -225,7 +226,7 @@ krb5_DES_string_to_key(krb5_context context, * Short passwords, i.e 8 characters or less. */ static void -krb5_DES_AFS3_CMU_string_to_key (krb5_data pw, +DES_AFS3_CMU_string_to_key (krb5_data pw, krb5_data cell, des_cblock *key) { @@ -254,7 +255,7 @@ krb5_DES_AFS3_CMU_string_to_key (krb5_data pw, * Long passwords, i.e 9 characters or more. */ static void -krb5_DES_AFS3_Transarc_string_to_key (krb5_data pw, +DES_AFS3_Transarc_string_to_key (krb5_data pw, krb5_data cell, des_cblock *key) { @@ -301,9 +302,9 @@ DES_AFS3_string_to_key(krb5_context context, { des_cblock tmp; if(password.length > 8) - krb5_DES_AFS3_Transarc_string_to_key(password, salt.saltvalue, &tmp); + DES_AFS3_Transarc_string_to_key(password, salt.saltvalue, &tmp); else - krb5_DES_AFS3_CMU_string_to_key(password, salt.saltvalue, &tmp); + DES_AFS3_CMU_string_to_key(password, salt.saltvalue, &tmp); key->keytype = enctype; krb5_data_copy(&key->keyvalue, tmp, sizeof(tmp)); memset(&key, 0, sizeof(key)); @@ -385,7 +386,7 @@ DES3_string_to_key(krb5_context context, memcpy(keys + i, tmp + i * 8, sizeof(keys[i])); des_set_odd_parity(keys + i); if(des_is_weak_key(keys + i)) - xor(keys + i, (const unsigned char*)"\0\0\0\0\0\0\0\xf0"); + xor(keys + i, (unsigned char*)"\0\0\0\0\0\0\0\xf0"); des_set_key(keys + i, s[i]); } memset(&ivec, 0, sizeof(ivec)); @@ -398,7 +399,7 @@ DES3_string_to_key(krb5_context context, memcpy(keys + i, tmp + i * 8, sizeof(keys[i])); des_set_odd_parity(keys + i); if(des_is_weak_key(keys + i)) - xor(keys + i, (const unsigned char*)"\0\0\0\0\0\0\0\xf0"); + xor(keys + i, (unsigned char*)"\0\0\0\0\0\0\0\xf0"); } memset(tmp, 0, sizeof(tmp)); } @@ -508,8 +509,8 @@ struct key_type keytype_des = { 56, sizeof(des_cblock), sizeof(des_key_schedule), - krb5_DES_random_key, - krb5_DES_schedule, + DES_random_key, + DES_schedule, des_salt }; @@ -571,7 +572,7 @@ struct salt_type des_salt[] = { { KRB5_PW_SALT, "pw-salt", - krb5_DES_string_to_key + DES_string_to_key }, { KRB5_AFS3_SALT, @@ -1867,35 +1868,29 @@ ARCFOUR_subdecrypt(krb5_context context, * draft-brezak-win2k-krb-rc4-hmac-03.txt */ -static krb5_error_code -usage2arcfour (krb5_context context, int *usage) +static int +usage2arcfour (int usage) { - switch (*usage) { + switch (usage) { case KRB5_KU_PA_ENC_TIMESTAMP : - *usage = 1; - return 0; + return 1; case KRB5_KU_TICKET : - *usage = 8; + return 8; case KRB5_KU_AS_REP_ENC_PART : - *usage = 8; - return 0; + return 8; case KRB5_KU_TGS_REQ_AUTH_DAT_SESSION : case KRB5_KU_TGS_REQ_AUTH_DAT_SUBKEY : case KRB5_KU_TGS_REQ_AUTH_CKSUM : case KRB5_KU_TGS_REQ_AUTH : - *usage = 7; - return 0; + return 7; case KRB5_KU_TGS_REP_ENC_PART_SESSION : case KRB5_KU_TGS_REP_ENC_PART_SUB_KEY : - *usage = 8; - return 0; + return 8; case KRB5_KU_AP_REQ_AUTH_CKSUM : case KRB5_KU_AP_REQ_AUTH : case KRB5_KU_AP_REQ_ENC_PART : - *usage = 11; - return 0; + return 11; case KRB5_KU_KRB_PRIV : - *usage = 0; return 0; case KRB5_KU_KRB_CRED : case KRB5_KU_KRB_SAFE_CKSUM : @@ -1909,8 +1904,7 @@ usage2arcfour (krb5_context context, int *usage) case KRB5_KU_USAGE_SIGN : case KRB5_KU_USAGE_SEQ : default : - krb5_set_error_string(context, "unknown arcfour usage type %d", *usage); - return KRB5_PROG_ETYPE_NOSUPP; + abort (); } } @@ -1923,9 +1917,7 @@ ARCFOUR_encrypt(krb5_context context, int usage, void *ivec) { - krb5_error_code ret; - if((ret = usage2arcfour (context, &usage)) != 0) - return ret; + usage = usage2arcfour (usage); if (encrypt) return ARCFOUR_subencrypt (context, key, data, len, usage, ivec); @@ -3010,11 +3002,6 @@ krb5_crypto_init(krb5_context context, etype); return KRB5_PROG_ETYPE_NOSUPP; } - if((*crypto)->et->keytype->size != key->keyvalue.length) { - free(*crypto); - krb5_set_error_string (context, "encryption key has bad length"); - return KRB5_BAD_KEYSIZE; - } ret = krb5_copy_keyblock(context, key, &(*crypto)->key.key); if(ret) { free(*crypto); diff --git a/crypto/heimdal/lib/krb5/krb5_locl.h b/crypto/heimdal/lib/krb5/krb5_locl.h index fceeaed..793b7f1 100644 --- a/crypto/heimdal/lib/krb5/krb5_locl.h +++ b/crypto/heimdal/lib/krb5/krb5_locl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2002 Kungliga Tekniska Högskolan + * Copyright (c) 1997-2001 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -31,7 +31,8 @@ * SUCH DAMAGE. */ -/* $Id: krb5_locl.h,v 1.69 2002/08/12 15:09:19 joda Exp $ */ +/* $Id: krb5_locl.h,v 1.67 2001/08/22 20:30:30 assar Exp $ */ +/* $FreeBSD$ */ #ifndef __KRB5_LOCL_H__ #define __KRB5_LOCL_H__ @@ -105,9 +106,6 @@ struct sockaddr_dl; #ifdef HAVE_SYS_FILIO_H #include <sys/filio.h> #endif -#ifdef HAVE_SYS_FILE_H -#include <sys/file.h> -#endif #include <roken.h> #include <parse_time.h> #include <base64.h> @@ -138,8 +136,8 @@ struct sockaddr_dl; #define ALLOC_SEQ(X, N) do { (X)->len = (N); ALLOC((X)->val, (N)); } while(0) /* should this be public? */ -#define KEYTAB_DEFAULT "ANY:FILE:" SYSCONFDIR "/krb5.keytab,krb4:" SYSCONFDIR "/srvtab" -#define KEYTAB_DEFAULT_MODIFY "FILE:" SYSCONFDIR "/krb5.keytab" +#define KEYTAB_DEFAULT "ANY:FILE:/etc/krb5.keytab,krb4:/etc/srvtab" +#define KEYTAB_DEFAULT_MODIFY "FILE:/etc/krb5.keytab" #ifndef O_BINARY #define O_BINARY 0 diff --git a/crypto/heimdal/lib/roken/make-print-version.c b/crypto/heimdal/lib/roken/make-print-version.c index b29cf31..d7c8cf9 100644 --- a/crypto/heimdal/lib/roken/make-print-version.c +++ b/crypto/heimdal/lib/roken/make-print-version.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifdef HAVE_CONFIG_H @@ -42,7 +44,7 @@ RCSID("$Id: make-print-version.c,v 1.3 2000/08/16 11:30:04 assar Exp $"); extern const char *heimdal_version; #endif #ifdef KRB4 -extern char *krb4_version; +extern const char *krb4_version; #endif #include <version.h> |