From: Richard Basch Date: Fri, 29 Mar 1996 01:33:59 +0000 (+0000) Subject: Added support for des3-cbc-raw (gssapi) and rsa-md5-des3 X-Git-Tag: krb5-1.0-beta6~275 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=117b2ad04d3d5a67b0d7d160d0746c25901bb025;p=krb5.git Added support for des3-cbc-raw (gssapi) and rsa-md5-des3 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7736 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 18eae6437..e5c5ef98b 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,16 @@ +Thu Mar 28 09:49:08 1996 Richard Basch + + * cryptoconf.c: Added support for CKSUMTYPE_RSA_MD5_DES3 and + ENCTYPE_DES3_CBC_RAW + + * des3_md5.c: Abstraction correction: use sizeof(mit_des3_cblock) + + * configure.in: + Cosmetic renaming of des-cbc-raw configuration vars. + Added support for des3-cbc-raw. + + * des3_raw.c: New file (support ENCTYPE_DES3_CBC_RAW) + Mon Mar 11 10:59:40 1996 Ezra Peisach * des_crc.c (mit_des_crc_decrypt_func): Add const to pointer diff --git a/src/lib/crypto/configure.in b/src/lib/crypto/configure.in index 8718d5168..230544afa 100644 --- a/src/lib/crypto/configure.in +++ b/src/lib/crypto/configure.in @@ -41,16 +41,27 @@ if test "$enableval" = yes; then else AC_MSG_RESULT(Disabling DES_CBC_CRC) fi -AC_ARG_WITH([raw-des-cbc], -[ --enable-raw-des-cbc enable RAW_DES_CBC (DEFAULT). - --disable-raw-des-cbc disable RAW_DES_CBC.], +AC_ARG_WITH([des-cbc-raw], +[ --enable-des-cbc-raw enable DES_CBC_RAW (DEFAULT). + --disable-des-cbc-raw disable DES_CBC_RAW.], , enableval=yes)dnl if test "$enableval" = yes; then - AC_MSG_RESULT(Enabling RAW_DES_CBC) - AC_DEFINE(PROVIDE_RAW_DES_CBC) + AC_MSG_RESULT(Enabling DES_CBC_RAW) + AC_DEFINE(PROVIDE_DES_CBC_RAW) else - AC_MSG_RESULT(Disabling RAW_DES_CBC) + AC_MSG_RESULT(Disabling DES_CBC_RAW) +fi +AC_ARG_WITH([des3-cbc-raw], +[ --enable-des3-cbc-raw enable DES3_CBC_RAW (DEFAULT). + --disable-des3-cbc-raw disable DES3_CBC_RAW.], +, +enableval=yes)dnl +if test "$enableval" = yes; then + AC_MSG_RESULT(Enabling DES3_CBC_RAW) + AC_DEFINE(PROVIDE_DES3_CBC_RAW) +else + AC_MSG_RESULT(Disabling DES3_CBC_RAW) fi AC_ARG_WITH([des-cbc-cksum], [ --enable-des-cbc-cksum enable DES_CBC_CKSUM (DEFAULT). diff --git a/src/lib/crypto/cryptoconf.c b/src/lib/crypto/cryptoconf.c index 43afce884..44ac732ed 100644 --- a/src/lib/crypto/cryptoconf.c +++ b/src/lib/crypto/cryptoconf.c @@ -46,9 +46,11 @@ #include "rsa-md5.h" #define MD5_CKENTRY &rsa_md5_cksumtable_entry #define MD5_DES_CKENTRY &rsa_md5_des_cksumtable_entry +#define MD5_DES3_CKENTRY MD5_DES_CKENTRY #else #define MD5_CKENTRY 0 #define MD5_DES_CKENTRY 0 +#define MD5_DES3_CKENTRY 0 #endif #ifdef PROVIDE_SNEFRU @@ -85,14 +87,14 @@ #define DES_CBC_MD5_CSENTRY 0 #endif -#ifdef PROVIDE_RAW_DES_CBC +#ifdef PROVIDE_DES_CBC_RAW #ifndef _DES_DONE__ #include "des_int.h" #define _DES_DONE__ #endif -#define RAW_DES_CBC_CSENTRY &krb5_raw_des_cst_entry +#define DES_CBC_RAW_CSENTRY &krb5_raw_des_cst_entry #else -#define RAW_DES_CBC_CSENTRY 0 +#define DES_CBC_RAW_CSENTRY 0 #endif #ifdef PROVIDE_DES3_CBC_MD5 @@ -105,6 +107,16 @@ #define DES3_CBC_MD5_CSENTRY 0 #endif +#ifdef PROVIDE_DES3_CBC_RAW +#ifndef _DES_DONE__ +#include "des_int.h" +#define _DES_DONE__ +#endif +#define DES3_CBC_RAW_CSENTRY &krb5_des3_raw_cst_entry +#else +#define DES3_CBC_RAW_CSENTRY 0 +#endif + /* WARNING: make sure the order of entries in these tables matches the #defines in @@ -116,8 +128,9 @@ krb5_cs_table_entry * NEAR krb5_enctype_array[] = { DES_CBC_CRC_CSENTRY, /* ENCTYPE_DES_CBC_CRC */ 0, /* ENCTYPE_DES_CBC_MD4 */ DES_CBC_MD5_CSENTRY, /* ENCTYPE_DES_CBC_MD5 */ - RAW_DES_CBC_CSENTRY, /* ETYPE_RAW_DES_CBC */ + DES_CBC_RAW_CSENTRY, /* ENCTYPE_DES_CBC_RAW */ DES3_CBC_MD5_CSENTRY, /* ENCTYPE_DES3_CBC_MD5 */ + DES3_CBC_RAW_CSENTRY /* ENCTYPE_DES3_CBC_RAW */ }; krb5_enctype krb5_max_enctype = sizeof(krb5_enctype_array)/sizeof(krb5_enctype_array[0]) - 1; @@ -131,7 +144,8 @@ krb5_checksum_entry * NEAR krb5_cksumarray[] = { 0, /* des-mac */ 0, /* des-mac-k */ MD5_CKENTRY, /* CKSUMTYPE_RSA_MD5 */ - MD5_DES_CKENTRY /* CKSUMTYPE_RSA_MD5_DES */ + MD5_DES_CKENTRY, /* CKSUMTYPE_RSA_MD5_DES */ + MD5_DES3_CKENTRY /* CKSUMTYPE_RSA_MD5_DES3 */ }; krb5_cksumtype krb5_max_cksum = sizeof(krb5_cksumarray)/sizeof(krb5_cksumarray[0]);