Commit Graph

77 Commits (fd3ed85c67174a0d3b6639ba9b237351d1c2201f)

Author SHA1 Message Date
Matt Caswell 00c405b365 Update copyright year
Reviewed-by: Tomas Mraz <>
(Merged from
2020-06-04 14:33:57 +01:00
Maxim Zakharov 082394839e TTY_get() in crypto/ui/ui_openssl.c open_console() can also return errno 1 (EPERM, Linux)
Signed-off-by: Maxim Zakharov <>

Reviewed-by: Tomas Mraz <>
Reviewed-by: Matt Caswell <>
(Merged from
2020-05-18 09:56:27 +01:00
Dr. Matthias St. Pierre 706457b7bd Reorganize local header files
Apart from public and internal header files, there is a third type called
local header files, which are located next to source files in the source
directory. Currently, they have different suffixes like

  '*_lcl.h', '*_local.h', or '*_int.h'

This commit changes the different suffixes to '*_local.h' uniformly.

Reviewed-by: Richard Levitte <>
(Merged from
2019-09-28 20:26:35 +02:00
Pauli dd6b270618 Remove tab characters from C source files.
Some have been creeping into the source code.

Reviewed-by: Paul Yang <>
(Merged from
2019-07-16 20:24:10 +10:00
Rich Salz 6b10d29c1a Remove NextStep support
Because of that we can remove OPENSSL_UNISTD and some other
macros from e_os2.h and opensslconf.h

Reviewed-by: Tim Hudson <>
Reviewed-by: Paul Dale <>
(Merged from
2019-07-01 13:32:46 -04:00
Antoine Cœur 68756b12f5 Fix Typos
CLA: trivial

Reviewed-by: Richard Levitte <>
Reviewed-by: Paul Dale <>
Reviewed-by: Matthias St. Pierre <>
(Merged from
2019-07-01 10:09:22 +02:00
Klotz, Tobias 5c8b7b4caa Cleanup vxworks support to be able to compile for VxWorks 7
Reviewed-by: Matt Caswell <>
Reviewed-by: Matthias St. Pierre <>
(Merged from
2019-01-24 17:55:04 +01:00
Richard Levitte 55e0593c81 Following the license change, modify the boilerplates in crypto/ui/
[skip ci]

Reviewed-by: Matt Caswell <>
(Merged from
2018-12-06 15:31:37 +01:00
Richard Levitte 276bf8620c crypto/ui/ui_openssl.c: make sure to recognise ENXIO and EIO too
These both indicate that the file descriptor we're trying to use as a
terminal isn't, in fact, a terminal.

Fixes #7271

Reviewed-by: Matthias St. Pierre <>
(Merged from
2018-09-20 06:39:07 +02:00
Andy Polyakov f20aa69e33 crypto/*: address standard-compilance nits.
Reviewed-by: Rich Salz <>
Reviewed-by: Kurt Roeckx <>
(Merged from
2018-07-20 13:40:30 +02:00
Matt Caswell 83cf7abf8e Update copyright year
Reviewed-by: Richard Levitte <>
(Merged from
2018-05-29 13:16:04 +01:00
Richard Levitte de03cc92d1 UI console: Restore tty settings, do not force ECHO after prompt
The Console UI method always set echo on after prompting without
echo.  However, echo might not have been on originally, so just
restore the original TTY settings.

Fixes #2373

Reviewed-by: Andy Polyakov <>
(Merged from
2018-05-14 11:00:23 +02:00
Rich Salz 7aae0d33ac Removre comment with user's name
Reviewed-by: Tim Hudson <>
(Merged from
2017-11-08 10:37:52 -05:00
KaoruToda 26a7d938c9 Remove parentheses of return.
Since return is inconsistent, I removed unnecessary parentheses and
unified them.

Reviewed-by: Rich Salz <>
Reviewed-by: Matt Caswell <>
(Merged from
2017-10-18 16:05:06 +01:00
Rich Salz e3713c365c Remove email addresses from source code.
Names were not removed.
Some comments were updated.
Replace Andy's address with

Reviewed-by: Andy Polyakov <>
Reviewed-by: Paul Dale <>
(Merged from
2017-10-13 10:06:59 -04:00
Pauli 07016a8a31 Move e_os.h to be the very first include.
cryptilib.h is the second.

Reviewed-by: Andy Polyakov <>
Reviewed-by: Richard Levitte <>
(Merged from
2017-08-30 07:20:44 +10:00
Pauli 677963e5a4 e_os.h removal from other headers and source files.
Removed e_os.h from all bar three headers (apps/apps.h crypto/bio/bio_lcl.h and

Added e_os.h into the files that need it now.

Directly reference internal/nelem.h when required.

Reviewed-by: Andy Polyakov <>
Reviewed-by: Richard Levitte <>
(Merged from
2017-08-30 07:20:43 +10:00
Richard Levitte 48feaceb53 Remove the possibility to disable the UI module entirely
Instead, make it possible to disable the console reader that's part of
the UI module.  This makes it possible to use the UI API and other UI
methods in environments where the console reader isn't useful.

To disable the console reader, configure with 'no-ui-console' /

'no-ui' / 'disable-ui' is now an alias for  'no-ui-console' /

Fixes #3806

Reviewed-by: Rich Salz <>
(Merged from
2017-07-03 07:51:04 +02:00
Rich Salz 076fc55527 Make default_method mostly compile-time
Document thread-safety issues
Have RSA_null return NULL (always fails)

Reviewed-by: Matt Caswell <>
(Merged from
2017-04-07 12:19:46 -04:00
Richard Levitte c922ebe232 VMS UI_OpenSSL: generate OpenSSL errors when things go wrong.
Reviewed-by: Rich Salz <>
(Merged from
2016-12-10 10:16:41 +01:00
Richard Levitte 18edbe6519 VMS UI_OpenSSL: if the TT device isn't a tty, flag instead of error
On all platforms, if the controlling tty isn't an actual tty, this is
flagged by setting is_a_tty to zero...  except on VMS, where this was
treated as an error.  Change this to behave like the other platforms.

Reviewed-by: Rich Salz <>
(Merged from
2016-12-10 10:16:41 +01:00
Richard Levitte 120fb9e436 UI code style cleanup
Mostly condition check changes.

Reviewed-by: Rich Salz <>
(Merged from
2016-12-08 19:31:28 +01:00
Richard Levitte c901bccec6 UI_OpenSSL()'s session opener fails on MacOS X
If on a non-tty stdin, TTY_get() will fail with errno == ENODEV.
We didn't catch that.

Reviewed-by: Rich Salz <>
(Merged from
2016-12-08 13:37:48 +01:00
Richard Levitte 4984448648 In UI_OpenSSL's open(), generate an error on unknown errno
TTY_get() sometimes surprises us with new errno values to determine if
we have a controling terminal or not.  This generated error is a
helpful tool to figure out that this was what happened and what the
unknown value is.

Reviewed-by: Rich Salz <>
(Merged from
2016-12-08 13:34:08 +01:00
Rich Salz f3b3d7f003 Add -Wswitch-enum
Change code so when switching on an enumeration, have case's for all
enumeration values.

Reviewed-by: Andy Polyakov <>
2016-09-22 08:36:26 -04:00
Andy Polyakov fb5d9f1db5 Windows: UTF-8 opt-in for command-line arguments and console input.
User can make Windows openssl.exe to treat command-line arguments
and console input as UTF-8 By setting OPENSSL_WIN32_UTF8 environment
variable (to any value). This is likely to be required for data
interchangeability with other OSes and PKCS#12 containers generated
with Windows CryptoAPI.

Reviewed-by: Richard Levitte <>
2016-08-25 11:56:28 +01:00
Andy Polyakov 6ebce6803e crypto/ui/ui_openssl.c: let new-line through after query in Windows path.
Originally new-line was suppressed, because double new-line was
observed under wine. But it appears rather to be a wine bug,
because on real Windows new-line is much needed.

Reviewed-by: Richard Levitte <>
2016-08-11 14:36:54 +02:00
Andy Polyakov 087d3e8993 crypto/ui/ui_openssl.c: UTF-y Windows code path.
Windows never composes UTF-8 strings as result of user interaction
such as input query. The only way to compose one is programmatic
conversion from WCHAR string, which in turn can be picked up with

Reviewed-by: Richard Levitte <>
2016-08-01 10:10:28 +02:00
Rich Salz aa6bb1352b Copyright consolidation 05/10
Reviewed-by: Richard Levitte <>
2016-05-17 15:38:09 -04:00
Rich Salz 507c7c0ed6 Fix build; CPP syntax error.
Reviewed-by: Dr. Stephen Henson <>
2016-03-18 07:35:18 -04:00
Rich Salz 1fbab1dc6f Remove Netware and OS/2
Reviewed-by: Richard Levitte <>
2016-03-17 17:06:57 -04:00
Alessandro Ghedini 41cfbccc99 Convert CRYPTO_LOCK_UI to new multi-threading API
Reviewed-by: Matt Caswell <>
Reviewed-by: Rich Salz <>
2016-03-08 11:10:34 -05:00
Rich Salz 349807608f Remove /* foo.c */ comments
This was done by the following
        find . -name '*.[ch]' | /tmp/pl
where /tmp/pl is the following three-line script:
        print unless $. == 1 && m@/\* .*\.[ch] \*/@;
        close ARGV if eof; # Close file to reset $.

And then some hand-editing of other files.

Reviewed-by: Viktor Dukhovni <>
2016-01-26 16:40:43 -05:00
Richard Levitte 31384753c7 Remove the "eay" c-file-style indicators
Since we don't use the eay style any more, there's no point tryint to
tell emacs to use it.

Reviewed-by: Matt Caswell <>
2015-12-18 13:08:40 +01:00
Richard Levitte b39fc56061 Identify and move common internal libcrypto header files
There are header files in crypto/ that are used by a number of crypto/
submodules.  Move those to crypto/include/internal and adapt the
affected source code and Makefiles.

The header files that got moved are:


Reviewed-by: Rich Salz <>
2015-05-14 17:21:40 +02:00
Rich Salz 16f8d4ebf0 memset, memcpy, sizeof consistency fixes
Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr)
for memset and memcpy.  Remove needless casts for those functions.
For memset, replace alternative forms of zero with 0.

Reviewed-by: Richard Levitte <>
2015-05-05 22:18:59 -04:00
Richard Levitte 64e6bf64b3 Assume TERMIOS is default, remove TERMIO on all Linux.
The rationale for this move is that TERMIOS is default, supported by
POSIX-1.2001, and most definitely on Linux.  For a few other systems,
TERMIO may still be the termnial interface of preference, so we keep
-DTERMIO on those in Configure.

crypto/ui/ui_openssl.c is simplified in this regard, and will define
TERMIOS for all systems except a select few exceptions.
Reviewed-by: Matt Caswell <>
2015-02-21 23:51:05 +01:00
Rich Salz 68b00c2372 ifdef cleanup part 3: OPENSSL_SYSNAME
Remove MS_STATIC; it's a relic from platforms <32 bits.

Reviewed-by: Andy Polyakov <>
Reviewed-by: Tim Hudson <>
2015-01-23 11:58:26 -05:00
Matt Caswell 0f113f3ee4 Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <>
2015-01-22 09:20:09 +00:00
Rich Salz 6d23cf9744 RT3548: Remove unsupported platforms
This last one for this ticket.  Removes WIN16.
So long, MS_CALLBACK and MS_FAR.  We won't miss you.

Reviewed-by: Richard Levitte <>
2015-01-12 17:30:54 -05:00
Matt Caswell 3a83462dfe Further comment amendments to preserve formatting prior to source reformat
Reviewed-by: Tim Hudson <>
2015-01-06 15:45:25 +00:00
Rich Salz f231941444 RT3548: Remvoe unsupported platforms
This commit removes SunOS (a sentimental favorite of mine).

Reviewed-by: Richard Levitte <>
2014-12-21 23:18:02 -05:00
Rich Salz b317819b2e RT3548: Remove some obsolete platforms
This commit removes BEOS.

Reviewed-by: Richard Levitte <>
2014-12-17 17:24:51 -05:00
Rich Salz 92c7846372 RT3544: Remove MWERKS support
The following #ifdef tests were all removed:

Reviewed-by: Andy Polyakov <>
2014-09-24 18:07:29 -04:00
Rich Salz f642ebc1e2 Undo a90081576c
Undo unapproved commit that removed DJGPP and WATT32
2014-08-09 08:02:20 -04:00
Rich Salz a90081576c Remove DJGPP (and therefore WATT32) #ifdef's.
DJGPP is no longer a supported platform.  Remove all #ifdef, etc.,
cases that refer to it.  DJGPP also #define'd WATT32, so that
is now removed as well.
2014-08-08 16:54:14 -04:00
Dr. Stephen Henson fc7dae5229 PR: 2717
Submitted by: Tim Rice <>

Make compilation work on OpenServer 5.0.7
2012-02-11 23:41:19 +00:00
Dr. Stephen Henson ffbfbef943 more vxworks patches 2011-10-14 22:04:14 +00:00
Dr. Stephen Henson 0e039aa797 Fix warnings about ignoring fgets return value 2009-10-04 16:42:56 +00:00
Dr. Stephen Henson 83d8fa7dd1 Update from stable branch. 2009-05-13 11:32:46 +00:00