summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
AgeCommit message (Collapse)Author
2015-01-22Rerun util/openssl-format-source -v -c .OpenSSL_1_0_2-post-auto-reformatMatt Caswell
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>
2015-01-22Fix strange formatting by indentMatt Caswell
Conflicts: crypto/hmac/hmac.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22indent has problems with comments that are on the right hand side of a line.Matt Caswell
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Conflicts: crypto/bn/bn.h crypto/ec/ec_lcl.h crypto/rsa/rsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl.h ssl/ssl3.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Additional comment changes for reformat of 1.0.2Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments (cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960) Conflicts: crypto/bn/bn_lcl.h crypto/bn/bn_prime.c crypto/engine/eng_all.c crypto/rc4/rc4_utl.c crypto/sha/sha.h ssl/kssl.c ssl/t1_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-06use correct function nameDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit cb62ab4b17818fe66d2fed0a7fe71969131c811b)
2015-01-05Constify ASN1_TYPE_cmp add X509_ALGOR_cmp.Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 4c52816d35681c0533c25fdd3abb4b7c6962302d)
2015-01-05Fix various certificate fingerprint issues.Dr. Stephen Henson
By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. those using the certificate fingerprint for blacklists. 1. Reject signatures with non zero unused bits. If the BIT STRING containing the signature has non zero unused bits reject the signature. All current signature algorithms require zero unused bits. 2. Check certificate algorithm consistency. Check the AlgorithmIdentifier inside TBS matches the one in the certificate signature. NB: this will result in signature failure errors for some broken certificates. 3. Check DSA/ECDSA signatures use DER. Reencode DSA/ECDSA signatures and compare with the original received signature. Return an error if there is a mismatch. This will reject various cases including garbage after signature (thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS program for discovering this case) and use of BER or invalid ASN.1 INTEGERs (negative or with leading zeroes). CVE-2014-8275 Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 684400ce192dac51df3d3e92b61830a6ef90be3e)
2015-01-04RT2914: NULL check missing in X509_name_canonRich Salz
Check for NULL return from X509_NAME_ENTRY_new() Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 2c60925d1ccc0b96287bdc9acb90198e7180d642)
2014-12-18Return error when a bit string indicates an invalid amount of bits leftKurt Roeckx
Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-17Reject invalid constructed encodings.Dr. Stephen Henson
According to X6.90 null, object identifier, boolean, integer and enumerated types can only have primitive encodings: return an error if any of these are received with a constructed encoding. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-09-23Add i2d_re_X509_tbsEmilia Kasper
i2d_re_X509_tbs re-encodes the TBS portion of the certificate. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Dr Stephen Henson <steve@openssl.org> (cherry picked from commit 95b1752cc7531e4b609aea166f2db1c155ab5bdd)
2014-08-27RT2400: ASN1_STRING_to_UTF8 missing initializerRaphael Spreitzer
Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit f9fb43e176ad2a914108cd2b403425dc1ebc7262)
2014-08-06Fix OID handling:Emilia Kasper
- Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-07-04Add license info.Dr. Stephen Henson
(cherry picked from commit 55707a36cce3584457f687ff020842c079624ee8)
2014-07-02ASN1 sanity check.Dr. Stephen Henson
Primitive encodings shouldn't use indefinite length constructed form. PR#2438 (partial). (cherry picked from commit 398e99fe5e06edb11f55a39ce0883d9aa633ffa9)
2014-06-27Tolerate critical AKID in CRLs.Dr. Stephen Henson
PR#3014 (cherry picked from commit 11da66f8b1fbe5777fe08cc6ace9e1f2c1576a50)
2014-06-27Memory leak and NULL dereference fixes.Dr. Stephen Henson
PR#3403 (cherry picked from commit d2aea038297e0c64ca66e6844cbb37377365885e)
2014-06-01Set default global mask to UTF8 only.Dr. Stephen Henson
(cherry picked from commit 3009244da47b989c4cc59ba02cf81a4e9d8f8431)
2014-04-01Don't try and verify signatures if key is NULL (CVE-2013-0166)Dr. Stephen Henson
Add additional check to catch this in ASN1_item_verify too. (cherry picked from commit 66e8211c0b1347970096e04b18aa52567c325200)
2014-02-14Fix various spelling errorsScott Schaefer
(cherry picked from commit 2b4ffc659eabec29f76821f0ac624a2b8c19e4c7)
2013-12-01make updateDr. Stephen Henson
2013-10-01Add KDF for DH.Dr. Stephen Henson
Add X9.42 DH KDF. Move sharedinfo generation code to CMS library as the same structure is used by DH and ECDH. Move ASN1_OBJECT typedef to ossl_typ.h so it can be picked up by dh headers without the need to use ASN1. (cherry picked from commit dc1ce3bc64845d16314af1f11acf5384e4ae9b34)
2013-08-19Time difference functions.Dr. Stephen Henson
Backport of ASN1_TIME_diff and OPENSSL_gmtime_diff functions from master branch.
2013-03-18Encode INTEGER correctly.Dr. Stephen Henson
If an ASN1_INTEGER structure is allocated but not explicitly set encode it as zero: don't generate an invalid zero length INTEGER. (cherry picked from commit 1643edc63c3e15b6db5a15a728bc288f2cc2bbc7)
2013-01-17initial support for delta CRL generations by diffing two full CRLsDr. Stephen Henson
2013-01-16print out issuer and subject unique identifier fields in certificatesDr. Stephen Henson
2012-12-26New functions to retrieve certificate signatures and signature OID NID.Dr. Stephen Henson
(backport from HEAD)
2012-09-24Fix Valgrind warning.Bodo Möller
Submitted by: Adam Langley
2012-06-03Reduce version skew: trivia (I hope).Ben Laurie
2012-05-11PR: 2813Dr. Stephen Henson
Reported by: Constantine Sapuntzakis <csapuntz@gmail.com> Fix possible deadlock when decoding public keys.
2012-04-19Check for potentially exploitable overflows in asn1_d2i_read_bioDr. Stephen Henson
BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer in CRYPTO_realloc_clean. Thanks to Tavis Ormandy, Google Security Team, for discovering this issue and to Adam Langley <agl@chromium.org> for fixing it. (CVE-2012-2110)
2012-04-07Initial experimental support for X9.42 DH parameter format to handleDr. Stephen Henson
RFC5114 parameters and X9.42 DH public and private keys. (backport from HEAD)
2012-03-29ans1/tasn_prn.c: avoid bool in variable names [from HEAD].Andy Polyakov
PR: 2776
2012-03-12corrected fix to PR#2711 and also cover mime_param_cmpDr. Stephen Henson
2012-02-29PR: 2742Dr. Stephen Henson
Reported by: Dmitry Belyavsky <beldmit@gmail.com> If resigning with detached content in CMS just copy data across.
2012-02-28Fix memory leak cause by race condition when creating public keys.Dr. Stephen Henson
Thanks to Ivan Nestlerode <inestlerode@us.ibm.com> for reporting this bug.
2012-02-27PR: 2736Dr. Stephen Henson
Reported by: Remi Gacogne <rgacogne-bugs@coredump.fr> Preserve unused bits value in non-canonicalised ASN1_STRING structures by using ASN1_STRING_copy which preseves flags.
2012-02-27free headers after use in error messageDr. Stephen Henson
2012-02-23PR: 2711Dr. Stephen Henson
Submitted by: Tomas Mraz <tmraz@redhat.com> Tolerate bad MIME headers in parser.
2012-01-15fix warningDr. Stephen Henson
2012-01-12Sanitize usage of <ctype.h> functions. It's important that charactersAndy Polyakov
are passed zero-extended, not sign-extended [from HEAD]. PR: 2682
2012-01-11asn1/t_x509.c: fix serial number print, harmonize with a_int.c [from HEAD].Andy Polyakov
PR: 2675 Submitted by: Annie Yousar
2011-10-19"make update"Bodo Möller
2011-10-11update pkey method initialisation and copyDr. Stephen Henson
2011-10-09Backport PSS signature support from HEAD.Dr. Stephen Henson
2011-10-09Fix memory leak. From HEAD.Dr. Stephen Henson
2011-10-09Backport of password based CMS support from HEAD.Dr. Stephen Henson
2011-09-16make dependDr. Stephen Henson