aboutsummaryrefslogtreecommitdiff
path: root/crypto/info.c
AgeCommit message (Collapse)AuthorFilesLines
2023-03-14Update copyright yearMatt Caswell1-1/+1
Reviewed-by: Tomas Mraz <tomas@openssl.org> Release: yes (Merged from https://github.com/openssl/openssl/pull/20508)
2023-01-10info.c: Fix typos in seed macro name and description stringGreg McLearn1-2/+2
Fixes: #19996 CLA: trivial Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20001) (cherry picked from commit 9c3de015121fb4ebbecccfbbda9eed8d4a3cb2d5)
2022-12-22Fix possible UB in init_info_stringsBernd Edlinger1-4/+4
"openssl version -c" may create undefined behavior in the shift: crypto/info.c:42:50: runtime error: left shift of 4275712515 by 32 places cannot be represented in type 'long long int' Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19668) (cherry picked from commit ee17dcc7ffbd6621f82838c75792f19aa97bd5d7)
2022-12-01Update copyright yearTomas Mraz1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> Release: yes (Merged from https://github.com/openssl/openssl/pull/19803)
2022-11-11Move e_os.h to include/internalRichard Levitte1-1/+1
Including e_os.h with a path from a header file doesn't work well on certain exotic platform. It simply fails to build. Since we don't seem to be able to stop ourselves, the better move is to move e_os.h to an include directory that's part of the inclusion path given to the compiler. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17641) (cherry picked from commit d5f9166bacfb3757dfd6117310ad54ab749b11f9) Reviewed-by: Hugo Landau <hlandau@openssl.org>
2022-11-09Add support for RNDRRS ProviderOrr Toledano1-0/+4
Create new provider for RNDRRS. Modify support for rand_cpu to default to RDRAND/RDSEED on x86 and RNDRRS on aarch64. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15361) (cherry picked from commit eb28fda79748c303d88a8af48de5187100f2c64c)
2020-06-22Print CPUINFO also for s390 processorsPatrick Steuer1-1/+43
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12216)
2020-04-23Update copyright yearMatt Caswell1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11616)
2020-01-07Modify the add_seeds_stringlist() macro to fix a preprocessor errorDr. Matthias St. Pierre1-5/+6
When OpenSSL is configured using `--with-rand-seed=devrandom`, the preprocessor reports the following error crypto/info.c:104:66: error: macro "add_seeds_stringlist" passed 3 arguments, but takes just 2 add_seeds_stringlist("random-device", { DEVRANDOM, NULL }); The reason why the preprocessor complains about three arguments being passed is that according to [1], balanced braces in macro arguments don't prevent the comma from acting as an argument separator: 3.3 Macro Arguments ... Parentheses within each argument must balance; a comma within such parentheses does not end the argument. However, there is no requirement for square brackets or braces to balance, and they do not prevent a comma from separating arguments. Also introduced an iteration pointer `p`, because `dev` is not an lvalue: crypto/info.c:78:41: error: lvalue required as increment operand for (; *dev != NULL; dev++) { [1] https://gcc.gnu.org/onlinedocs/cpp/Macro-Arguments.html Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10762)
2020-01-07Move random-related defines to "crypto/rand.h"Dr. Matthias St. Pierre1-0/+1
This fixes commit 01036e2afbe116d608be048ed15930fc885ab2a8, which moved the DEVRANDOM and DEVRANDOM_EGD defines into rand_unix.c. That change introduced the regression that the compiler complains about missing declarations in crypto/info.c when OpenSSL is configured using `--with-rand-seed=devrandom` (resp. `--with-rand-seed=egd`) Fixes #10759 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10762)
2019-09-28Reorganize private crypto header filesDr. Matthias St. Pierre1-1/+1
Currently, there are two different directories which contain internal header files of libcrypto which are meant to be shared internally: While header files in 'include/internal' are intended to be shared between libcrypto and libssl, the files in 'crypto/include/internal' are intended to be shared inside libcrypto only. To make things complicated, the include search path is set up in such a way that the directive #include "internal/file.h" could refer to a file in either of these two directoroes. This makes it necessary in some cases to add a '_int.h' suffix to some files to resolve this ambiguity: #include "internal/file.h" # located in 'include/internal' #include "internal/file_int.h" # located in 'crypto/include/internal' This commit moves the private crypto headers from 'crypto/include/internal' to 'include/crypto' As a result, the include directives become unambiguous #include "internal/file.h" # located in 'include/internal' #include "crypto/file.h" # located in 'include/crypto' hence the superfluous '_int.h' suffixes can be stripped. The files 'store_int.h' and 'store.h' need to be treated specially; they are joined into a single file. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
2019-09-02Add CPU info to the speed command summaryBernd Edlinger1-2/+50
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9669)
2019-08-27OPENSSL_info(): add the item OPENSSL_INFO_SEED_SOURCE and use itRichard Levitte1-0/+71
'openssl version -r' prints the seed source based on compiler macros. This does not necessarily reflect the library's idea of what seed sources to use, so we reimplement the list of seed sources as a OPENSSL_info() item and display that instead. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9689)
2019-04-23Add a way for the application to get OpenSSL configuration dataRichard Levitte1-0/+44
OpenSSL_version(OPENSSL_DIR) gives you a nicely formatted string for display, but if all you really want is the directory itself, you were forced to parsed the string. This introduces a new function to get diverse configuration data from the library, OPENSSL_info(). This works the same way as OpenSSL_version(), but has its own series of types, currently including: OPENSSL_INFO_CONFIG_DIR returns OPENSSLDIR OPENSSL_INFO_ENGINES_DIR returns ENGINESDIR OPENSSL_INFO_MODULES_DIR returns MODULESDIR OPENSSL_INFO_DSO_EXTENSION returns DSO_EXTENSION OPENSSL_INFO_DIR_FILENAME_SEPARATOR returns directory/filename separator OPENSSL_INFO_LIST_SEPARATOR returns list separator For scripting purposes, this also adds the command 'openssl info'. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8709)