Commit graph

1066 commits

Author SHA1 Message Date
Rich Salz
3f10149603 Misc BN fixes
Never output -0; make "negative zero" an impossibility.
Do better checking on BN_rand top/bottom requirements and #bits.
Update doc.
Ignoring trailing garbage in BN_asc2bn.

Port this commit from boringSSL: https://boringssl.googlesource.com/boringssl/+/899b9b19a4cd3fe526aaf5047ab9234cdca19f7d%5E!/
        Ensure |BN_div| never gives negative zero in the no_branch code.

        Have |bn_correct_top| fix |bn->neg| if the input is zero so that we
        don't have negative zeros lying around.

        Thanks to Brian Smith for noticing.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 01c09f9fde)
(Some manual work required)
2016-09-06 11:09:50 -04:00
Rich Salz
ff5537c255 RT3940: For now, just document the issue.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 2a9afa4046)
2016-08-19 11:45:45 -04:00
Rich Salz
a03f81f4ea Fix NULL-return checks in 1.0.2
RT4386: Add sanity checks for BN_new()
RT4384: Missing Sanity Checks for RSA_new_method()
RT4384: Missing Sanity Check plus potential NULL pointer deref
RT4382: Missing Sanity Check(s) for BUF_strdup()
RT4380: Missing Sanity Checks for EVP_PKEY_new()
RT4377: Prevent potential NULL pointer dereference
RT4375: Missing sanity checks for OPENSSL_malloc()
RT4374: Potential for NULL pointer dereferences
RT4371: Missing Sanity Check for malloc()
RT4370: Potential for NULL pointer dereferences

Also expand tabs, make update, typo fix (rsalz)
Minor tweak by Paul Dale.
Some minor internal review feedback.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-19 10:44:32 -04:00
Dr. Stephen Henson
b880283683 Clarify digest change in HMAC_Init_ex()
RT#4603

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-22 14:11:13 +01:00
Richard Levitte
6ad8c48291 Allow proxy certs to be present when verifying a chain
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-29 23:13:54 +02:00
Rich Salz
f3dbce6634 RT2964: Fix it via doc
OBJ_nid2obj() and friends should be treated as const.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 5d28ff38fd)
2016-06-26 09:26:19 -04:00
Rich Salz
345b8400c1 Revert "RT2964: Fix it via doc"
This reverts commit 58b18779ba.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-06-25 22:09:05 -04:00
Rich Salz
58b18779ba RT2964: Fix it via doc
OBJ_nid2obj() and friends should be treated as const.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 82f31fe4dd)
2016-06-25 16:40:51 -04:00
Andy Polyakov
ecb044db58 doc/crypto/OPENSSL_ia32cap.pod: harmonize with actual declaration.
[Note that in master declaration is different.]

RT#4568

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-22 20:18:17 +02:00
Pauli
d9e6d77164 RT4573: Synopsis for RAND_add is wrong
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-06-16 07:28:49 -04:00
Rich Salz
95fb422ace RT4546: Backport doc fix
Reviewed-by: Matt Caswell <matt@openssl.org>
Manual cherry-pick of 538860a3ce.
2016-06-14 15:04:33 -04:00
Rich Salz
dd8a1f2016 RT4562: Backport doc fix.
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-06-14 12:44:27 -04:00
Matt Caswell
46bad91986 Fix documentation error in x509 app certopt flag
According to the x509 man page in the section discussing -certopt it says
that the ca_default option is the same as that used by the ca utility and
(amongst other things) has the effect of suppressing printing of the
signature - but in fact it doesn't. This error seems to have been present
since the documentation was written back in 2001. It never had this effect.

The default config file sets the certopt value to ca_default. The ca utility
takes that and THEN adds additional options to suppress printing of the
signature. So the ca utility DOES suppress printing of the signature - but
it is not as a result of using the ca_default option.

