summaryrefslogtreecommitdiffstats
path: root/crypto/ui
AgeCommit message (Collapse)Author
2017-03-11Fix UI_get0_action_string()Richard Levitte
It shouldn't try to return an action description for UIT_PROMPT type UI strings. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2904)
2017-02-26Add a null UI methodRichard Levitte
There are cases when, if you pass a NULL UI_METHOD, the called function will use an internal default. This is well and good, but there may be cases when this is undesirable and one would rather send in a UI that does absolutely nothing (sort of a /dev/null). UI_null() is the UI_METHOD for this purpose. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2744)
2017-01-13UI: Use RUN_ONCE differentlyRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2222)
2017-01-13UI: Ensure there will be no race condition when getting the UI_METHOD ex_dataRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2222)
2017-01-11Add a UI utility function with which to wrap pem_callback_cb in a UI_METHODRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2204)
2017-01-11Add an application data field in the UI_METHODRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2204)
2017-01-11Constify the input parameter to UI_method_get_*Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2204)
2016-12-10VMS UI_OpenSSL: generate OpenSSL errors when things go wrong.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2063)
2016-12-10VMS UI_OpenSSL: if the TT device isn't a tty, flag instead of errorRichard Levitte
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 <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2063)
2016-12-08Remove extra bangRichard Levitte
A bang (!) slipped through in the recent UI cleanup Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2051)
2016-12-08UI code style cleanupRichard Levitte
Mostly condition check changes. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2047)
2016-12-08UI_OpenSSL()'s session opener fails on MacOS XRichard Levitte
If on a non-tty stdin, TTY_get() will fail with errno == ENODEV. We didn't catch that. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2039)
2016-12-08In UI_OpenSSL's open(), generate an error on unknown errnoRichard Levitte
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 <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2043)
2016-12-08UI_process() didn't generate errorsRichard Levitte
Since there are many parts of UI_process() that can go wrong, it isn't very helpful to only return -1 with no further explanation. With this change, the error message will at least show which part went wrong. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2037)
2016-09-22Add -Wswitch-enumRich Salz
Change code so when switching on an enumeration, have case's for all enumeration values. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-08-31Code cleanup UIRich Salz
Remove NULL check on parameter, and use NULL not ! on buffer. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-25Windows: UTF-8 opt-in for command-line arguments and console input.Andy Polyakov
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 <levitte@openssl.org>
2016-08-11crypto/ui/ui_openssl.c: let new-line through after query in Windows path.Andy Polyakov
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 <levitte@openssl.org>
2016-08-01crypto/ui/ui_openssl.c: UTF-y Windows code path.Andy Polyakov
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 ReadConsoleW. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-20Check for errors allocating the error strings.Kurt Roeckx
Reviewed-by: Richard Levitte <levitte@openssl.org> GH: #1330
2016-07-05Add checks on sk_TYPE_push() returned valueFdaSilvaYY
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-06-15Constify UIFdaSilvaYY
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
2016-05-23Remove unused error/function codes.Rich Salz
Add script to find unused err/reason codes Remove unused reason codes. Remove entries for unused functions Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-18Add some error messages for malloc failsMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-18Better checks for malloc failure in various METHOD functionsMatt Caswell
A number of the METHOD functions weren't properly handling malloc failures. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Manual fixes after copyright consolidationRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 05/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-28Add checks on CRYPTO_new_ex_data return valueFdaSilvaYY
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/996)
2016-04-20Remove --classic build entirelyRichard Levitte
The Unix build was the last to retain the classic build scheme. The new unified scheme has matured enough, even though some details may need polishing. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-21Remove the remainder of util/mk1mf.pl and companion scriptsRichard Levitte
This removes all scripts that deal with MINFO as well, since that's only used by mk1mf. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-18Fix build; CPP syntax error.Rich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-03-17Remove Netware and OS/2Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-08Convert CRYPTO_LOCK_UI to new multi-threading APIAlessandro Ghedini
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-20Always build library object files with shared library cflagsRichard Levitte
This takes us away from the idea that we know exactly how our static libraries are going to get used. Instead, we make them available to build shareable things with, be it other shared libraries or DSOs. On the other hand, we also have greater control of when the shared library cflags. They will never be used with object files meant got binaries, such as apps/openssl or test/test*. With unified, we take this a bit further and prepare for having to deal with extra cflags specifically to be used with DSOs (dynamic engines), libraries and binaries (applications). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-18Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPENDRichard Levitte
All those flags existed because we had all the dependencies versioned in the repository, and wanted to have it be consistent, no matter what the local configuration was. Now that the dependencies are gone from the versioned Makefile.ins, it makes much more sense to use the exact same flags as when compiling the object files. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-05GH601: Various spelling fixes.FdaSilvaYY
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-01unified build scheme: add build.info filesRichard Levitte
Now that we have the foundation for the "unified" build scheme in place, we add build.info files. They have been generated from the Makefiles in the same directories. Things that are platform specific will appear in later commits. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-01-29Templatize util/domdRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
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 <viktor@openssl.org>
2016-01-20Remove update tagsRich Salz
Also remove depend/local_depend. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Remove some old makefile targetsRich Salz
Remove lint, tags, dclean, tests. This is prep for a new makedepend scheme. This is temporary pending unified makefile, and might help it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-12Move Makefiles to Makefile.inRich Salz
Create Makefile's from Makefile.in Rename Makefile.org to Makefile.in Rename Makefiles to Makefile.in Address review feedback from Viktor and Richard Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte
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 <matt@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-12-01ex_data part 2: doc fixes and CRYPTO_free_ex_index.Rich Salz
Add CRYPTO_free_ex_index (for shared libraries) Unify and complete the documentation for all "ex_data" API's and objects. Replace xxx_get_ex_new_index functions with a macro. Added an exdata test. Renamed the ex_data internal datatypes. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-05Rebuild error source files.Dr. Stephen Henson
Rebuild error source files: the new mkerr.pl functionality will now pick up and translate static function names properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-29Fix no-stdio buildDavid Woodhouse
Much related/similar work also done by Ivan Nestlerode <ivan.nestlerode@sonos.com> +Replace FILE BIO's with dummy ops that fail. +Include <stdio.h> for sscanf() even with no-stdio (since the declaration is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment variable, since it can be larger than a 'long'. And we don't rely on the availability of strtoull(). +Remove OPENSSL_stderr(); not used. +Make OPENSSL_showfatal() do nothing (currently without stdio there's nothing we can do). +Remove file-based functionality from ssl/. The function prototypes were already gone, but not the functions themselves. +Remove unviable conf functionality via SYS_UEFI +Add fallback definition of BUFSIZ. +Remove functions taking FILE * from header files. +Add missing DECLARE_PEM_write_fp_const +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out, so remove its prototype. +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid(). +Eliminate SRP_VBASE_init() and supporting functions. Users will need to build the verifier manually instead. +Eliminate compiler warning for unused do_pk8pkey_fp(). +Disable TEST_ENG_OPENSSL_PKEY. +Disable GOST engine as is uses [f]printf all over the place. +Eliminate compiler warning for unused send_fp_chars(). Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-03remove 0 assignments.Rich Salz
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-02Add and use OPENSSL_zallocRich Salz
There are many places (nearly 50) where we malloc and then memset. Add an OPENSSL_zalloc routine to encapsulate that. (Missed one conversion; thanks Richard) Also fixes GH328 Reviewed-by: Richard Levitte <levitte@openssl.org>