summaryrefslogtreecommitdiff
path: root/crypto/err/err_prn.c
Commit message (Collapse)AuthorAgeFilesLines
* err: remove TODOsPauli2021-06-021-1/+0
| | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15539)
* Update copyright yearMatt Caswell2021-04-081-1/+1
| | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14801)
* Fix misc external ossl_ symbols.Shane Lontis2021-03-181-2/+1
| | | | | | | Partial fix for #12964 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14473)
* ERR: Restore the similarity of ERR_print_error_cb() and ERR_error_string_n()Richard Levitte2020-11-271-28/+10
| | | | | Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13510)
* ERR: special case system errorsRichard Levitte2020-07-051-3/+23
| | | | | | | | | | | | | | | | | | | | | | | Because system errors can be any positive number that fits in an 'int' according to POSIX, we can't reasonably expect them to be in the 1..127 range, even though that's the most usual. Instead of packing them into the OpenSSL error code structure, we recognise them as a special case and mark them as such by storing them in our error queue with the highest bit set. We make OpenSSL specific error records have their highest bit cleared, and in doing so, we shift down the library section of the code by one bit. This still leaves a very large section for the reason codes. Of course, we must adapt the error code and reason string extraction and printing functions accordingly. With this, we also thrown away the pre-loaded array of system error strings, and extract them from the system when needed instead, i.e. when we create error strings. Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/12343)
* Fix ERR_print_errors so that it matches the documented format in ↵Shane Lontis2020-05-261-2/+3
| | | | | | | | | | | | | | | | | | | doc/man3/ERR_error_string.pod Fixes #11743 The ouput format had 2 issues that caused it not to match the expected documented format: (1) At some point the thread id printing was changed to use the OPENSSL_hex2str method which puts ':' between hex bytes. An internal function that skips the seperator has been added. (2) The error code no longer exists. So this was completely removed from the string. It is now replaced by :: As an example: 00:77:6E:52:14:7F:00:00:error:asn1 encoding routines:asn1_check_tlen:wrong tag:crypto/asn1/tasn_dec.c:1135: Is now: 00776E52147F0000:error::asn1 encoding routines:asn1_check_tlen:wrong tag:crypto/asn1/tasn_dec.c:1135: Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11789)
* Update copyright yearMatt Caswell2020-04-231-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11616)
* fix two mistakes w.r.t. ERR_LIB_* parameters in ERR_add_error_txt()Dr. David von Oheimb2020-03-101-2/+2
| | | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/11142)
* chunk 7 of CMP contribution to OpenSSLDr. David von Oheimb2020-02-171-1/+119
| | | | | | | | | | | | | add CMP message validation and related tests; while doing so: * add ERR_add_error_mem_bio() to crypto/err/err_prn.c * move ossl_cmp_add_error_txt() as ERR_add_error_txt() to crypto/err/err_prn.c * add X509_STORE_CTX_print_verify_cb() to crypto/x509/t_x509.c, adding internally x509_print_ex_brief(), print_certs(), and print_store_certs() * move {ossl_cmp_,}X509_STORE_get1_certs() to crypto/x509/x509_lu.c Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/10620)
* Check the return from OPENSSL_buf2hexstr()Matt Caswell2019-11-291-1/+2
| | | | | | | | | | | | The function OPENSSL_buf2hexstr() can return NULL if it fails to allocate memory so the callers should check its return value. Fixes #10525 Reported-by: Ziyang Li (@Liby99) Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/10526)
* Reorganize local header filesDr. Matthias St. Pierre2019-09-281-1/+1
| | | | | | | | | | | | | 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 <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
* Deprecate the public definition of ERR_STATERichard Levitte2019-09-121-0/+3
| | | | | | | The intention is to make it opaque later on. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9462)
* Modernise ERR_print_errors_cb()Richard Levitte2019-09-121-8/+14
| | | | | | | | | | | | ERR_print_errors_cb() used functionality that isn't suitable any more, as that functionality couldn't integrate the error record function name strings. We therefore refactor it a bit to use better adapted methods. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
* Print thread IDs nicely.Pauli2019-06-211-15/+7
| | | | | | | | | | Remove the union that effectively cast thread IDs to long integers before display and instead print a hex dump of the entire object. Refer #9191 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9194)
* Following the license change, modify the boilerplates in crypto/err/Richard Levitte2018-12-061-1/+1
| | | | | | | [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7793)
* Consistent formatting for sizeof(foo)Rich Salz2017-12-071-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4872)
* Remove unnecessary #include <openssl/lhash.h> directives.Pauli2017-09-291-2/+1
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4431)
* Copyright consolidation 05/10Rich Salz2016-05-171-54/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fold threads.h into crypto.h making API publicViktor Dukhovni2016-05-161-1/+0
| | | | | | Document thread-safe lock creation Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix a big leak when using stack-allocated BIO items.FdaSilvaYY2016-03-291-17/+12
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove the old threading APIMatt Caswell2016-03-091-5/+13
| | | | | | | | | | All OpenSSL code has now been transferred to use the new threading API, so the old one is no longer used and can be removed. We provide some compat macros for removed functions which are all no-ops. There is now no longer a need to set locking callbacks!! Reviewed-by: Richard Levitte <levitte@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>
* 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>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-44/+43
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz2015-01-141-1/+1
| | | | | | | | | | OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160 OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO Two typo's on #endif comments fixed: OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE Reviewed-by: Richard Levitte <levitte@openssl.org>
* PR: 2253Dr. Stephen Henson2010-05-151-1/+2
| | | | | | Submitted By: Ger Hobbelt <ger@hobbelt.com> Check callback return value when outputting errors.
* Remove the dual-callback scheme for numeric and pointer thread IDs,Geoff Thorpe2008-08-061-1/+3
| | | | | | | | | deprecate the original (numeric-only) scheme, and replace with the CRYPTO_THREADID object. This hides the platform-specifics and should reduce the possibility for programming errors (where failing to explicitly check both thread ID forms could create subtle, platform-specific bugs). Thanks to Bodo, for invaluable review and feedback.
* Revert my earlier CRYPTO_THREADID commit, I will commit a reworkedGeoff Thorpe2008-07-031-3/+1
| | | | version some time soon.
* There was a need to support thread ID types that couldn't be reliably castGeoff Thorpe2008-03-281-1/+3
| | | | | | | | | | | | | | to 'unsigned long' (ie. odd platforms/compilers), so a pointer-typed version was added but it required portable code to check *both* modes to determine equality. This commit maintains the availability of both thread ID types, but deprecates the type-specific accessor APIs that invoke the callbacks - instead a single type-independent API is used. This simplifies software that calls into this interface, and should also make it less error-prone - as forgetting to call and compare *both* thread ID accessors could have led to hard-to-debug/infrequent bugs (that might only affect certain platforms or thread implementations). As the CHANGES note says, there were corresponding deprecations and replacements in the thread-related functions for BN_BLINDING and ERR too.
* Move cryptlib.h prior bio.h. Actually it makes sense to include cryptlib.hAndy Polyakov2005-05-171-2/+7
| | | | | first everywhere in crypto and skip stdio.h and string.h [because it includes them].
* makedepend complains when a header file is included more than once inRichard Levitte2002-10-141-1/+0
| | | | the same source file.
* Translate into valid C (don't call functions with wrong prototypes).Bodo Möller2001-06-251-10/+6
|
* New error printing function that gives the possibility to print theRichard Levitte2001-06-231-23/+27
| | | | errors through an arbitrary function.
* Make all configuration macros available for application by makingRichard Levitte2001-02-191-1/+1
| | | | | | | | | | | | sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
* New function ERR_error_string_n.Bodo Möller2000-04-141-2/+4
|
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-5/+5
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-4/+2
|
* Massive constification.Ben Laurie1999-04-171-2/+2
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-11/+16
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+102