summaryrefslogtreecommitdiffstats
path: root/crypto/o_str.c
AgeCommit message (Collapse)Author
2017-06-20Address some -Wold-style-declaration warningsBenjamin Kaduk
gcc's -Wextra pulls in -Wold-style-declaration, which triggers when a declaration has a storage-class specifier as a non-initial qualifier. The ISO C formal grammar requires the storage-class to be the first component of the declaration, if present. Seeint as the register storage-class specifier does not really have any effect anymore with modern compilers, remove it entirely while we're here, instead of fixing up the order. Interestingly, the gcc devteam warnings do not pull in -Wextra, though the clang ones do. [extended tests] Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3239) (cherry picked from commit f44903a428cc63ce88bfba26e8e4e2e9b21f058d)
2017-02-23Add -Wundef to strict-warningsRich Salz
Avoid a -Wundef warning in o_str.c Avoid a -Wundef warning in testutil.h Include internal/cryptlib.h before openssl/stack.h to avoid use of undefined symbol OPENSSL_API_COMPAT. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2709)
2016-06-21buf2hexstr: properly deal with empty stringKurt Roeckx
It wrote before the start of the string found by afl Reviewed-by: Richard Levitte <levitte@openssl.org> MR: #2994
2016-05-28Remove internal functions OPENSSL_strcasecmp and OPENSSL_strncasecmpRichard Levitte
Their only reason to exist was that they didn't exist in VMS before version 7.0. We do not support such old versions any more. However, for the benefit of systems that don't get strings.h included by string.h, we include the former in e_os.h. RT#4458 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-05-27crypto/o_str.c: add _GNU_SOURCE strerror_r case.Andy Polyakov
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-27crypto/o_str.c: strerror_s is provided by specific compiler run-time,Andy Polyakov
not by OS [as was implied by guarding #if condition]. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-23Use strerror_r()/strerror_s() instead of strerror() where possibleMatt Caswell
The function strerror() is not thread safe. We should use strerror_r() where possible, or strerror_s() on Windows. RT#2267 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 04/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-18Unsigned chars can't be negativeMatt Caswell
Fix a problem where an unsigned char was being checked to see if it was negative. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-18Make string_to_hex/hex_to_string publicRich Salz
Give the API new names, document it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-26Fix master compile errorMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-26GH680: Reuse strnlen() in strndup()Dmitry-Me
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-03GH614: Use memcpy()/strdup() when possibleDmitry-Me
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@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>
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-05-14Identify and move OpenSSL internal header filesRichard Levitte
There are header files in crypto/ that are used by the rest of OpenSSL. Move those to include/internal and adapt the affected source code, Makefiles and scripts. The header files that got moved are: crypto/constant_time_locl.h crypto/o_dir.h crypto/o_str.h Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-23ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz
Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2013-01-19Improve WINCE support.Andy Polyakov
Submitted by: Pierre Delaage
2009-06-01PR: 1945Dr. Stephen Henson
Submitted by: Guenter <lists@gknw.net> Approved by: steve@openssl.org Netware compilation fix for nonexistent header.
2008-01-14<strings.h> does not exist under WIN32.Dr. Stephen Henson
2008-01-12Missing headers.Ben Laurie
2005-09-20"Overload" SunOS 4.x memcmp, which ruins ASN1_OBJECT table lookups.Andy Polyakov
PR: 1196 Submitted by: Russel Ruby
2005-01-13Rely on e_os.h to appropriately define str[n]casecmp in non-POSIXAndy Polyakov
environments.
2004-12-31Borrow #include <string[s].h> from e_os.h.Andy Polyakov
2004-07-08o_str.c: Windows doesn't have <strings.h>, and since we use _strnicmp() andRichard Levitte
_stricmp() on that platform, use the appropriate header file for it, <string.h>. o_str.h: we only want to get size_t, which is defined in <stddef.h>. Philippe Bougeret <philippe.bougeret@freesbee.fr> notified us about Windows not having a <strings.h>
2004-05-13Synchronise o_str.c between 0.9.8-dev and 0.9.7-stable.Richard Levitte
2004-03-24Typo...Richard Levitte
2004-03-24Make sure toupper() is properly declared.Richard Levitte
2003-12-27Include strings.h so strcasecmp() and strncasecmp() get properly declared.Richard Levitte
2003-09-09Typos.Dr. Stephen Henson
2003-09-09Generalise the definition of strcasecmp() and strncasecmp() forRichard Levitte
platforms that don't (necessarely) have it. In the case of VMS, this means moving a couple of functions from apps/ to crypto/ and make them general (although only used privately).