summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/asn1_gen.c
AgeCommit message (Collapse)Author
2016-06-04Constify ASN1_generate_nconfFdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1074)
2016-06-04Constify ASN1_generate_v3FdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1074)
2016-06-04Constify s2i_ASN1_INTEGERFdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1074)
2016-05-17Copyright consolidation 08/10Rich Salz
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-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-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-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-11Use p==NULL not !p (in if statements, mainly)Rich Salz
Reviewed-by: Tim Hudson <tjh@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-06Initialize potentially uninitialized local variablesGunnar Kudrjavets
Compiling OpenSSL code with MSVC and /W4 results in a number of warnings. One category of warnings is particularly interesting - C4701 (potentially uninitialized local variable 'name' used). This warning pretty much means that there's a code path which results in uninitialized variables being used or returned. Depending on compiler, its options, OS, values in registers and/or stack, the results can be nondeterministic. Cases like this are very hard to debug so it's rational to fix these issues. This patch contains a set of trivial fixes for all the C4701 warnings (just initializing variables to 0 or NULL or appropriate error code) to make sure that deterministic values will be returned from all the execution paths. RT#3835 Signed-off-by: Matt Caswell <matt@openssl.org> Matt's note: All of these appear to be bogus warnings, i.e. there isn't actually a code path where an unitialised variable could be used - its just that the compiler hasn't been able to figure that out from the logic. So this commit is just about silencing spurious warnings. Reviewed-by: Rich Salz <rsalz@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 11Rich Salz
Don't check for NULL before calling free functions. This gets: ERR_STATE_free ENGINE_free DSO_free CMAC_CTX_free COMP_CTX_free CONF_free NCONF_free NCONF_free_data _CONF_free_data A sk_free use within OBJ_sigid_free TS_TST_INFO_free (rest of TS_ API was okay) Doc update for UI_free (all uses were fine) X509V3_conf_free X509V3_section_free X509V3_string_free Reviewed-by: Richard Levitte <levitte@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-04-30free NULL cleanup 8Rich Salz
Do not check for NULL before calling a free routine. This addresses: ASN1_BIT_STRING_free ASN1_GENERALIZEDTIME_free ASN1_INTEGER_free ASN1_OBJECT_free ASN1_OCTET_STRING_free ASN1_PCTX_free ASN1_SCTX_free ASN1_STRING_clear_free ASN1_STRING_free ASN1_TYPE_free ASN1_UTCTIME_free M_ASN1_free_of Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-16Reject empty generation strings.Dr. Stephen Henson
Reported by Hanno Böck <hanno@hboeck.de> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-04-16Limit depth of nested sequences when generating ASN.1Dr. Stephen Henson
Reported by Hanno Böck <hanno@hboeck.de> PR#3800 Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-11Fix seg fault in ASN1_generate_v3/ASN1_generate_nconfMatt Caswell
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-03-09Fix wrong numbers being passed as string lengthsDmitry-Me
Signed-off-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-29clang on Linux x86_64 complains about unreachable code.Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-01-24Fix segfault with empty fields as last in the config.Kurt Roeckx
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>
2014-08-11Fix d4a4370050f7d72239b92a60ab9d4a2dd5e9fd84Dr Stephen Henson
Fully remove old error, per drH Reviewed-by: rsalz
2012-10-22New config module for string tables. This can be used to add newDr. Stephen Henson
multi string components (as used in DN fields or request attributes) or change the values of existing ones.
2009-11-10PR: 2090Dr. Stephen Henson
Submitted by: Martin Kaiser <lists@kaiser.cx>, Stephen Henson Approved by: steve@openssl.org Improve error checking in asn1_gen.c
2009-02-10Submitted by: Peter Sylvester <Peter.Sylvester@edelweb.fr>Dr. Stephen Henson
Reviewed by: steve If tagging is universal and SET or SEQUENCE set constructed bit.
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-01size_tification.Ben Laurie
2007-10-13Bunch of constifications.Andy Polyakov
2006-11-16Initial, incomplete support for typesafe macros without using functionDr. Stephen Henson
casts.
2006-03-15fix problems found by coverity: remove useless codeNils Larsch
2006-01-19Fixes for BOOL handling: produce errors for invalid string for mini-compiler,Dr. Stephen Henson
correctly encode FALSE for BOOL in ASN1_TYPE.
2006-01-14support numeric strings in ASN1_generate_nconfNils Larsch
2005-05-09Update util/ck_errf.pl script, and have it run automaticallyBodo Möller
during "make errors" and thus during "make update". Fix lots of bugs that util/ck_errf.pl can detect automatically. Various others of these are still left to fix; that's why "make update" will complain loudly when run now.
2005-04-23make asn.1 field names constNils Larsch
2005-03-31Give everything prototypes (well, everything that's actually used).Ben Laurie
2004-03-15Constify d2i, s2i, c2i and r2i functions and other associatedRichard Levitte
functions and macros. This change has associated tags: LEVITTE_before_const and LEVITTE_after_const. Those will be removed when this change has been properly reviewed.
2003-10-29A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
2003-02-20Ooops forgot to recognise V_ASN1_GENERALSTRING.Dr. Stephen Henson
2003-02-18Typo.Dr. Stephen Henson
2003-02-11GeneralString support in mini-ASN1 compilerDr. Stephen Henson
2002-11-15Add SETWRAP modifier to ASN1 generate.Dr. Stephen Henson
2002-11-13Fix warnings, makefile cockup.Ben Laurie
2002-11-13Only accept exact match for modifier or tag nameDr. Stephen Henson
2002-11-12Initial ASN1 generation code. This can constructDr. Stephen Henson
arbitrary encodings from strings and config files. Documentation to follow...