summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/ameth_lib.c
AgeCommit message (Collapse)Author
2016-11-03Convert asn1 selftests (a_strnid and ameth_lib) into internal testRichard Levitte
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-08-17Convert X509* functions to use const gettersDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-17Constify private key decode.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-13Add X25519 methods to internal tablesDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-17Copyright consolidation 09/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-20Remove #error from include files.Rich Salz
Don't have #error statements in header files, but instead wrap the contents of that file in #ifndef OPENSSL_NO_xxx This means it is now always safe to include the header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-18Fix no-cmacMatt Caswell
There were a couple of CMAC references without OPENSSL_NO_CMAC guards. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-20make EVP_PKEY opaqueDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Only declare stacks in headersDr. Stephen Henson
Don't define stacks in C source files: it causes warnings about unused functions in some compilers. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson
Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-07Fix declarations and constification for inline stack.Dr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@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-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-09-11Enable -Wmissing-variable-declarations andBen Laurie
-Wincompatible-pointer-types-discards-qualifiers (the latter did not require any code changes). Reviewed-by: Rich Salz <rsalz@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>
2015-06-03Add funtions to set item_sign and item_verifySergey Agievich
PR#3872 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org> (cherry picked from commit ad0fb7f4988c8a717fe6bcb035304385fbdaef41) Conflicts: crypto/asn1/ameth_lib.c
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
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>
2015-05-06Use "==0" instead of "!strcmp" etcRich Salz
For the various string-compare routines (strcmp, strcasecmp, str.*cmp) use "strcmp()==0" instead of "!strcmp()" Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-05memset, memcpy, sizeof consistency fixesRich Salz
Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-04Use safer sizeof variant in mallocRich Salz
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>
2015-05-03Add OSSL_NELEM macro.Dr. Stephen Henson
Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-01free null cleanup finaleRich Salz
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-24Move some ASN.1 internals to asn1_int.hDr. Stephen Henson
Move ASN.1 internals used across multiple directories into new internal header file asn1_int.h remove crypto/Makefile hack which allowed other directories to include "asn1_locl.h" Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-06-27Memory leak and NULL dereference fixes.Dr. Stephen Henson
PR#3403
2014-03-28Add functions returning security bits.Dr. Stephen Henson
Add functions to return the "bits of security" for various public key algorithms. Based on SP800-57.
2011-12-07Initial experimental support for X9.42 DH parameter format to handleDr. Stephen Henson
RFC5114 parameters and X9.42 DH public and private keys.
2011-10-11update pkey method initialisation and copyDr. Stephen Henson
2011-01-13stop warning with no-engineDr. Stephen Henson
2010-02-08Make CMAC API similar to HMAC API. Add methods for CMAC.Dr. Stephen Henson
2009-12-02Check it actually compiles this time ;-)Dr. Stephen Henson
2009-12-02PR: 2120Dr. Stephen Henson
Submitted by: steve@openssl.org Initialize fields correctly if pem_str or info are NULL in EVP_PKEY_asn1_new().
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-05Update obsolete email address...Dr. Stephen Henson
2008-11-01More size_tification.Ben Laurie
2008-10-22Create function of the form OBJ_bsearch_xxx() in bsearch typesafe macrosDr. Stephen Henson
with the appropriate parameters which calls OBJ_bsearch(). A compiler will typically inline this. This avoids the need for cmp_xxx variables and fixes unchecked const issues with CHECKED_PTR_OF()
2008-10-20Fix a shed load or warnings:Dr. Stephen Henson
Duplicate const. Use of ; outside function.
2008-10-12Type-checked (and modern C compliant) OBJ_bsearch.Ben Laurie
2008-07-04Avoid warnings with -pedantic, specifically:Dr. Stephen Henson
Conversion between void * and function pointer. Value computed not used. Signed/unsigned argument.
2008-06-04More type-checking.Ben Laurie
2007-11-21Lookup public key ASN1 methods by string by iterating through allDr. Stephen Henson
implementations instead of all added ENGINEs to cover case where an ENGINE is not added.
2007-05-17Prepend signature name in dgst output.Dr. Stephen Henson
2007-05-15New function EVP_PKEY_asn1_copy(). Use default MD if type param is NULL.Dr. Stephen Henson
2007-04-11Experimental HMAC support via EVP_PKEY_METHOD.Dr. Stephen Henson
2006-10-27Initialize old_priv_encode, old_priv_decode.Dr. Stephen Henson
2006-06-05Complete EVP_PKEY_ASN1_METHOD ENGINE support.Dr. Stephen Henson
2006-04-21Add 'flags' parameter to EVP_PKEY_asn1_meth_new() to set algorithm flags.Dr. Stephen Henson
2006-04-17Allow public key ASN1 methods to set PKCS#7 SignerInfo structures.Dr. Stephen Henson
2006-04-17Fix (most) WIN32 warnings and errors.Dr. Stephen Henson