GitHub Issue #247

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 39a470088a)
2016-06-03 23:22:22 +01:00
Dr. Stephen Henson
fd785ca892 Parameter copy sanity checks.
Don't copy parameters is they're already present in the destination.
Return error if an attempt is made to copy different parameters to
destination. Update documentation.

If key type is not initialised return missing parameters

RT#4149

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit f72f00d495)
2016-05-31 13:26:54 +01:00
Richard Levitte
a531944796 Revert "Document the esc_2254 command line name option"
This reverts commit 54fc5795c9.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-20 16:21:50 +02:00
Viktor Dukhovni
96747f0f4e Clarify negative return from X509_verify_cert()
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-05-19 18:14:43 -04:00
Richard Levitte
54fc5795c9 Document the esc_2254 command line name option
RT#1466

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit a37458c1bf)
2016-05-18 18:38:52 +02:00
Richard Levitte
2a73576f89 Documentation: Clarify sizes for UI_add_input_string()
The given sizes to not include the final NUL character.

RT#2622

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 727ee8cfeb)
2016-05-16 18:35:11 +02:00
Viktor Dukhovni
36c3794490 Fix i2d_X509_AUX and update docs
When *pp is NULL, don't write garbage, return an unexpected pointer
or leak memory on error.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-05-11 01:50:03 -04:00
Dr. Stephen Henson
2f460e1adb Typo.
RT#4538

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 981b5bb8ef)
2016-05-10 16:51:59 +01:00
Matt Caswell
d516d7a940 Fix BIO_eof() for BIO pairs
BIO_eof() was always returning true when using a BIO pair. It should only
be true if the peer BIO is empty and has been shutdown.

RT#1215

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 3105d69535)
2016-05-09 17:06:25 +01:00
Dr. Stephen Henson
9dfd498af8 add documentation
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit b1b3e14fbe)
2016-05-04 12:59:10 +01:00
Matt Caswell
643e8e972e Remove some documentation for functions not in 1.0.x
A few functions in the recently added EVP_EncodeInit docs don't apply to
the 1.0.x branches.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-03 12:53:47 +01:00
Matt Caswell
0b3762a342 Add documentation for EVP_EncodeInit() and similar functions
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-03 11:50:13 +01:00
TJ Saunders
8769314886 Issue #719:
If no serverinfo extension is found in some cases, do not abort the handshake,
but simply omit/skip that extension.

Check for already-registered serverinfo callbacks during serverinfo
registration.

Update SSL_CTX_use_serverinfo() documentation to mention the need to reload the
same serverinfo per certificate, for servers with multiple server certificates.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-02 12:54:38 -04:00
Todd Short
af2db04c99 Fix ALPN
* Perform ALPN after the SNI callback; the SSL_CTX may change due to
  that processing
* Add flags to indicate that we actually sent ALPN, to properly error
  out if unexpectedly received.
* document ALPN functions
* unit tests

Backport of commit 817cd0d52f

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-04-04 13:45:09 -04:00
Kurt Roeckx
29cce50897 Remove LOW from the default
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-07 18:54:57 +01:00
Eric S. Raymond
dd8518214f RT4358: Extra ] in doc/ocsp.pod
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-01 11:51:05 -05:00
Viktor Dukhovni
bc38a7d2d3 Disable EXPORT and LOW SSLv3+ ciphers by default
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-01 11:20:35 +00:00
Viktor Dukhovni
021fb42dd0 Bring SSL method documentation up to date
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-03-01 11:20:35 +00:00
Emilia Kasper
b4b23d05d3 RT 3854: Update apps/req
Change the default keysize to 2048 bits, and the minimum to 512 bits.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit a762655743)
2016-02-12 14:17:57 +01:00
Hubert Kario
106dbca36c GH554: Improve pkeyutl doc
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 53619f9f40)
2016-02-01 11:45:00 -05:00
Daniel Kahn Gillmor
a38a159bfc RT4129: BUF_new_mem_buf should take const void *
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 8ab31975ba)
2016-02-01 08:43:27 -05:00
Matt Caswell
c5b831f21d Always generate DH keys for ephemeral DH cipher suites
Modified version of the commit ffaef3f15 in the master branch by Stephen
Henson. This makes the SSL_OP_SINGLE_DH_USE option a no-op and always
generates a new DH key for every handshake regardless.

