Commit e915367e authored by Michael Graff's avatar Michael Graff
Browse files

rename openssl functions and exported data to have a dst_ prefix.

parent 07fffbc8
This diff is collapsed.
......@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl SOFTWARE.
AC_REVISION($Revision: 1.115 $)
AC_REVISION($Revision: 1.116 $)
AC_PREREQ(2.13)
......@@ -145,6 +145,18 @@ if test "X$CC" = "X" ; then
esac
fi
#
# If the user didn't specify where openssl is, and we didn't find or it
# is imcompatible with our code, use our internal one.
# XXXMLG Implement this check!
#
AC_MSG_CHECKING(for compatible OpenSSL library)
DST_PRIVATEOPENSSL='-DDST_USE_PRIVATE_OPENSSL'
dst_privateopenssl='openssl'
AC_MSG_RESULT(using private library)
AC_SUBST(DST_PRIVATEOPENSSL)
AC_SUBST(dst_privateopenssl)
#
# NetBSD has two alternative pthreads implementations. Make the
# user choose one by saying --with-mit-pthreads or --with-ptl2
......
......@@ -17,7 +17,7 @@ srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = dnssafe dst openssl
SUBDIRS = dnssafe dst @dst_privateopenssl@
TARGETS =
@BIND9_MAKE_RULES@
......@@ -24,7 +24,7 @@ CINCLUDES = -I${srcdir} \
-I${srcdir}/../openssl/include \
${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DUSE_MD5 -DDNSSAFE -DOPENSSL
CDEFINES = -DUSE_MD5 -DDNSSAFE -DOPENSSL @DST_PRIVATEOPENSSL@
CWARNINGS =
LIBS = @LIBS@
......
......@@ -22,6 +22,8 @@
#include <isc/int.h>
#include <isc/region.h>
#include "../rename.h"
#include <dst/dst.h>
#include <dst/result.h>
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: hmac_link.c,v 1.17 2000/03/15 18:52:23 bwelling Exp $
* $Id: hmac_link.c,v 1.18 2000/04/20 01:12:26 explorer Exp $
*/
#include <config.h>
......@@ -42,10 +42,6 @@
#define HMAC_IPAD 0x36
#define HMAC_OPAD 0x5c
#define MD5Init MD5_Init
#define MD5Update MD5_Update
#define MD5Final MD5_Final
#define RETERR(x) do { \
ret = (x); \
if (ret != ISC_R_SUCCESS) \
......@@ -321,9 +317,9 @@ dst_hmacmd5_from_dns(dst_key_t *key, isc_buffer_t *data, isc_mem_t *mctx) {
MD5_CTX ctx;
unsigned char digest[MD5_DIGEST_LENGTH];
MD5Init(&ctx);
MD5Update(&ctx, r.base, r.length);
MD5Final(digest, &ctx);
MD5_Init(&ctx);
MD5_Update(&ctx, r.base, r.length);
MD5_Final(digest, &ctx);
memcpy(hkey->ipad, digest, MD5_DIGEST_LENGTH);
memcpy(hkey->opad, digest, MD5_DIGEST_LENGTH);
keylen = MD5_DIGEST_LENGTH;
......
......@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: opensslmd5_link.c,v 1.3 2000/03/06 20:06:01 bwelling Exp $
* $Id: opensslmd5_link.c,v 1.4 2000/04/20 01:12:27 explorer Exp $
*/
#include <config.h>
......@@ -42,10 +42,6 @@
#include <openssl/bn.h>
#include <openssl/md5.h>
#define MD5Init MD5_Init
#define MD5Update MD5_Update
#define MD5Final MD5_Final
/*
* dst_s_md5
* Call MD5 functions to digest a block of data.
......@@ -79,17 +75,17 @@ dst_s_md5(const unsigned int mode, void **context, isc_region_t *data,
REQUIRE (ctx != NULL);
if (mode & DST_SIGMODE_INIT)
MD5Init(ctx);
MD5_Init(ctx);
if (mode & DST_SIGMODE_UPDATE)
MD5Update(ctx, data->base, data->length);
MD5_Update(ctx, data->base, data->length);
if (mode & DST_SIGMODE_FINAL) {
isc_buffer_available(digest, &r);
if (r.length < MD5_DIGEST_LENGTH)
return (ISC_R_NOSPACE);
MD5Final(r.base, ctx);
MD5_Final(r.base, ctx);
isc_buffer_add(digest, MD5_DIGEST_LENGTH);
isc_mem_put(mctx, ctx, sizeof(MD5_CTX));
}
......
......@@ -19,7 +19,7 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I${srcdir}/include
CDEFINES = -DMFUNC
CDEFINES = -DMFUNC @DST_PRIVATEOPENSSL@
CWARNINGS =
LIBS = @LIBS@
......
#include "../rename.h"
/* crypto/bn/bn_add.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_asm.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......@@ -431,6 +432,8 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
#undef bn_sqr_comba8
#undef bn_sqr_comba4
#include "../rename.h"
/* mul_add_c(a,b,c0,c1,c2) -- c+=a*b for three word number c=(c2,c1,c0) */
/* mul_add_c2(a,b,c0,c1,c2) -- c+=2*a*b for three word number c=(c2,c1,c0) */
/* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */
......
#include "../rename.h"
/* crypto/bn/bn_ctx.c */
/* Written by Ulf Moeller for the OpenSSL project. */
/* ====================================================================
......
#include "../rename.h"
/* crypto/bn/bn_div.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_err.c */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_exp.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
#include "../rename.h"
/* crypto/bn/bn_gcd.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_lib.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_mont.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_mul.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
#include "../rename.h"
/* crypto/bn/bn_prime.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment