Skip to content

Commit

Permalink
Replace "SSLeay" in API with OpenSSL
Browse files Browse the repository at this point in the history
All instances of SSLeay (any combination of case) were replaced with
the case-equivalent OpenSSL.

Reviewed-by: Richard Levitte <levitte@openssl.org>
  • Loading branch information
richsalz authored and Rich Salz committed Oct 30, 2015
1 parent 87d9caf commit b0700d2
Show file tree
Hide file tree
Showing 55 changed files with 438 additions and 651 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Expand Up @@ -14,6 +14,10 @@
also been removed.
[Matt Caswell]

*) All instances of the string "ssleay" in the public API were replaced
with OpenSSL (case-matching; e.g., OPENSSL_VERSION for #define's)
[Rich Salz]

*) The demo files in crypto/threads were moved to demo/threads.
[Rich Salz]

Expand Down
23 changes: 4 additions & 19 deletions apps/CA.com
Expand Up @@ -10,29 +10,14 @@ $! At the end of that grab newreq.pem and newcert.pem (one has the key
$! and the other the certificate) and cat them together and that is what
$! you want/need ... I'll make even this a little cleaner later.
$!
$!
$! 12-Jan-96 tjh Added more things ... including CA -signcert which
$! converts a certificate to a request and then signs it.
$! 10-Jan-96 eay Fixed a few more bugs and added the SSLEAY_CONFIG
$! environment variable so this can be driven from
$! a script.
$! 25-Jul-96 eay Cleaned up filenames some more.
$! 11-Jun-96 eay Fixed a few filename missmatches.
$! 03-May-96 eay Modified to use 'openssl cmd' instead of 'cmd'.
$! 18-Apr-96 tjh Original hacking
$!
$! Tim Hudson
$! tjh@cryptsoft.com
$!
$!
$! default ssleay.cnf file has setup as per the following
$! default openssl.cnf file has setup as per the following
$! demoCA ... where everything is stored
$
$ IF F$TYPE(SSLEAY_CONFIG) .EQS. "" THEN SSLEAY_CONFIG := SSLLIB:SSLEAY.CNF
$ IF F$TYPE(OPENSSL_CONFIG) .EQS. "" THEN OPENSSL_CONFIG := SSLLIB:OPENSSL.CNF
$
$ DAYS = "-days 365"
$ REQ = openssl + " req " + SSLEAY_CONFIG
$ CA = openssl + " ca " + SSLEAY_CONFIG
$ REQ = openssl + " req " + OPENSSL_CONFIG
$ CA = openssl + " ca " + OPENSSL_CONFIG
$ VERIFY = openssl + " verify"
$ X509 = openssl + " x509"
$ PKCS12 = openssl + " pkcs12"
Expand Down
6 changes: 3 additions & 3 deletions apps/CA.pl.in
Expand Up @@ -16,11 +16,11 @@ if(defined $ENV{'OPENSSL'}) {

my $verbose = 1;

my $SSLEAY_CONFIG = $ENV{"SSLEAY_CONFIG"};
my $OPENSSL_CONFIG = $ENV{"OPENSSL_CONFIG"};
my $DAYS = "-days 365";
my $CADAYS = "-days 1095"; # 3 years
my $REQ = "$openssl req $SSLEAY_CONFIG";
my $CA = "$openssl ca $SSLEAY_CONFIG";
my $REQ = "$openssl req $OPENSSL_CONFIG";
my $CA = "$openssl ca $OPENSSL_CONFIG";
my $VERIFY = "$openssl verify";
my $X509 = "$openssl x509";
my $PKCS12 = "$openssl pkcs12";
Expand Down
3 changes: 1 addition & 2 deletions apps/openssl.c
Expand Up @@ -217,8 +217,7 @@ static char *make_config_name()
size_t len;
char *p;

if ((t = getenv("OPENSSL_CONF")) != NULL
|| (t = getenv("SSLEAY_CONF")) != NULL)
if ((t = getenv("OPENSSL_CONF")) != NULL)
return BUF_strdup(t);

t = X509_get_default_cert_area();
Expand Down
2 changes: 1 addition & 1 deletion apps/s_server.c
Expand Up @@ -2719,7 +2719,7 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context)
"HTTP/1.0 200 ok\r\nContent-type: text/html\r\n\r\n");
BIO_puts(io, "<HTML><BODY BGCOLOR=\"#ffffff\">\n");
BIO_puts(io, "<pre>\n");
/* BIO_puts(io,SSLeay_version(SSLEAY_VERSION));*/
/* BIO_puts(io,OpenSSL_version(OPENSSL_VERSION));*/
BIO_puts(io, "\n");
for (i = 0; i < local_argc; i++) {
const char *myp;
Expand Down
8 changes: 4 additions & 4 deletions apps/speed.c
Expand Up @@ -869,7 +869,7 @@ int speed_main(int argc, char **argv)
#ifndef OPENSSL_NO_RSA
# ifndef RSA_NULL
if (strcmp(*argv, "openssl") == 0) {
RSA_set_default_method(RSA_PKCS1_SSLeay());
RSA_set_default_method(RSA_PKCS1_OpenSSL());
continue;
}
# endif
Expand Down Expand Up @@ -2041,8 +2041,8 @@ int speed_main(int argc, char **argv)
show_res:
#endif
if (!mr) {
printf("%s\n", SSLeay_version(SSLEAY_VERSION));
printf("%s\n", SSLeay_version(SSLEAY_BUILT_ON));
printf("%s\n", OpenSSL_version(OPENSSL_VERSION));
printf("%s\n", OpenSSL_version(OPENSSL_BUILT_ON));
printf("options:");
printf("%s ", BN_options());
#ifndef OPENSSL_NO_MD2
Expand All @@ -2063,7 +2063,7 @@ int speed_main(int argc, char **argv)
#ifndef OPENSSL_NO_BF
printf("%s ", BF_options());
#endif
printf("\n%s\n", SSLeay_version(SSLEAY_CFLAGS));
printf("\n%s\n", OpenSSL_version(OPENSSL_CFLAGS));
}

if (pr_header) {
Expand Down
14 changes: 7 additions & 7 deletions apps/version.c
Expand Up @@ -193,17 +193,17 @@ int version_main(int argc, char **argv)
version = 1;

if (version) {
if (SSLeay() == SSLEAY_VERSION_NUMBER) {
printf("%s\n", SSLeay_version(SSLEAY_VERSION));
if (OpenSSL_version_num() == OPENSSL_VERSION_NUMBER) {
printf("%s\n", OpenSSL_version(OPENSSL_VERSION));
} else {
printf("%s (Library: %s)\n",
OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
}
}
if (date)
printf("%s\n", SSLeay_version(SSLEAY_BUILT_ON));
printf("%s\n", OpenSSL_version(OPENSSL_BUILT_ON));
if (platform)
printf("%s\n", SSLeay_version(SSLEAY_PLATFORM));
printf("%s\n", OpenSSL_version(OPENSSL_PLATFORM));
if (options) {
printf("options: ");
printf("%s ", BN_options());
Expand All @@ -225,9 +225,9 @@ int version_main(int argc, char **argv)
printf("\n");
}
if (cflags)
printf("%s\n", SSLeay_version(SSLEAY_CFLAGS));
printf("%s\n", OpenSSL_version(OPENSSL_CFLAGS));
if (dir)
printf("%s\n", SSLeay_version(SSLEAY_DIR));
printf("%s\n", OpenSSL_version(OPENSSL_DIR));
ret = 0;
end:
return (ret);
Expand Down
14 changes: 1 addition & 13 deletions crypto/bn/bn_lcl.h
Expand Up @@ -292,23 +292,11 @@ struct bn_gencb_st {
* (with draws in between). Very small exponents are often selected
* with low Hamming weight, so we use w = 1 for b <= 23.
*/
# if 1
# define BN_window_bits_for_exponent_size(b) \
# define BN_window_bits_for_exponent_size(b) \
((b) > 671 ? 6 : \
(b) > 239 ? 5 : \
(b) > 79 ? 4 : \
(b) > 23 ? 3 : 1)
# else
/*
* Old SSLeay/OpenSSL table. Maximum window size was 5, so this table differs
* for b==1024; but it coincides for other interesting values (b==160,
* b==512).
*/
# define BN_window_bits_for_exponent_size(b) \
((b) > 255 ? 5 : \
(b) > 127 ? 4 : \
(b) > 17 ? 3 : 1)
# endif

/*
* BN_mod_exp_mont_conttime is based on the assumption that the L1 data cache
Expand Down

0 comments on commit b0700d2

Please sign in to comment.