diff options
| author | Greg Hudson <ghudson@mit.edu> | 2011-03-02 05:29:29 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2011-03-02 05:29:29 +0000 |
| commit | ce6d249fdf1dd7dda5b202836ed387500324ae2a (patch) | |
| tree | b0550b898743ddfdff76ac6647fca7a12d6db284 /src/lib/crypto/openssl/md4 | |
| parent | e2d6d9ce23b878334d70a0f9c697064873619b75 (diff) | |
| download | krb5-ce6d249fdf1dd7dda5b202836ed387500324ae2a.tar.gz krb5-ce6d249fdf1dd7dda5b202836ed387500324ae2a.tar.xz krb5-ce6d249fdf1dd7dda5b202836ed387500324ae2a.zip | |
Consolidate almost all lib/crypto/krb headers into a single
crypto_int.h. In that header, define and document responsibilities
for crypto modules, some of which are satisfied through a
module-specific crypto_mod.h. In the OpenSSL and NSS modules, remove
many of the headers and sources providing functionality which isn't
needed by lib/crypto/krb any more (direct interfaces to MD4, MD5, and
SHA-1 hashing, as well as DES weak key testing). Change most
Makefile.ins to only include headers from lib/crypto/krb and
lib/crypto/$(CRYPTO_IMPL), instead of from many different directories.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24677 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto/openssl/md4')
| -rw-r--r-- | src/lib/crypto/openssl/md4/Makefile.in | 11 | ||||
| -rw-r--r-- | src/lib/crypto/openssl/md4/deps | 15 | ||||
| -rw-r--r-- | src/lib/crypto/openssl/md4/md4.c | 51 | ||||
| -rw-r--r-- | src/lib/crypto/openssl/md4/rsa-md4.h | 100 |
4 files changed, 5 insertions, 172 deletions
diff --git a/src/lib/crypto/openssl/md4/Makefile.in b/src/lib/crypto/openssl/md4/Makefile.in index 550d7df60..0b9569000 100644 --- a/src/lib/crypto/openssl/md4/Makefile.in +++ b/src/lib/crypto/openssl/md4/Makefile.in @@ -1,16 +1,13 @@ mydir=lib$(S)crypto$(S)openssl$(S)md4 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. -LOCALINCLUDES = -I$(srcdir) +LOCALINCLUDES = DEFS= -PROG_LIBPATH=-L$(TOPLIBD) -PROG_RPATH=$(KRB5_LIBDIR) +STLIBOBJS= -STLIBOBJS= md4.o +OBJS= -OBJS= $(OUTPRE)md4.$(OBJEXT) - -SRCS= $(srcdir)/md4.c +SRCS= all-unix:: all-libobjs diff --git a/src/lib/crypto/openssl/md4/deps b/src/lib/crypto/openssl/md4/deps index b7e9615e4..2feac3c9d 100644 --- a/src/lib/crypto/openssl/md4/deps +++ b/src/lib/crypto/openssl/md4/deps @@ -1,14 +1 @@ -# -# Generated makefile dependencies follow. -# -md4.so md4.po $(OUTPRE)md4.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ - $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \ - $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(top_srcdir)/include/k5-buf.h \ - $(top_srcdir)/include/k5-err.h $(top_srcdir)/include/k5-gmt_mktime.h \ - $(top_srcdir)/include/k5-int-pkinit.h $(top_srcdir)/include/k5-int.h \ - $(top_srcdir)/include/k5-platform.h $(top_srcdir)/include/k5-plugin.h \ - $(top_srcdir)/include/k5-thread.h $(top_srcdir)/include/k5-trace.h \ - $(top_srcdir)/include/krb5.h $(top_srcdir)/include/krb5/authdata_plugin.h \ - $(top_srcdir)/include/krb5/plugin.h $(top_srcdir)/include/krb5/preauth_plugin.h \ - $(top_srcdir)/include/port-sockets.h $(top_srcdir)/include/socket-utils.h \ - md4.c rsa-md4.h +# No dependencies here. diff --git a/src/lib/crypto/openssl/md4/md4.c b/src/lib/crypto/openssl/md4/md4.c deleted file mode 100644 index 8d2cd48a2..000000000 --- a/src/lib/crypto/openssl/md4/md4.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* - * lib/crypto/openssl/md4/md4.c - * - * Copyright (C) 2009 by the Massachusetts Institute of Technology. - * All rights reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Furthermore if you modify this software you must label - * your software as modified software and not distribute it in such a - * fashion that it might be confused with the original M.I.T. software. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -#include "k5-int.h" -#include "rsa-md4.h" -#include <openssl/evp.h> -#include <openssl/md4.h> - -void -krb5int_MD4Init (krb5_MD4_CTX *mdContext) -{ - EVP_MD_CTX_init(&mdContext->ossl_md4_ctx ); - EVP_DigestInit_ex(&mdContext->ossl_md4_ctx, EVP_md4(), NULL); - -} -void -krb5int_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen) -{ - EVP_DigestUpdate(&mdContext->ossl_md4_ctx, inBuf, inLen); -} - -void -krb5int_MD4Final (krb5_MD4_CTX *mdContext) -{ - EVP_DigestFinal_ex(&mdContext->ossl_md4_ctx, mdContext->digest , NULL); - EVP_MD_CTX_cleanup(&mdContext->ossl_md4_ctx ); -} diff --git a/src/lib/crypto/openssl/md4/rsa-md4.h b/src/lib/crypto/openssl/md4/rsa-md4.h deleted file mode 100644 index 3d32f0857..000000000 --- a/src/lib/crypto/openssl/md4/rsa-md4.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* - * lib/crypto/md4/rsa-md4.h - * - * Copyright 1991 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Furthermore if you modify this software you must label - * your software as modified software and not distribute it in such a - * fashion that it might be confused with the original M.I.T. software. - * M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - * - * RSA MD4 header file, with Kerberos/STDC additions. - */ - -#ifndef __KRB5_RSA_MD4_H__ -#define __KRB5_RSA_MD4_H__ - -#ifdef unicos61 -#include <sys/types.h> -#endif /* unicos61 */ - -#include <openssl/evp.h> -#include <openssl/md5.h> - -/* 16 u_char's in the digest */ -#define RSA_MD4_CKSUM_LENGTH 16 -/* des blocksize is 8, so this works nicely... */ -#define OLD_RSA_MD4_DES_CKSUM_LENGTH 16 -#define NEW_RSA_MD4_DES_CKSUM_LENGTH 24 -#define RSA_MD4_DES_CONFOUND_LENGTH 8 - -/* -********************************************************************** -** md4.h -- Header file for implementation of MD4 ** -** RSA Data Security, Inc. MD4 Message Digest Algorithm ** -** Created: 2/17/90 RLR ** -** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** -********************************************************************** -*/ - -/* -********************************************************************** -** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** -** ** -** License to copy and use this software is granted provided that ** -** it is identified as the "RSA Data Security, Inc. MD4 Message ** -** Digest Algorithm" in all material mentioning or referencing this ** -** software or this function. ** -** ** -** License is also granted to make and use derivative works ** -** provided that such works are identified as "derived from the RSA ** -** Data Security, Inc. MD4 Message Digest Algorithm" in all ** -** material mentioning or referencing the derived work. ** -** ** -** RSA Data Security, Inc. makes no representations concerning ** -** either the merchantability of this software or the suitability ** -** of this software for any particular purpose. It is provided "as ** -** is" without express or implied warranty of any kind. ** -** ** -** These notices must be retained in any copies of any part of this ** -** documentation and/or software. ** -********************************************************************** -*/ - -/* Data structure for MD4 (Message Digest) computation */ -typedef struct { - EVP_MD_CTX ossl_md4_ctx; - krb5_int32 * digest_len; - krb5_ui_4 i[2]; /* number of _bits_ handled mod 2^64 */ - krb5_ui_4 buf[4]; /* scratch buffer */ - unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after MD4Final call */ -} krb5_MD4_CTX; - -extern void krb5int_MD4Init(krb5_MD4_CTX *); -extern void krb5int_MD4Update(krb5_MD4_CTX *, const unsigned char *, unsigned int); -extern void krb5int_MD4Final(krb5_MD4_CTX *); - -/* -********************************************************************** -** End of md4.h ** -******************************* (cut) ******************************** -*/ -#endif /* __KRB5_RSA_MD4_H__ */ |
