[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Mon May 16 16:04:12 UTC 2016
The branch master has been updated
via b160f2823fb3bafdf8728ea251aab0d07888b934 (commit)
via 8f41ff2d53eb43046012c7843f1f1e213b3650ea (commit)
via 3c01ed680e49f62d90d61ccf7a5802d74f1c342d (commit)
from 1b4d0e3c1ed556b890b93d8326978a6a90cfc0fe (commit)
- Log -----------------------------------------------------------------
commit b160f2823fb3bafdf8728ea251aab0d07888b934
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: Tim Hudson <tjh at openssl.org>
commit 8f41ff2d53eb43046012c7843f1f1e213b3650ea
Author: Richard Levitte <levitte at openssl.org>
Date: Mon May 16 17:08:13 2016 +0200
Add support for RC / WINDRES env variables
RT#2558
Reviewed-by: Tim Hudson <tjh at openssl.org>
commit 3c01ed680e49f62d90d61ccf7a5802d74f1c342d
Author: Richard Levitte <levitte at openssl.org>
Date: Mon May 16 15:47:58 2016 +0200
Add missing initialiser in e_chil.c
RT#2616
Reviewed-by: Tim Hudson <tjh at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
Configurations/unix-Makefile.tmpl | 7 ++++---
Configure | 2 ++
Makefile.shared | 9 +++++----
crypto/pem/pem_lib.c | 12 +++++++++---
engines/e_chil.c | 2 +-
5 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index a31867e..de20ad7 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -169,7 +169,6 @@ LIB_LDFLAGS={- $target{shared_ldflag}." ".$config{shared_ldflag}
# $prefix is not /usr.
. ($config{target} =~ m|^BSD-| && $prefix !~ m|^/usr/.*$|
? " -Wl,-rpath,\$\$(LIBRPATH)" : "") -}
-RCFLAGS={- $target{shared_rcflag} -}
DSO_CFLAGS={- $target{shared_cflag} || "" -}
DSO_LDFLAGS=$(LIB_LDFLAGS)
BIN_CFLAGS={- $target{bin_cflags} -}
@@ -180,6 +179,8 @@ ARFLAGS= {- $target{arflags} -}
AR=$(CROSS_COMPILE){- $target{ar} || "ar" -} $(ARFLAGS) r
RANLIB= {- $target{ranlib} -}
NM= $(CROSS_COMPILE){- $target{nm} || "nm" -}
+RCFLAGS={- $target{shared_rcflag} -}
+RC= $(CROSS_COMPILE){- $target{rc} || "windres" -}
RM= rm -f
RMDIR= rmdir
TAR= {- $target{tar} || "tar" -}
@@ -959,9 +960,9 @@ $target: $lib$libext $deps $ordinalsfile
LIBNAME=$libname LIBVERSION=\$(SHLIB_MAJOR).\$(SHLIB_MINOR) \\
LIBCOMPATVERSIONS=';\$(SHLIB_VERSION_HISTORY)' \\
CC='\$(CC)' CFLAGS='\$(CFLAGS) \$(LIB_CFLAGS)' \\
- CROSS_COMPILE='\$(CROSS_COMPILE)' LDFLAGS='\$(LDFLAGS)' \\
+ LDFLAGS='\$(LDFLAGS)' \\
SHARED_LDFLAGS='\$(LIB_LDFLAGS)' SHLIB_EXT=$shlibext \\
- SHARED_RCFLAGS='\$(RCFLAGS)' \\
+ RC='\$(RC)' SHARED_RCFLAGS='\$(RCFLAGS)' \\
link_shlib.$shlib_target
EOF
. (windowsdll() ? <<"EOF" : "");
diff --git a/Configure b/Configure
index 060ba24..4d3346e 100755
--- a/Configure
+++ b/Configure
@@ -915,6 +915,8 @@ $target{ranlib} = $ENV{'RANLIB'} || $target{ranlib} ||
"\$(CROSS_COMPILE)ranlib" : "true");
$target{ar} = $ENV{'AR'} || $target{ar} || "ar";
$target{nm} = $ENV{'NM'} || $target{nm} || "nm";
+$target{rc} =
+ $ENV{'RC'} || $ENV{'WINDRES'} || $target{rc} || "windres";
# For cflags, lflags, plib_lflags, ex_libs and defines, add the debug_
# or release_ attributes.
diff --git a/Makefile.shared b/Makefile.shared
index 65980b2..68b87a7 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -14,6 +14,7 @@ CFLAGS=$(CFLAG)
LDFLAGS=$(LDFLAG)
SHARED_LDFLAGS=$(SHARED_LDFLAG)
+RC=windres
# SHARED_RCFLAGS are flags used with windres, i.e. when build for Cygwin
# or Mingw.
SHARED_RCFLAGS=$(SHARED_RCFLAG)
@@ -278,9 +279,9 @@ link_shlib.cygwin:
SHLIB=cyg$(LIBNAME); SHLIB_SOVER=-$(LIBVERSION); SHLIB_SUFFIX=.dll; \
dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
echo "$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name |" \
- "$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o"; \
+ "$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name | \
- $(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
+ $(RC) $(SHARED_RCFLAGS) -o rc.o; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,--enable-auto-image-base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a rc.o"; \
@@ -306,9 +307,9 @@ link_shlib.mingw:
| sed -e 's|^\(LIBRARY *\)$(LIBNAME)32|\1'"$$dll_name"'|' \
> $(LIBNAME).def; \
echo "$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name |" \
- "$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o"; \
+ "$(RC) $(SHARED_RCFLAGS) -o rc.o"; \
$(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name | \
- $(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
+ $(RC) $(SHARED_RCFLAGS) -o rc.o; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \
NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a $(LIBNAME).def rc.o"; \
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index 6ee3b8e..4ca6187 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -98,17 +98,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 b09d525..e7c8953 100644
--- a/engines/e_chil.c
+++ b/engines/e_chil.c
@@ -1262,7 +1262,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