aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * sha/asm/sha1-x86_64.pl: fix crash in SHAEXT code on Windows.Andy Polyakov2016-08-111-2/+2
| | | | | | | | | | | | | | RT#4530 Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 7123aa81e9fb19afb11fdf3850662c5f7ff1f19c)
| * Sanity check input length in OPENSSL_uni2asc().Dr. Stephen Henson2016-08-051-0/+4
| | | | | | | | | | | | | | | | | | | | Thanks to Hanno Böck for reporting this bug. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 39a43280316f1b9c45be5ac5b04f4f5c3f923686) Conflicts: crypto/pkcs12/p12_utl.c
| * Leak fixes.Dr. Stephen Henson2016-08-053-6/+6
| | | | | | | | | | | | | | | | | | Fix error path leaks in a2i_ASN1_STRING(), a2i_ASN1_INTEGER() and a2i_ASN1_ENUMERATED(). Thanks to Shi Lei for reporting these issues. Reviewed-by: Rich Salz <rsalz@openssl.org>
| * Return error when trying to print invalid ASN1 integerKurt Roeckx2016-08-041-0/+2
| | | | | | | | | | | | | | | | GH: #1322 (cherry picked from commit 5e3553c2de9a365479324b8ba8b998f0cce3e527) Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
| * Limit recursion depth in old d2i_ASN1_bytes functionDr. Stephen Henson2016-08-041-15/+43
| | | | | | | | | | | | Thanks to Shi Lei for reporting this bug. Reviewed-by: Rich Salz <rsalz@openssl.org>
| * Check for overflows in i2d_ASN1_SET()Dr. Stephen Henson2016-08-041-2/+7
| | | | | | | | | | | | Thanks to Shi Lei for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org>
| * Limit status message sisze in ts_get_status_checkDr. Stephen Henson2016-08-042-1/+6
| | | | | | | | | | | | | | | | | | | | Thanks to Shi Lei for reporting this issue. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 20fc103f782bb0bcd41d211c6423187b02146b9d) Conflicts: include/openssl/ts.h
| * Don't check any revocation info on proxy certificatesRichard Levitte2016-08-031-0/+2
| | | | | | | | | | | | | | | | | | Because proxy certificates typically come without any CRL information, trying to check revocation on them will fail. Better not to try checking such information for them at all. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 790555d6756285b3ec18e3efbb195cf33f217d8f)
* | mdebug-backtraceKazuki Yamaguchi2016-08-292-28/+53
|/
* Calculate sequence length properly.Dr. Stephen Henson2016-08-031-1/+1
| | | | | | | | | Use correct length in old ASN.1 indefinite length sequence decoder (only used by SSL_SESSION). This bug was discovered by Hanno Böck using libfuzzer. Reviewed-by: Rich Salz <rsalz@openssl.org>
* include <limits.h>Dr. Stephen Henson2016-08-021-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Check for overflows in ASN1_object_size().Dr. Stephen Henson2016-08-021-12/+16
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit e9f17097e9fbba3e7664cd67e54eebf2bd438863)
* Check for overlows and error return from ASN1_object_size()Dr. Stephen Henson2016-08-022-10/+17
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 56f9953c846204cb3251ab27605e403c7444fd72)
* Fix CRL time comparison.Dr. Stephen Henson2016-07-291-1/+5
| | | | | | | Thanks to David Benjamin <davidben@google.com> for reporting this bug. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit e032117db251968bd09badc7d4718c2497302e55)
* Add missing casts.Rich Salz2016-07-282-3/+4
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Note cipher BIO write errors too.Dr. Stephen Henson2016-07-261-3/+7
| | | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 976ef6adcc157233fb641ca99e2424630ef1814f) Conflicts: crypto/evp/bio_enc.c
* Set error if EVP_CipherUpdate fails.Dr. Stephen Henson2016-07-261-3/+8
| | | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit ee6ce5cc368574c0b0b470e61ee2f82a0efadbb7) Conflicts: crypto/evp/bio_enc.c
* Use newest CRL.Dr. Stephen Henson2016-07-221-6/+14
| | | | | | | | | | If two CRLs are equivalent then use the one with a later lastUpdate field: this will result in the newest CRL available being used. RT#4615 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 626aa24849be549b7ef4f049d8427989940c8a37)
* Send alert for bad DH CKEDr. Stephen Henson2016-07-221-2/+4
| | | | | | RT#4511 Reviewed-by: Matt Caswell <matt@openssl.org>
* Fix OOB read in TS_OBJ_print_bio().Dr. Stephen Henson2016-07-221-3/+2
| | | | | | | | | | | | | | TS_OBJ_print_bio() misuses OBJ_txt2obj: it should print the result as a null terminated buffer. The length value returned is the total length the complete text reprsentation would need not the amount of data written. CVE-2016-2180 Thanks to Shi Lei for reporting this bug. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 0ed26acce328ec16a3aa635f1ca37365e8c7403a)
* Clarify digest change in HMAC_Init_ex()Dr. Stephen Henson2016-07-221-7/+11
| | | | | | RT#4603 Reviewed-by: Rich Salz <rsalz@openssl.org>
* OCSP_request_add0_id() inconsistent error returnTodd Short2016-07-201-1/+3
| | | | | | | | | | | | | | | There are two failure cases for OCSP_request_add_id(): 1. OCSP_ONEREQ_new() failure, where |cid| is not freed 2. sk_OCSP_ONEREQ_push() failure, where |cid| is freed This changes makes the error behavior consistent, such that |cid| is not freed when sk_OCSP_ONEREQ_push() fails. OpenSSL only takes ownership of |cid| when the function succeeds. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1289) (cherry picked from commit 415e7c488e09119a42be24129e38ddd43524ee06)
* Sanity check in ssl_get_algorithm2().Dr. Stephen Henson2016-07-201-1/+4
| | | | | | | | | | RT#4600 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 52eede5a970fdb30c4ed6d3663e51f36bd1b1c73) Conflicts: ssl/s3_lib.c
* Send alert on CKE error.Dr. Stephen Henson2016-07-191-3/+5
| | | | | | RT#4610 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Support PKCS v2.0 print in pkcs12 utility.Dr. Stephen Henson2016-07-191-10/+64
| | | | | | | | Extended alg_print() in pkcs12 utility to support PBES2 algorithms. RT#4588 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Check and print out boolean type properly.Dr. Stephen Henson2016-07-191-4/+10
| | | | | | | If underlying type is boolean don't check field is NULL. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit ad72d9fdf7709ddb97a58d7d45d755e6e0504b96)
* Fix print of ASN.1 BIGNUM type.Dr. Stephen Henson2016-07-181-1/+14
| | | | | | | | | | | The ASN.1 BIGNUM type needs to be handled in a custom way as it is not a generic ASN1_STRING type. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 3cea73a7fcaaada1ea0ee4b4353ed0176fee1112) Conflicts: crypto/asn1/x_bignum.c
* Remove the silly CVS markers from LPdir_*.cRichard Levitte2016-07-164-15/+0
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 28e90f69fbcdcd3c06359a53adceb2dbdfaba614)
* Fix ASN.1 private encode of EC_KEY to not change the input keyRichard Levitte2016-07-151-15/+9
| | | | | | | RT#4611 Reviewed-by: Stephen Henson <steve@openssl.org> (cherry picked from commit b8a7bd83e68405fdf595077973035ac6fe24cb97)
* Disallow multiple protocol flags to s_server and s_clientMatt Caswell2016-07-084-9/+62
| | | | | | | | | We shouldn't allow both "-tls1" and "-tls1_2", or "-tls1" and "-no_tls1_2". The only time multiple flags are allowed is where they are all "-no_<prot>". This fixes Github Issue #1268 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix compilation with CMS disabledOrgad Shaneh2016-07-062-0/+10
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1293)
* Don't indicate errors during initial adb decode.Dr. Stephen Henson2016-07-061-1/+1
| | | | | Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit b385889640517531a9cfeb672b15db7089b1bbb8)
* remove double initialization of cryptodev engineCristian Stoica2016-07-051-5/+0
| | | | | | | | | | | cryptodev engine is initialized together with the other engines in ENGINE_load_builtin_engines. The initialization done through OpenSSL_add_all_algorithms is redundant. Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid an overflow in constructing the ServerKeyExchange messageMatt Caswell2016-07-011-0/+5
| | | | | | | | | | | | | We calculate the size required for the ServerKeyExchange message and then call BUF_MEM_grow_clean() on the buffer. However we fail to take account of 2 bytes required for the signature algorithm and 2 bytes for the signature length, i.e. we could overflow by 4 bytes. In reality this won't happen because the buffer is pre-allocated to a large size that means it should be big enough anyway. Addresses an OCAP Audit issue. Reviewed-by: Rich Salz <rsalz@openssl.org>
* SPARC assembly pack: enforce V8+ ABI constraints.Andy Polyakov2016-07-013-4/+10
| | | | | | | | | | | | Even though it's hard to imagine, it turned out that upper half of arguments passed to V8+ subroutine can be non-zero. ["n" pseudo-instructions, such as srln being srl in 32-bit case and srlx in 64-bit one, were implemented in binutils 2.10. It's assumed that Solaris assembler implemented it around same time, i.e. 2000.] Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit f198cc43a0eca4bf1a8e7f60c51af560f4346dc8)
* Convert memset calls to OPENSSL_cleanseMatt Caswell2016-06-306-6/+15
| | | | | | | | Ensure things really do get cleared when we intend them to. Addresses an OCAP Audit issue. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Allow proxy certs to be present when verifying a chainRichard Levitte2016-06-292-0/+7
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix proxy certificate pathlength verificationRichard Levitte2016-06-291-7/+21
| | | | | | | | | While travelling up the certificate chain, the internal proxy_path_length must be updated with the pCPathLengthConstraint value, or verification will not work properly. This corresponds to RFC 3820, 4.1.4 (a). Reviewed-by: Rich Salz <rsalz@openssl.org>
* Check that the subject name in a proxy cert complies to RFC 3820Richard Levitte2016-06-295-3/+85
| | | | | | | | | The subject name MUST be the same as the issuer name, with a single CN entry added. RT#1852 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Change usage of RAND_pseudo_bytes to RAND_bytesMatt Caswell2016-06-2728-61/+49
| | | | | | | | | RAND_pseudo_bytes() allows random data to be returned even in low entropy conditions. Sometimes this is ok. Many times it is not. For the avoidance of any doubt, replace existing usage of RAND_pseudo_bytes() with RAND_bytes(). Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT2964: Fix it via docRich Salz2016-06-261-0/+17
| | | | | | | OBJ_nid2obj() and friends should be treated as const. Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 5d28ff38fd4127c5894d22533e842ee446c3d3c2)
* Revert "RT2964: Fix it via doc"Rich Salz2016-06-251-10/+0
| | | | | | This reverts commit 58b18779ba6e6060ac357cd0803d83317ed00f8b. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* RT2964: Fix it via docRich Salz2016-06-251-0/+10
| | | | | | | OBJ_nid2obj() and friends should be treated as const. Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 82f31fe4dd0dac30229fa8684229b49d2bcef404)
* Ensure HMAC key gets cleansed after useMatt Caswell2016-06-241-0/+2
| | | | | | | | | | aesni_cbc_hmac_sha256_ctrl() and aesni_cbc_hmac_sha1_ctrl() cleanse the HMAC key after use, but static int rc4_hmac_md5_ctrl() doesn't. Fixes an OCAP Audit issue. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 0def528bc502a888a3f4ef3c38ea4c5e69fd7375)
* Fix ASN1_STRING_to_UTF8 could not convert NumericStringMatt Caswell2016-06-231-1/+1
| | | | | | | | | tag2nbyte had -1 at 18th position, but underlying ASN1_mbstring_copy supports NumericString. tag2nbyte is also used in do_print_ex which will not be broken by setting 1 at 18th position of tag2nbyte Reviewed-by: Stephen Henson <steve@openssl.org> (cherry picked from commit d6079a87db58ad17550b5d00a74512464e6a029e)
* doc/crypto/OPENSSL_ia32cap.pod: harmonize with actual declaration.Andy Polyakov2016-06-221-1/+1
| | | | | | | | [Note that in master declaration is different.] RT#4568 Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT3752: Add FIPS callback for thread idJohn Foley2016-06-211-0/+3
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Fix missing opening bracesRichard Levitte2016-06-201-2/+2
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* RT3925: Remove trailing semi from #define's.Dr. Matthias St. Pierre2016-06-201-3/+3
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* apps/req.c: Increment the right variable when parsing '+'Richard Levitte2016-06-201-4/+3
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 14d3c0dd2c31b9fd1f92d608524dd650f5ec5a7e)