aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/asn1_locl.h
AgeCommit message (Collapse)AuthorFilesLines
2017-10-24asn1_item_embed_new(): don't free an embedded itemRichard Levitte1-0/+1
The previous change with this intention didn't quite do it. An embedded item must not be freed itself, but might potentially contain non-embedded elements, which must be freed. So instead of calling ASN1_item_ex_free(), where we can't pass the embed flag, we call asn1_item_embed_free() directly. This changes asn1_item_embed_free() from being a static function to being a private non-static function. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/4579)
2017-08-04Consolidate to a single asn1_time_from_tm() functionTodd Short1-0/+2
Add missing ASN1_TIME functions Do some cleanup of the ASN1_TIME code. Add ASN1_TIME_normalize() to normalize ASN1_TIME structures. Add ASN1_TIME_compare() to compare two ASN1_TIME structures. Add ASN1_TIME_cmp_time_t() to compare an ASN1_TIME to time_t (generic version of ASN1_UTCTIME_cmp_time_t()). Replace '0' .. '9' compares with isdigit() Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2753)
2017-07-27Fix trivial coding style nits in a_time/a_tm filesPauli1-3/+0
Clean up some true/false returns Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4001)
2017-07-24Add asn1_time_to_tm function and check days in monthPaul Yang1-0/+1
Based on discussion in PR #3566. Reduce duplicated code in original asn1_utctime_to_tm and asn1_generalizedtime_to_tm, and introduce a new internal function asn1_time_to_tm. This function also checks if the days in the input time string is valid or not for the corresponding month. Test cases are also added. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/3905)
2017-04-04Implement internal ASN.1 types INT32, UINT32, INT64, UINT64Richard Levitte1-1/+5
Also Z varieties. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3088)
2016-10-17Fix embedded string handling.Dr. Stephen Henson1-1/+3
Don't rely on embedded flag to free strings correctly: it wont be set if there is a malloc failure during initialisation. Thanks to Guido Vranken for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1725)
2016-05-17Copyright consolidation 09/10Rich Salz1-54/+5
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz1-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>
2016-01-07Only declare stacks in headersDr. Stephen Henson1-0/+5
Don't define stacks in C source files: it causes warnings about unused functions in some compilers. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-22Move certificate request and CRL routines to x509 dir.Dr. Stephen Henson1-18/+0
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-22Move functions.Dr. Stephen Henson1-0/+3
Move various functions tagged onto t_x509.c to more appropriate places. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-28Make asn1_ex_i2c, asn1_ex_c2i static.Dr. Stephen Henson1-5/+0
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-03-26Move more internal only functions to asn1_locl.hDr. Stephen Henson1-0/+12
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-25Move internal only ASN.1 functions to asn1_locl.hDr. Stephen Henson1-0/+23
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-25make X509_NAME opaqueDr. Stephen Henson1-10/+0
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-24Move some ASN.1 internals to asn1_int.hDr. Stephen Henson1-45/+0
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 Caswell1-104/+90
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-03-28Add functions returning security bits.Dr. Stephen Henson1-0/+1
Add functions to return the "bits of security" for various public key algorithms. Based on SP800-57.
2012-11-19new function ASN1_TIME_diff to calculate difference between two ASN1_TIME ↵Dr. Stephen Henson1-0/+3
structures
2010-12-13Support routines for ASN1 scanning function, doesn't do much yet.Dr. Stephen Henson1-0/+26
2010-03-11Algorithm specific ASN1 signing functions.Dr. Stephen Henson1-0/+3
2010-03-08RSA PSS verification support including certificates and certificateDr. Stephen Henson1-0/+5
requests. Add new ASN1 signature initialisation function to handle this case.
2010-03-06Add algorithm specific signature printing. An individual ASN1 method canDr. Stephen Henson1-0/+3
now print out signatures instead of the standard hex dump. More complex signatures (e.g. PSS) can print out more meaningful information. Sample DSA version included that prints out the signature parameters r, s. [Note EVP_PKEY_ASN1_METHOD is an application opaque structure so adding new fields in the middle has no compatibility issues]
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe1-5/+5
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 Henson1-1/+1
2008-11-01More size_tification.Ben Laurie1-5/+5
2008-08-20Initial indirect CRL support.Dr. Stephen Henson1-1/+2
2006-10-03Place standard CRL behaviour in default X509_CRL_METHOD new functions toDr. Stephen Henson1-0/+3
create, free and set default CRL method.
2006-09-21Tidy up CRL handling by checking for critical extensions when it isDr. Stephen Henson1-0/+15
loaded. Add new function X509_CRL_get0_by_serial() to lookup a revoked entry to avoid the need to access the structure directly. Add new X509_CRL_METHOD to allow common CRL operations (verify, lookup) to be redirected.
2006-04-17Allow public key ASN1 methods to set PKCS#7 SignerInfo structures.Dr. Stephen Henson1-1/+1
2006-04-04New function to retrieve ASN1 info on public key algorithms. New commandDr. Stephen Henson1-3/+0
line option to print out info.
2006-03-24Initial support for generalized public key parameters.Dr. Stephen Henson1-4/+5
2006-03-23Add support for legacy PEM format private keys in EVP_PKEY_ASN1_METHOD.Dr. Stephen Henson1-0/+7
2006-03-23Add information and pem strings. Update dependencies.Dr. Stephen Henson1-0/+3
2006-03-22Make EVP_PKEY_ASN1_METHOD opaque. Add application level functions toDr. Stephen Henson1-0/+37
initialize it. Initial support for application added public key ASN1.
2005-07-26Update ASN1 printing code. Highly experimental, not working properly (neitherDr. Stephen Henson1-0/+70
did the old code) and not compiled in yet...