summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-02-26 13:13:03 +0000
committerpeter <peter@FreeBSD.org>2000-02-26 13:13:03 +0000
commit58c2a78aa2a72044e1717c1ff77cfdc9b2dc0463 (patch)
tree4667af4182179bf0fd04fc76aa3c798f4ff9d140 /crypto
parent527ba28c8fdf2e7a104fa19c1b56892d2612156b (diff)
downloadFreeBSD-src-58c2a78aa2a72044e1717c1ff77cfdc9b2dc0463.zip
FreeBSD-src-58c2a78aa2a72044e1717c1ff77cfdc9b2dc0463.tar.gz
Merge from internat.freebsd.org repo, minus change to rsa_eay.c (missing)
Reorganize and unify libcrypto's interface so that the RSA implementation is chosen at runtime via dlopen(). This is a checkpoint and may require more tweaks still.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssl/apps/speed.c14
-rw-r--r--crypto/openssl/crypto/err/err_all.c8
-rw-r--r--crypto/openssl/crypto/rsa/rsa.h6
-rw-r--r--crypto/openssl/crypto/rsa/rsa_lib.c7
-rw-r--r--crypto/openssl/rsaref/rsar_err.c3
-rw-r--r--crypto/openssl/rsaref/rsaref.c3
-rw-r--r--crypto/openssl/rsaref/rsaref.h5
7 files changed, 13 insertions, 33 deletions
diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c
index a298014..571b611 100644
--- a/crypto/openssl/apps/speed.c
+++ b/crypto/openssl/apps/speed.c
@@ -429,21 +429,9 @@ int MAIN(int argc, char **argv)
else
#endif
#ifndef NO_RSA
-#ifdef RSAref
- if (strcmp(*argv,"rsaref") == 0)
- {
- RSA_set_default_method(RSA_PKCS1_RSAref());
- j--;
- }
- else
-#endif
if (strcmp(*argv,"openssl") == 0)
{
-#ifdef RSAref
- RSA_set_default_method(RSA_PKCS1_RSAref());
-#else
- RSA_set_default_method(RSA_PKCS1_SSLeay());
-#endif
+ RSA_set_default_method(RSA_PKCS1());
j--;
}
else
diff --git a/crypto/openssl/crypto/err/err_all.c b/crypto/openssl/crypto/err/err_all.c
index ad82022..c4370c9 100644
--- a/crypto/openssl/crypto/err/err_all.c
+++ b/crypto/openssl/crypto/err/err_all.c
@@ -1,4 +1,5 @@
/* crypto/err/err_all.c */
+/* $FreeBSD$ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -64,9 +65,6 @@
#ifndef NO_RSA
#include <openssl/rsa.h>
#endif
-#ifdef RSAref
-#include <openssl/rsaref.h>
-#endif
#ifndef NO_DH
#include <openssl/dh.h>
#endif
@@ -95,12 +93,8 @@ void ERR_load_crypto_strings(void)
ERR_load_BIO_strings();
ERR_load_CONF_strings();
#ifndef NO_RSA
-#ifdef RSAref
- ERR_load_RSAREF_strings();
-#else
ERR_load_RSA_strings();
#endif
-#endif
#ifndef NO_DH
ERR_load_DH_strings();
#endif
diff --git a/crypto/openssl/crypto/rsa/rsa.h b/crypto/openssl/crypto/rsa/rsa.h
index 9230b2f..6c17ccc 100644
--- a/crypto/openssl/crypto/rsa/rsa.h
+++ b/crypto/openssl/crypto/rsa/rsa.h
@@ -1,4 +1,5 @@
/* crypto/rsa/rsa.h */
+/* $FreeBSD$ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -175,11 +176,8 @@ RSA_METHOD *RSA_set_method(RSA *rsa, RSA_METHOD *meth);
/* This function needs the memory locking malloc callbacks to be installed */
int RSA_memory_lock(RSA *r);
-/* If you have RSAref compiled in. */
-RSA_METHOD *RSA_PKCS1_RSAref(void);
-
/* these are the actual SSLeay RSA functions */
-RSA_METHOD *RSA_PKCS1_SSLeay(void);
+RSA_METHOD *RSA_PKCS1(void);
void ERR_load_RSA_strings(void );
diff --git a/crypto/openssl/crypto/rsa/rsa_lib.c b/crypto/openssl/crypto/rsa/rsa_lib.c
index c0ca292..1cf8539 100644
--- a/crypto/openssl/crypto/rsa/rsa_lib.c
+++ b/crypto/openssl/crypto/rsa/rsa_lib.c
@@ -1,4 +1,5 @@
/* crypto/rsa/rsa_lib.c */
+/* $FreeBSD$ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -105,11 +106,7 @@ RSA *RSA_new_method(RSA_METHOD *meth)
if (default_RSA_meth == NULL)
{
-#ifdef RSAref
- default_RSA_meth=RSA_PKCS1_RSAref();
-#else
- default_RSA_meth=RSA_PKCS1_SSLeay();
-#endif
+ default_RSA_meth=RSA_PKCS1();
}
ret=(RSA *)Malloc(sizeof(RSA));
if (ret == NULL)
diff --git a/crypto/openssl/rsaref/rsar_err.c b/crypto/openssl/rsaref/rsar_err.c
index d2eb3a2..438acf5 100644
--- a/crypto/openssl/rsaref/rsar_err.c
+++ b/crypto/openssl/rsaref/rsar_err.c
@@ -1,4 +1,5 @@
/* rsaref/rsar_err.c */
+/* $FreeBSD$ */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
@@ -102,7 +103,7 @@ static ERR_STRING_DATA RSAREF_str_reasons[]=
#endif
-void ERR_load_RSAREF_strings(void)
+void ERR_load_RSA_strings(void)
{
static int init=1;
diff --git a/crypto/openssl/rsaref/rsaref.c b/crypto/openssl/rsaref/rsaref.c
index 7677eb9..6a5face 100644
--- a/crypto/openssl/rsaref/rsaref.c
+++ b/crypto/openssl/rsaref/rsaref.c
@@ -1,4 +1,5 @@
/* rsaref/rsaref.c */
+/* $FreeBSD$ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -95,7 +96,7 @@ static RSA_METHOD rsa_pkcs1_ref_meth={
NULL,
};
-RSA_METHOD *RSA_PKCS1_RSAref(void)
+RSA_METHOD *RSA_PKCS1(void)
{
return(&rsa_pkcs1_ref_meth);
}
diff --git a/crypto/openssl/rsaref/rsaref.h b/crypto/openssl/rsaref/rsaref.h
index 15f65dd..b9b3e61 100644
--- a/crypto/openssl/rsaref/rsaref.h
+++ b/crypto/openssl/rsaref/rsaref.h
@@ -1,4 +1,5 @@
/* rsaref/rsaref.h */
+/* $FreeBSD$ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -131,8 +132,8 @@ int R_GetRandomBytesNeeded(unsigned int *,RSARandomState *rnd);
int R_RandomUpdate(RSARandomState *rnd, unsigned char *data, unsigned int n);
int R_RandomFinal(RSARandomState *rnd);
-void ERR_load_RSAREF_strings(void );
-RSA_METHOD *RSA_PKCS1_RSAref(void );
+void ERR_load_RSA_strings(void );
+RSA_METHOD *RSA_PKCS1(void );
#endif
/* BEGIN ERROR CODES */
OpenPOWER on IntegriCloud