CVE-2016-0701 (fix part 2 or 2)

Issue reported by Antonio Sanso

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-28 13:49:56 +00:00
Kurt Roeckx
cb19c0d15f File is about s_time, not s_client
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 1918e01c9f)
2016-01-10 13:14:19 +01:00
Matt Caswell
c52c3b5e11 Add some documentation for the OCSP callback functions
Describe the usage of the OCSP callback functions on both the client and
the server side.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-27 22:02:33 +00:00
Daniel Kahn Gillmor
155a1623d0 The functions take a SSL *, not a SSL_CTX *
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>

RT: #4192, MR: #1533
(cherry picked from commit d938e8dfee)
2015-12-23 22:33:26 +01:00
Richard Levitte
7eb5125125 Document how BIO_get_conn_ip and BIO_get_conn_int_port actually work
No dummy arguments.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-19 22:07:42 +01:00
Matt Caswell
ca3658e000 Minor EVP_SignInit_ex doc fix
EVP_SignInit_ex was missing from the NAME section of its man page so
typing "man EVP_SignInit_ex" failed to load the page.

Reviewed-by: Stephen Henson <steve@openssl.org>
(cherry picked from commit 3d866ea67e)
2015-11-04 14:39:16 +00:00
Alessandro Ghedini
ec3a7c9b37 Fix typos
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit d900a015b5)
2015-10-23 20:32:58 +02:00
Adam Eijdenberg
8d43c0053b Clarify return values for EVP_DigestVerifyFinal.
Previous language was unclear.  New language isn't pretty but I believe
it is more accurate.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Laurie <ben@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 8cbb048c3e)
2015-10-22 18:28:38 -04:00
Ismo Puustinen
6f997dc365 GH367: use random data if seed too short.
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-09-29 12:48:43 -04:00
Emilia Kasper
51ff683c12 Document BUF_strnlen
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 21b0fa9118)
2015-09-22 20:04:36 +02:00
Emilia Kasper
be250ee2d3 BUF_strdup and friends: update docs
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 58e3457a82)
2015-09-22 20:04:32 +02:00
Rich Salz
6be18a2219 This undoes GH367 for non-master
Was only approved for master, to avoid compatibility issues on
previous releases.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-09-18 15:56:23 -04:00
Dr. Stephen Henson
ce5ae63ab2 Use default field separator.
If the field separator isn't specified through -nameopt then use
XN_FLAG_SEP_CPLUS_SPC instead of printing nothing and returing an error.

PR#2397

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 03706afa30)
2015-09-11 20:52:17 +01:00
Rich Salz
0a1682d8b5 RT3767: openssl_button.gif should be PNG
No, we should just delete it.  And updated the README

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 8db7878106)
2015-09-01 21:38:27 -04:00
Ben Kaduk
df1565ed9c GH367 follow-up, for more clarity
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 36ac7bc8a9)
2015-08-31 13:46:30 -04:00
Richard Levitte
732a6b5522 Remove auto-fill-mode
Apparently, emacs sees changes to auto-fill-mode as insecure

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 6dc08048d9)
2015-08-31 18:20:24 +02:00
Richard Levitte
43613c0a02 Add an example .dir-locals.el
This file, when copied to .dir-locals.el in the OpenSSL source top,
will make sure that the CC mode style "OpenSSL-II" will be used for
all C files.

Additionally, I makes sure that tabs are never used as indentation
character, regardless of the emacs mode, and that the fill column is
78.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 0927f0d822)
2015-08-31 18:20:24 +02:00