aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-09-22Add OCSP_RESPID_match()Matt Caswell1-0/+1
Add a function for testing whether a given OCSP_RESPID matches with a certificate. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-22Add the ability to set OCSP_RESPID fieldsMatt Caswell1-0/+2
OCSP_RESPID was made opaque in 1.1.0, but no accessors were provided for setting the name/key value for the OCSP_RESPID. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-21Don't allow too many consecutive warning alertsMatt Caswell1-0/+1
Certain warning alerts are ignored if they are received. This can mean that no progress will be made if one peer continually sends those warning alerts. Implement a count so that we abort the connection if we receive too many. Issue reported by Shi Lei. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-21Revert "Constify code about X509_VERIFY_PARAM"Rich Salz2-3/+3
This reverts commit 81f9ce1e1965e0e33db6d2391285c4c1b6af0434. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-09-21make update and fix some associated mis-matched error codesMatt Caswell1-0/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-20Convert NextProto message construction to WPACKETMatt Caswell1-0/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-18Constify code about X509_VERIFY_PARAMFdaSilvaYY2-3/+3
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1594)
2016-09-13bio.h: fix number of arguments passed to BIO_ptr_ctrl()Viktor Szakats1-3/+3
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1520)
2016-09-13Convert tls_construct_client_hello() to use PACKETWMatt Caswell1-1/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-11VMS: be less picky when loading DSOsRichard Levitte1-6/+0
The DSO API was picky about casing of symbol names on VMS. There's really no reason to be that picky, it's mostly just annoying. Therefore, we take away the possibility to flag for a choice, and will instead first try to find a symbol with exact case, and failing that, we try to find it in upper case. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-25Update CHANGES, NEWS, README and opensslv.h on masterRichard Levitte1-3/+3
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-24Un-delete still documented X509_STORE_CTX_set_verifyViktor Dukhovni1-0/+2
It should not have been removed. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-24Updates the CT_POLICY_EVAL_CTX PODRob Percival1-1/+1
Ownership semantics and function names have changed. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-24Documents the CTLOG functionsRob Percival1-0/+1
CTLOG_new_null() has been removed from the code, so it has also been removed from this POD. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-24Add comment about calling CT_POLICY_EVAL_CTX_freeRob Percival1-1/+5
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-24Fix comment about what SCT_LIST_validate does.Rob Percival1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Removes {i2o,o2i}_SCT_signature from the CT public APIRob Percival1-19/+0
They may return if an SCT_signature struct is added in the future that allows them to be refactored to conform to the i2d/d2i function signature conventions. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Internalizes SCT_verify and removes SCT_verify_v1Rob Percival1-15/+1
SCT_verify is impossible to call through the public API (SCT_CTX_new() is not part of the public API), so rename it to SCT_CTX_verify and move it out of the public API. SCT_verify_v1 is redundant, since SCT_validate does the same verification (by calling SCT_verify) and more. The API is less confusing with a single verification function (SCT_validate). Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Constify a bit X509_NAME_get_entryFdaSilvaYY1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-23Constify some X509_NAME, ASN1 printing codeFdaSilvaYY2-10/+10
ASN1_buf_print, asn1_print_*, X509_NAME_oneline, X509_NAME_print Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-23Constify some input parameters.FdaSilvaYY1-7/+7
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-23Constify some inputs buffersFdaSilvaYY2-4/+4
remove useless cast to call ASN1_STRING_set Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-23Constify ASN1_PCTX_*FdaSilvaYY1-5/+5
... add a static keyword. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-22Expose alloc functions for EC{PK,}PARAMETERSKazuki Yamaguchi1-0/+2
Declare EC{PK,}PARAMETERS_{new,free} functions in public headers. The free functions are necessary because EC_GROUP_get_ec{pk,}parameters() was made public by commit 60b350a3ef96 ("RT3676: Expose ECgroup i2d functions"). Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-22crypto/pkcs12: facilitate accessing data with non-interoperable password.Andy Polyakov1-13/+3
Originally PKCS#12 subroutines treated password strings as ASCII. It worked as long as they were pure ASCII, but if there were some none-ASCII characters result was non-interoperable. But fixing it poses problem accessing data protected with broken password. In order to make asscess to old data possible add retry with old-style password. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-22crypto/pkcs12: default to UTF-8.Andy Polyakov1-2/+4
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-22crypto/pkcs12: add UTF8 support.Andy Polyakov1-1/+8
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-21Move BIO index lock creationRich Salz1-0/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-21Add X509_getm_notBefore, X509_getm_notAfterDr. Stephen Henson1-4/+6
Add mutable versions of X509_get0_notBefore and X509_get0_notAfter. Rename X509_SIG_get0_mutable to X509_SIG_getm. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-08-20Duplicate includesFdaSilvaYY1-1/+0
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1475)
2016-08-19Add BIO_get_new_index()Rich Salz1-28/+30
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-08-19Constify certificate and CRL time routines.Dr. Stephen Henson1-8/+24
Update certificate and CRL time routines to match new standard. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-19Convert PKCS12* functions to use const gettersMatt Caswell1-14/+18
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-19Update function error codeMatt Caswell1-1/+1
A function error code needed updating due to merge issues. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-19Fix DTLS replay protectionMatt Caswell1-0/+1
The DTLS implementation provides some protection against replay attacks in accordance with RFC6347 section 4.1.2.6. A sliding "window" of valid record sequence numbers is maintained with the "right" hand edge of the window set to the highest sequence number we have received so far. Records that arrive that are off the "left" hand edge of the window are rejected. Records within the window are checked against a list of records received so far. If we already received it then we also reject the new record. If we have not already received the record, or the sequence number is off the right hand edge of the window then we verify the MAC of the record. If MAC verification fails then we discard the record. Otherwise we mark the record as received. If the sequence number was off the right hand edge of the window, then we slide the window along so that the right hand edge is in line with the newly received sequence number. Records may arrive for future epochs, i.e. a record from after a CCS being sent, can arrive before the CCS does if the packets get re-ordered. As we have not yet received the CCS we are not yet in a position to decrypt or validate the MAC of those records. OpenSSL places those records on an unprocessed records queue. It additionally updates the window immediately, even though we have not yet verified the MAC. This will only occur if currently in a handshake/renegotiation. This could be exploited by an attacker by sending a record for the next epoch (which does not have to decrypt or have a valid MAC), with a very large sequence number. This means the right hand edge of the window is moved very far to the right, and all subsequent legitimate packets are dropped causing a denial of service. A similar effect can be achieved during the initial handshake. In this case there is no MAC key negotiated yet. Therefore an attacker can send a message for the current epoch with a very large sequence number. The code will process the record as normal. If the hanshake message sequence number (as opposed to the record sequence number that we have been talking about so far) is in the future then the injected message is bufferred to be handled later, but the window is still updated. Therefore all subsequent legitimate handshake records are dropped. This aspect is not considered a security issue because there are many ways for an attacker to disrupt the initial handshake and prevent it from completing successfully (e.g. injection of a handshake message will cause the Finished MAC to fail and the handshake to be aborted). This issue comes about as a result of trying to do replay protection, but having no integrity mechanism in place yet. Does it even make sense to have replay protection in epoch 0? That issue isn't addressed here though. This addressed an OCAP Audit issue. CVE-2016-2181 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-19Add X509_get0_serialNumber() and constify OCSP_cert_to_id()Dr. Stephen Henson2-4/+6
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-19constify X509_REQ_get0_signature()Dr. Stephen Henson1-2/+2
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-19constify i2o_ECPublicKeyDr. Stephen Henson1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-18Constify i2a*Dr. Stephen Henson2-3/+3
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-18Convert X509_REVOKED* functions to use const gettersMatt Caswell2-4/+5
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-17Don't try to init dasync internallyRichard Levitte1-2/+1
Since dasync isn't installed, and is only ever used as a dynamic engine, there's no reason to consider it for initialization when building static engines. Reviewed-by: Ben Laurie <ben@openssl.org>
2016-08-17Constify X509_SIG.Dr. Stephen Henson2-10/+15
Constify X509_SIG_get0() and order arguments to mactch new standard. Add X509_SIG_get0_mutable() to support modification or initialisation of an X509_SIG structure. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-17Constify X509_certificate_type()Dr. Stephen Henson1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-17Constify X509_get0_signature()Dr. Stephen Henson1-1/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-17Convert X509* functions to use const gettersDr. Stephen Henson2-6/+7
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-17Convert X509_CRL* functions to use const gettersMatt Caswell2-6/+7
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-17Make X509_NAME_get0_der() conform to OpenSSL styleMatt Caswell1-2/+2
Put the main object first in the params list. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-17Convert OCSP* functions to use const gettersMatt Caswell1-3/+3
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-17Constify private key decode.Dr. Stephen Henson2-4/+4
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-17constify X509_ALGOR_get0()Dr. Stephen Henson1-2/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>