summaryrefslogtreecommitdiffstats
path: root/crypto/x509
AgeCommit message (Collapse)Author
2015-03-25Remove X509_ATTRIBUTE hack.Dr. Stephen Henson
The X509_ATTRIBUTE structure includes a hack to tolerate malformed attributes that encode as the type instead of SET OF type. This form is never created by OpenSSL and shouldn't be needed any more. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-25free NULL cleanupRich Salz
This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-25make dependDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-25make X509_NAME opaqueDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-24Fix verify algorithm.Dr. Stephen Henson
Disable loop checking when we retry verification with an alternative path. This fixes the case where an intermediate CA is explicitly trusted and part of the untrusted certificate list. By disabling loop checking for this case the untrusted CA can be replaced by the explicitly trusted case and verification will succeed. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-24make dependDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-23make X509_EXTENSION opaqueDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-23Remove old ASN.1 code.Dr. Stephen Henson
Remove old M_ASN1_ macros and replace any occurences with the corresponding function. Remove d2i_ASN1_bytes, d2i_ASN1_SET, i2d_ASN1_SET: no longer used internally. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-16Make X509_ATTRIBUTE opaque.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-12Remove obsolete declarations.Dr. Stephen Henson
Remove DECLARE_ASN1_SET_OF and DECLARE_PKCS12_STACK_OF these haven't been used internally in OpenSSL for some time. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-03-11Merge OPENSSL_NO_EC{DH,DSA} into OPENSSL_NO_ECRich Salz
Suggested by John Foley <foleyj@cisco.com>. Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-02Check public key is not NULL.Dr. Stephen Henson
CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
2015-02-25Add flag to inhibit checking for alternate certificate chains. Setting thisMatt Caswell
behaviour will force behaviour as per previous versions of OpenSSL Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-02-25In certain situations the server provided certificate chain may no longer beMatt Caswell
valid. However the issuer of the leaf, or some intermediate cert is in fact in the trust store. When building a trust chain if the first attempt fails, then try to see if alternate chains could be constructed that are trusted. RT3637 RT3621 Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-02-09Remove obsolete IMPLEMENT_ASN1_SET_OFDr. Stephen Henson
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-02-08Final (for me, for now) dead code cleanupRich Salz
This is a final pass looking for '#if 0'/'#if 1' controls and removing the appropriate pieces. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-02-06Remove X509_PAIRRich Salz
Unused type; a pair X509 certificates. Intended for LDAP support. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-02-06util/mkstack.pl now generates entire safestack.hRich Salz
The mkstack.pl script now generates the entire safestack.h file. It generates output that follows the coding style. Also, removed all instances of the obsolete IMPLEMENT_STACK_OF macro. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-27"#if 0" removal: header filesRich Salz
Remove all "#if 0" blocks from header files. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-27OPENSSL_NO_xxx cleanup: SHARich Salz
Remove support for SHA0 and DSS0 (they were broken), and remove the ability to attempt to build without SHA (it didn't work). For simplicity, remove the option of not building various SHA algorithms; you could argue that SHA_224/256/384/512 should be kept, since they're like crypto algorithms, but I decided to go the other way. So these options are gone: GENUINE_DSA OPENSSL_NO_SHA0 OPENSSL_NO_SHA OPENSSL_NO_SHA1 OPENSSL_NO_SHA224 OPENSSL_NO_SHA256 OPENSSL_NO_SHA384 OPENSSL_NO_SHA512 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-27OPENSSL_NO_xxx cleanup: RFC3779Rich Salz
Remove OPENSSL_NO_RFCF3779. Also, makevms.com was ignored by some of the other cleanups, so I caught it up. Sorry I ignored you, poor little VMS... Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-27OPENSSL_NO_xxx cleanup: many removalsRich Salz
The following compile options (#ifdef's) are removed: OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY This diff is big because of updating the indents on preprocessor lines. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22More comment realignmentmaster-post-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-22Move more comments that confuse indentMatt Caswell
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. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22More indent fixes for STACK_OFMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Fix indent issue with functions using STACK_OFMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Further comment changes for reformat (master)Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-14Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz
OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160 OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO Two typo's on #endif comments fixed: OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-06Further comment amendments to preserve formatting prior to source reformatMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-05Constify ASN1_TYPE_cmp add X509_ALGOR_cmp.Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org>
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>
2014-12-30mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-18Change all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATEDMatt Caswell
Introduce use of DECLARE_DEPRECATED Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-12-08Remove fipscanister build functionality from makefiles.Dr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-11-28Remove all .cvsignore filesRich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-09-09RT1909: Omit version for v1 certificatesGeoff Keating
When calling X509_set_version to set v1 certificate, that should mean that the version number field is omitted. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-09-08RT2841: Extra return in check_issuedPaul Suhler
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-09-05Add 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>
2014-08-17NETSCAPE_SPKI_b64_encode: free der_spki and b64_str on error pathJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-08-17get_cert_by_subject: check for NULL when allocating hentJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-08-15RT2751: Declare get_issuer_sk() earlier.Rich Salz
Add a declaration for get_issuer_sk() so that other functions in x509_vf.c could use it. (Planned work around cross-certification chains.) Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-07-07Update API to use (char *) for email addresses and hostnamesViktor Dukhovni
Reduces number of silly casts in OpenSSL code and likely most applications. Consistent with (char *) for "peername" value from X509_check_host() and X509_VERIFY_PARAM_get0_peername().
2014-07-06Set optional peername when X509_check_host() succeeds.Viktor Dukhovni
Pass address of X509_VERIFY_PARAM_ID peername to X509_check_host(). Document modified interface.
2014-07-06New peername element in X509_VERIFY_PARAM_IDViktor Dukhovni
Declaration, memory management, accessor and documentation.
2014-06-30Make depend.Ben Laurie
2014-06-23One more typo when changing !result to result <= 0Viktor Dukhovni
2014-06-22Fix typo in last commitViktor Dukhovni
2014-06-22Multiple verifier reference identities.Viktor Dukhovni
Implemented as STACK_OF(OPENSSL_STRING).