2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

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

This commit is contained in:
Michael Graff
2000-04-20 01:13:21 +00:00
parent 07fffbc8c9
commit e915367e40
54 changed files with 254 additions and 184 deletions

335
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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@

View File

@@ -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@

View File

@@ -22,6 +22,8 @@
#include <isc/int.h>
#include <isc/region.h>
#include "../rename.h"
#include <dst/dst.h>
#include <dst/result.h>

View File

@@ -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;

View File

@@ -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));
}

View File

@@ -19,7 +19,7 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I${srcdir}/include
CDEFINES = -DMFUNC
CDEFINES = -DMFUNC @DST_PRIVATEOPENSSL@
CWARNINGS =
LIBS = @LIBS@

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_add.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#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) */

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_ctx.c */
/* Written by Ulf Moeller for the OpenSSL project. */
/* ====================================================================

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_div.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_err.c */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_exp.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_gcd.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_lib.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_mont.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_mul.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_prime.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_print.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_rand.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_recp.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_shift.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_sqr.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/bn/bn_word.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/buffer/buffer.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/cryptlib.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dh/dh_err.c */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dh/dh_gen.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dh/dh_key.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dh/dh_lib.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_asn1.c */
#include <stdio.h>

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_err.c */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_gen.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_key.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_lib.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_ossl.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_sign.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/dsa/dsa_vrf.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/err/err.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/ex_data.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -17,6 +17,8 @@ srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
CDEFINES = @DST_PRIVATEOPENSSL@
SUBDIRS =
TARGETS =

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/lhash/lhash.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/md5/md5_dgst.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
@@ -81,8 +82,8 @@ void MD5_Init(MD5_CTX *c)
c->num=0;
}
#ifndef md5_block_host_order
void md5_block_host_order (MD5_CTX *c, const void *data, int num)
#ifndef dst_md5_block_host_order
void dst_md5_block_host_order (MD5_CTX *c, const void *data, int num)
{
const MD5_LONG *X=data;
register unsigned long A,B,C,D;
@@ -185,11 +186,11 @@ void md5_block_host_order (MD5_CTX *c, const void *data, int num)
}
#endif
#ifndef md5_block_data_order
#ifndef dst_md5_block_data_order
#ifdef X
#undef X
#endif
void md5_block_data_order (MD5_CTX *c, const void *data_, int num)
void dst_md5_block_data_order (MD5_CTX *c, const void *data_, int num)
{
const unsigned char *data=data_;
register unsigned long A,B,C,D,l;

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/rand/md_rand.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/mem.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/mem_dbg.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/rand/rand_lib.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/sha/sha1_one.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/sha/sha1dgst.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/stack/stack.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -1,3 +1,4 @@
#include "../rename.h"
/* crypto/threads/th-lock.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.

View File

@@ -557,6 +557,7 @@
./lib/dns/rootns.c C 1999,2000
./lib/dns/sec/.cvsignore X 1999,2000
./lib/dns/sec/Makefile.in MAKE 1998,1999,2000
./lib/dns/sec/rename.h C 2000
./lib/dns/sec/dnssafe/.cvsignore X 1999,2000
./lib/dns/sec/dnssafe/Makefile.in MAKE 1998,1999,2000
./lib/dns/sec/dst/.cvsignore X 1999,2000