[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Richard Levitte
levitte at openssl.org
Tue May 17 15:18:42 UTC 2016
The branch OpenSSL_1_0_2-stable has been updated
via cbacc6f7e96b2d6d6d2ae3c1984ca7df439fe4c5 (commit)
via 477b9afc68863bb287f3b629ff0879e2fababbb7 (commit)
via 4e16885c8c0e28e9586f3abe546cdf976bd21875 (commit)
from 57f115e9088fafdc8a65bdf709e9154dded4ab10 (commit)
- Log -----------------------------------------------------------------
commit cbacc6f7e96b2d6d6d2ae3c1984ca7df439fe4c5
Author: Richard Levitte <levitte at openssl.org>
Date: Mon May 16 17:29:43 2016 +0200
Don't require any length of password when decrypting
RT#2534
Reviewed-by: Matt Caswell <matt at openssl.org>
commit 477b9afc68863bb287f3b629ff0879e2fababbb7
Author: Richard Levitte <levitte at openssl.org>
Date: Mon May 16 17:13:32 2016 +0200
Add missing initialiser in e_chil.c
RT#2616
Reviewed-by: Matt Caswell <matt at openssl.org>
commit 4e16885c8c0e28e9586f3abe546cdf976bd21875
Author: Richard Levitte <levitte at openssl.org>
Date: Mon May 16 17:10:16 2016 +0200
Add support for RC / WINDRES env variables
RT#2558
Reviewed-by: Matt Caswell <matt at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
Configure | 3 +++
Makefile.org | 2 ++
Makefile.shared | 2 +-
crypto/pem/pem_lib.c | 12 +++++++++---
engines/e_chil.c | 2 +-
5 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/Configure b/Configure
index c98107a..3a77276 100755
--- a/Configure
+++ b/Configure
@@ -1254,6 +1254,7 @@ my $shared_extension = $fields[$idx_shared_extension];
my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
my $ar = $ENV{'AR'} || "ar";
my $arflags = $fields[$idx_arflags];
+my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres";
my $multilib = $fields[$idx_multilib];
# if $prefix/lib$multilib is not an existing directory, then
@@ -1717,12 +1718,14 @@ while (<IN>)
s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/;
s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/;
s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
+ s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/;
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc";
}
else {
s/^CC=.*$/CC= $cc/;
s/^AR=\s*ar/AR= $ar/;
s/^RANLIB=.*/RANLIB= $ranlib/;
+ s/^RC=.*/RC= $windres/;
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
}
diff --git a/Makefile.org b/Makefile.org
index 76fdbdf..bda6c09 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -66,6 +66,7 @@ EXE_EXT=
ARFLAGS=
AR=ar $(ARFLAGS) r
RANLIB= ranlib
+RC= windres
NM= nm
PERL= perl
TAR= tar
@@ -208,6 +209,7 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
CC='$(CC)' CFLAG='$(CFLAG)' \
AS='$(CC)' ASFLAG='$(CFLAG) -c' \
AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
+ RC='$(RC)' \
CROSS_COMPILE='$(CROSS_COMPILE)' \
PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
diff --git a/Makefile.shared b/Makefile.shared
index a2aa980..e8d222a 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -293,7 +293,7 @@ link_a.cygwin:
fi; \
dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
$(PERL) util/mkrc.pl $$dll_name | \
- $(CROSS_COMPILE)windres -o rc.o; \
+ $(RC) -o rc.o; \
extras="$$extras rc.o"; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index fe881d6..ac4faae 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -105,17 +105,23 @@ int PEM_def_callback(char *buf, int num, int w, void *key)
prompt = "Enter PEM pass phrase:";
for (;;) {
- i = EVP_read_pw_string_min(buf, MIN_LENGTH, num, prompt, w);
+ /*
+ * We assume that w == 0 means decryption,
+ * while w == 1 means encryption
+ */
+ int min_len = w ? MIN_LENGTH : 0;
+
+ i = EVP_read_pw_string_min(buf, min_len, num, prompt, w);
if (i != 0) {
PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD);
memset(buf, 0, (unsigned int)num);
return (-1);
}
j = strlen(buf);
- if (j < MIN_LENGTH) {
+ if (min_len && j < min_len) {
fprintf(stderr,
"phrase is too short, needs to be at least %d chars\n",
- MIN_LENGTH);
+ min_len);
} else
break;
}
diff --git a/engines/e_chil.c b/engines/e_chil.c
index 5dfab51..5e725f5 100644
--- a/engines/e_chil.c
+++ b/engines/e_chil.c
@@ -1272,7 +1272,7 @@ static int hwcrhk_insert_card(const char *prompt_info,
ui = UI_new_method(ui_method);
if (ui) {
- char answer;
+ char answer = '\0';
char buf[BUFSIZ];
/*
* Despite what the documentation says wrong_info can be an empty
More information about the openssl-commits
mailing list