aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ui/ui_lib.c
Commit message (Collapse)AuthorAgeFilesLines
* Add checks on sk_TYPE_push() returned valueFdaSilvaYY2016-07-051-2/+6
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Constify UIFdaSilvaYY2016-06-151-1/+1
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Add some error messages for malloc failsMatt Caswell2016-05-181-0/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Better checks for malloc failure in various METHOD functionsMatt Caswell2016-05-181-1/+6
| | | | | | A number of the METHOD functions weren't properly handling malloc failures. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation 05/10Rich Salz2016-05-171-54/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add checks on CRYPTO_new_ex_data return valueFdaSilvaYY2016-04-281-1/+4
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/996)
* Convert CRYPTO_LOCK_UI to new multi-threading APIAlessandro Ghedini2016-03-081-0/+9
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* GH601: Various spelling fixes.FdaSilvaYY2016-02-051-2/+2
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | 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>
* Remove the "eay" c-file-style indicatorsRichard Levitte2015-12-181-1/+1
| | | | | | | 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>
* Rename some BUF_xxx to OPENSSL_xxxRich Salz2015-12-161-15/+15
| | | | | | | | | 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>
* ex_data part 2: doc fixes and CRYPTO_free_ex_index.Rich Salz2015-12-011-7/+0
| | | | | | | | | | 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>
* Continue standardising malloc style for libcryptoMatt Caswell2015-11-091-2/+2
| | | | | | | Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* remove 0 assignments.Rich Salz2015-09-031-4/+1
| | | | | | | After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Add and use OPENSSL_zallocRich Salz2015-09-021-4/+2
| | | | | | | | | 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>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-1/+1
| | | | | | | | | | | | | 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: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-041-3/+3
| | | | | | | | | | | | | For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* free null cleanup finaleRich Salz2015-05-011-8/+4
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove malloc castsRich Salz2015-04-281-5/+4
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* util/mkstack.pl now generates entire safestack.hRich Salz2015-02-061-2/+0
| | | | | | | | | The mkstack.pl script now generates the entire safestack.h file. It generates output that follows the coding style. Also, removed all instances of the obsolete IMPLEMENT_STACK_OF macro. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-774/+720
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* UI_construct_prompt: check for NULL when allocating promptJonas Maebe2014-08-171-0/+2
| | | | | Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* * crypto/ui/ui_lib.c: misplaced brace in switch statement.Richard Levitte2014-07-131-1/+1
| | | | Detected by dcruette@qualitesys.com
* PR: 2188Dr. Stephen Henson2010-03-091-0/+19
| | | | | | Submitted By: Jaroslav Imrich <jaroslav.imrich@disig.sk> Add "missing" functions to get and set prompt constructor.
* Data not initialised.Richard Levitte2009-02-161-0/+1
| | | | Notified by Gerardo Ganis <gerardo.ganis@cern.ch>
* improved error checking and some fixesNils Larsch2005-07-261-1/+3
| | | | | | PR: 1170 Submitted by: Yair Elharrar Reviewed and edited by: Nils Larsch
* Move cryptlib.h prior bio.h. Actually it makes sense to include cryptlib.hAndy Polyakov2005-05-171-1/+1
| | | | | first everywhere in crypto and skip stdio.h and string.h [because it includes them].
* Give everything prototypes (well, everything that's actually used).Ben Laurie2005-03-311-1/+1
|
* Use BUF_strlcpy() instead of strcpy().Richard Levitte2003-12-271-6/+7
| | | | | | | Use BUF_strlcat() instead of strcat(). Use BIO_snprintf() instead of sprintf(). In some cases, keep better track of buffer lengths. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
* Correct a misleading comment.Richard Levitte2003-01-131-1/+1
| | | | PR: 456
* Only check for a result buffer if the allocated string is a prompt string.Richard Levitte2002-12-051-1/+2
| | | | PR: 381
* Security fixes brought forward from 0.9.7.Ben Laurie2002-11-131-2/+3
|
* Make the necessary changes to work with the recent "ex_data" overhaul.Geoff Thorpe2001-09-011-7/+4
| | | | | | | | | | | See the commit log message for that for more information. NB: X509_STORE_CTX's use of "ex_data" support was actually misimplemented (initialisation by "memset" won't/can't/doesn't work). This fixes that but requires that X509_STORE_CTX_init() be able to handle errors - so its prototype has been changed to return 'int' rather than 'void'. All uses of that function throughout the source code have been tracked down and adjusted.
* The indexes returned by ***_get_ex_new_index() functions are used whenGeoff Thorpe2001-08-121-3/+4
| | | | | | | | setting stack (actually, array) values in ex_data. So only increment the global counters if the underlying CRYPTO_get_ex_new_index() call succeeds. This change doesn't make "ex_data" right (see the comment at the head of ex_data.c to know why), but at least makes the source code marginally less frustrating.
* One forgotten function.Richard Levitte2001-07-111-0/+8
|
* Change info to correct values.Richard Levitte2001-07-051-3/+3
|
* Make sure we don't return 0 on error.Richard Levitte2001-06-241-0/+5
|
* Implement boolean (yes/no or OK/Cancel, ...) input.Richard Levitte2001-06-231-36/+314
| | | | | | | | Implement UI controls. Current controls are the possibility to output the OpenSSL error stack on the same channel from within UI_process() and to check if the same user interface can be redone without being rebuilt (this is often more a question of philosophy than technicalities).
* In UI_dup_*() function, use the duped string, not the original.Dr. Stephen Henson2001-06-231-3/+5
|
* Since there is a way to create UI_METHODs, implement a destructor asRichard Levitte2001-06-201-16/+17
| | | | | | | well. This probably requires reference counters and locks as well. To be implemented later.
* Enhance the user interface with better support for dialog boxRichard Levitte2001-06-191-31/+109
| | | | | | prompting, application-defined prompts, the possibility to use defaults (for example default passwords from somewhere else) and interrupts/cancelations.
* Initialize UI ex_data.Dr. Stephen Henson2001-06-111-1/+1
|
* Don't forget to initialise.Richard Levitte2001-06-061-0/+2
|
* Defining __USE_XOPEN_EXTENDED was the wrong thing. Instead, defineRichard Levitte2001-06-051-1/+2
| | | | _XOPEN_SOURCE.
* A good use of the UI interface is as a password callback replacementRichard Levitte2001-06-051-0/+12
| | | | | | | | | | (for new functions...). One might still want to be able to pass down a user-data pointer to be used by the UI. However, ex_data doesn't quite cut it, since that means the appropriate index to it might need to be shared between parts that aren't really related in that sense, and would require the currently hidden (static) index holders to be uncovered. Not a good thing. Therefore, add the possibility to add a user-data pointer to a UI.
* Make sure strdup() is properly declared.Richard Levitte2001-05-141-0/+9
|
* Fix warning with DEBUG_SAFESTACKDr. Stephen Henson2001-05-101-2/+1
|
* Add a general user interface API. This is designed to replace thingsRichard Levitte2001-05-061-0/+506
like des_read_password and friends (backward compatibility functions using this new API are provided). The purpose is to remove prompting functions from the DES code section as well as provide for prompting through dialog boxes in a window system and the like.