Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/dist Import of OpenSSL 1.0.2j.
details: https://anonhg.NetBSD.org/src/rev/5a9a47eb4e70
branches: trunk
changeset: 348308:5a9a47eb4e70
user: spz <spz%NetBSD.org@localhost>
date: Fri Oct 14 16:02:36 2016 +0000
description:
Import of OpenSSL 1.0.2j.
The 1.0.2 branch of OpenSSL is the current long term support branch.
Differences between 1.0.1 and 1.0.2:
o Suite B support for TLS 1.2 and DTLS 1.2
o Support for DTLS 1.2
o TLS automatic EC curve selection.
o API to set TLS supported signature algorithms and curves
o SSL_CONF configuration API.
o TLS Brainpool support.
o ALPN support.
o CMS support for RSA-PSS, RSA-OAEP, ECDH and X9.42 DH.
Security fixes from the previous version (1.0.1t) in NetBSD:
o OCSP Status Request extension unbounded memory growth (CVE-2016-6304)
o SWEET32 Mitigation (CVE-2016-2183)
o OOB write in MDC2_Update() (CVE-2016-6303)
o Malformed SHA512 ticket DoS (CVE-2016-6302)
o OOB write in BN_bn2dec() (CVE-2016-2182)
o OOB read in TS_OBJ_print_bio() (CVE-2016-2180)
o Pointer arithmetic undefined behaviour (CVE-2016-2177)
o Constant time flag not preserved in DSA signing (CVE-2016-2178)
o DTLS buffered message DoS (CVE-2016-2179)
o DTLS replay protection DoS (CVE-2016-2181)
o Certificate message OOB reads (CVE-2016-6306)
diffstat:
crypto/external/bsd/openssl/dist/crypto/asn1/Makefile | 5 +-
crypto/external/bsd/openssl/dist/crypto/asn1/a_strnid.c | 1 +
crypto/external/bsd/openssl/dist/crypto/asn1/a_time.c | 30 +
crypto/external/bsd/openssl/dist/crypto/asn1/a_utctm.c | 92 +-
crypto/external/bsd/openssl/dist/crypto/asn1/asn1_lib.c | 32 +-
crypto/external/bsd/openssl/dist/crypto/asn1/asn1_locl.h | 3 +
crypto/external/bsd/openssl/dist/crypto/asn1/bio_asn1.c | 6 +-
crypto/external/bsd/openssl/dist/crypto/asn1/bio_ndef.c | 1 +
crypto/external/bsd/openssl/dist/crypto/asn1/charmap.pl | 14 +-
crypto/external/bsd/openssl/dist/crypto/asn1/d2i_pr.c | 8 +-
crypto/external/bsd/openssl/dist/crypto/asn1/f_enum.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/asn1/f_int.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/asn1/f_string.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/asn1/i2d_pr.c | 9 +-
crypto/external/bsd/openssl/dist/crypto/asn1/p5_pbe.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/asn1/p5_pbev2.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/asn1/t_req.c | 1 +
crypto/external/bsd/openssl/dist/crypto/asn1/t_x509.c | 15 +
crypto/external/bsd/openssl/dist/crypto/asn1/tasn_prn.c | 16 +-
crypto/external/bsd/openssl/dist/crypto/asn1/tasn_utl.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/asn1/x_bignum.c | 15 +-
crypto/external/bsd/openssl/dist/crypto/asn1/x_crl.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/asn1/x_name.c | 6 +-
crypto/external/bsd/openssl/dist/crypto/asn1/x_x509.c | 74 +-
crypto/external/bsd/openssl/dist/crypto/asn1/x_x509a.c | 7 +-
crypto/external/bsd/openssl/dist/crypto/bio/b_dump.c | 25 +
crypto/external/bsd/openssl/dist/crypto/bio/b_print.c | 12 +-
crypto/external/bsd/openssl/dist/crypto/bio/bf_nbio.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/bio/bio.h | 16 +-
crypto/external/bsd/openssl/dist/crypto/bio/bio_err.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_acpt.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_bio.c | 19 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_conn.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_dgram.c | 84 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_fd.c | 22 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_mem.c | 6 +-
crypto/external/bsd/openssl/dist/crypto/bio/bss_rtcp.c | 2 +
crypto/external/bsd/openssl/dist/crypto/bn/Makefile | 21 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/armv4-gf2m.pl | 169 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/armv4-mont.pl | 484 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/mips-mont.pl | 2 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl | 2 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/ppc-mont.pl | 11 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/ppc.pl | 20 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/ppc64-mont.pl | 698 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/rsaz-avx2.pl | 1961 ++
crypto/external/bsd/openssl/dist/crypto/bn/asm/rsaz-x86_64.pl | 2351 ++
crypto/external/bsd/openssl/dist/crypto/bn/asm/s390x.S | 109 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/sparct4-mont.pl | 1222 +
crypto/external/bsd/openssl/dist/crypto/bn/asm/sparcv9-gf2m.pl | 190 +
crypto/external/bsd/openssl/dist/crypto/bn/asm/vis3-mont.pl | 373 +
crypto/external/bsd/openssl/dist/crypto/bn/asm/x86-mont.pl | 41 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-mont.pl | 1470 +-
crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-mont5.pl | 3154 +++-
crypto/external/bsd/openssl/dist/crypto/bn/bn_asm.c | 227 +-
crypto/external/bsd/openssl/dist/crypto/bn/bn_div.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/bn/bn_gf2m.c | 3 +-
crypto/external/bsd/openssl/dist/crypto/bn/bn_print.c | 35 +-
crypto/external/bsd/openssl/dist/crypto/bn/bn_rand.c | 23 +-
crypto/external/bsd/openssl/dist/crypto/bn/bn_word.c | 22 +
crypto/external/bsd/openssl/dist/crypto/bn/rsaz_exp.c | 346 +
crypto/external/bsd/openssl/dist/crypto/bn/rsaz_exp.h | 68 +
crypto/external/bsd/openssl/dist/crypto/buffer/buf_str.c | 11 +
crypto/external/bsd/openssl/dist/crypto/buffer/buffer.h | 1 +
crypto/external/bsd/openssl/dist/crypto/camellia/Makefile | 2 +
crypto/external/bsd/openssl/dist/crypto/camellia/asm/cmll-x86_64.pl | 4 +-
crypto/external/bsd/openssl/dist/crypto/camellia/asm/cmllt4-sparcv9.pl | 929 +
crypto/external/bsd/openssl/dist/crypto/cast/cast_lcl.h | 2 +
crypto/external/bsd/openssl/dist/crypto/cmac/cmac.c | 8 +
crypto/external/bsd/openssl/dist/crypto/cms/Makefile | 49 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms.h | 52 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_asn1.c | 86 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_enc.c | 12 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_env.c | 322 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_err.c | 18 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_ess.c | 3 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_kari.c | 465 +
crypto/external/bsd/openssl/dist/crypto/cms/cms_lcl.h | 32 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_lib.c | 63 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_sd.c | 207 +-
crypto/external/bsd/openssl/dist/crypto/cms/cms_smime.c | 54 +-
crypto/external/bsd/openssl/dist/crypto/comp/comp.h | 4 +-
crypto/external/bsd/openssl/dist/crypto/conf/conf_def.h | 44 +-
crypto/external/bsd/openssl/dist/crypto/conf/conf_mod.c | 4 +
crypto/external/bsd/openssl/dist/crypto/conf/keysets.pl | 116 +-
crypto/external/bsd/openssl/dist/crypto/des/Makefile | 2 +
crypto/external/bsd/openssl/dist/crypto/des/asm/des-586.pl | 4 +-
crypto/external/bsd/openssl/dist/crypto/des/asm/des_enc.m4 | 2 +
crypto/external/bsd/openssl/dist/crypto/des/asm/dest4-sparcv9.pl | 617 +
crypto/external/bsd/openssl/dist/crypto/des/des_locl.h | 4 +-
crypto/external/bsd/openssl/dist/crypto/des/enc_writ.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/dh/Makefile | 50 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh.h | 108 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh_ameth.c | 529 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh_asn1.c | 98 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh_check.c | 82 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh_err.c | 8 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh_kdf.c | 187 +
crypto/external/bsd/openssl/dist/crypto/dh/dh_key.c | 14 +
crypto/external/bsd/openssl/dist/crypto/dh/dh_pmeth.c | 322 +-
crypto/external/bsd/openssl/dist/crypto/dh/dh_rfc5114.c | 285 +
crypto/external/bsd/openssl/dist/crypto/dsa/dsa.h | 3 +
crypto/external/bsd/openssl/dist/crypto/dsa/dsa_err.c | 5 +-
crypto/external/bsd/openssl/dist/crypto/dsa/dsa_gen.c | 374 +-
crypto/external/bsd/openssl/dist/crypto/dsa/dsa_locl.h | 8 +
crypto/external/bsd/openssl/dist/crypto/dsa/dsa_ossl.c | 13 +-
crypto/external/bsd/openssl/dist/crypto/dsa/dsa_pmeth.c | 4 +
crypto/external/bsd/openssl/dist/crypto/dso/dso_lib.c | 1 +
crypto/external/bsd/openssl/dist/crypto/dso/dso_win32.c | 39 +-
crypto/external/bsd/openssl/dist/crypto/ec/Makefile | 45 +-
crypto/external/bsd/openssl/dist/crypto/ec/asm/ecp_nistz256-avx2.pl | 2093 ++
crypto/external/bsd/openssl/dist/crypto/ec/asm/ecp_nistz256-x86_64.pl | 3007 +++
crypto/external/bsd/openssl/dist/crypto/ec/ec_curve.c | 643 +-
crypto/external/bsd/openssl/dist/crypto/ec/ec_cvt.c | 12 +
crypto/external/bsd/openssl/dist/crypto/ec/ec_err.c | 15 +-
crypto/external/bsd/openssl/dist/crypto/ec/ec_key.c | 15 +-
crypto/external/bsd/openssl/dist/crypto/ec/ec_lcl.h | 25 +
crypto/external/bsd/openssl/dist/crypto/ec/ec_lib.c | 81 +-
crypto/external/bsd/openssl/dist/crypto/ec/ec_pmeth.c | 220 +-
crypto/external/bsd/openssl/dist/crypto/ec/eck_prn.c | 8 +
crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistp224.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistp256.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistp521.c | 14 +-
crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistz256.c | 1568 +
crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistz256_table.c | 9533 ++++++++++
crypto/external/bsd/openssl/dist/crypto/ecdh/Makefile | 12 +-
crypto/external/bsd/openssl/dist/crypto/ecdh/ecdh.h | 7 +
crypto/external/bsd/openssl/dist/crypto/ecdh/ecdhtest.c | 170 +
crypto/external/bsd/openssl/dist/crypto/ecdh/ech_kdf.c | 111 +
crypto/external/bsd/openssl/dist/crypto/ecdh/ech_ossl.c | 10 +
crypto/external/bsd/openssl/dist/crypto/ecdsa/ecdsa.h | 75 +
crypto/external/bsd/openssl/dist/crypto/ecdsa/ecs_err.c | 1 +
crypto/external/bsd/openssl/dist/crypto/ecdsa/ecs_lib.c | 77 +
crypto/external/bsd/openssl/dist/crypto/ecdsa/ecs_locl.h | 6 +-
crypto/external/bsd/openssl/dist/crypto/ecdsa/ecs_ossl.c | 28 +-
crypto/external/bsd/openssl/dist/crypto/engine/eng_dyn.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/evp/bio_enc.c | 21 +-
crypto/external/bsd/openssl/dist/crypto/evp/bio_ok.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/evp/c_all.c | 5 -
crypto/external/bsd/openssl/dist/crypto/evp/c_allc.c | 11 +
crypto/external/bsd/openssl/dist/crypto/evp/digest.c | 28 +-
crypto/external/bsd/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha1.c | 458 +-
crypto/external/bsd/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha256.c | 985 +
crypto/external/bsd/openssl/dist/crypto/evp/e_camellia.c | 329 +-
crypto/external/bsd/openssl/dist/crypto/evp/e_des.c | 60 +-
crypto/external/bsd/openssl/dist/crypto/evp/e_des3.c | 274 +-
crypto/external/bsd/openssl/dist/crypto/evp/e_null.c | 3 -
crypto/external/bsd/openssl/dist/crypto/evp/e_rc4_hmac_md5.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/evp/e_seed.c | 3 +-
crypto/external/bsd/openssl/dist/crypto/evp/evp.h | 56 +-
crypto/external/bsd/openssl/dist/crypto/evp/evp_err.c | 5 +-
crypto/external/bsd/openssl/dist/crypto/evp/evp_extra_test.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/evp/evp_lib.c | 55 +
crypto/external/bsd/openssl/dist/crypto/evp/evp_locl.h | 3 +
crypto/external/bsd/openssl/dist/crypto/evp/evp_test.c | 206 +-
crypto/external/bsd/openssl/dist/crypto/evp/evptests.txt | 67 +
crypto/external/bsd/openssl/dist/crypto/evp/m_dss.c | 2 -
crypto/external/bsd/openssl/dist/crypto/evp/m_dss1.c | 3 -
crypto/external/bsd/openssl/dist/crypto/evp/m_ecdsa.c | 2 -
crypto/external/bsd/openssl/dist/crypto/evp/m_sigver.c | 44 +-
crypto/external/bsd/openssl/dist/crypto/evp/p_lib.c | 10 +-
crypto/external/bsd/openssl/dist/crypto/evp/pmeth_gn.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/evp/pmeth_lib.c | 8 +-
crypto/external/bsd/openssl/dist/crypto/hmac/hm_ameth.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/jpake/jpake.c | 5 +
crypto/external/bsd/openssl/dist/crypto/md2/md2_dgst.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/md5/Makefile | 3 +
crypto/external/bsd/openssl/dist/crypto/md5/asm/md5-sparcv9.pl | 430 +
crypto/external/bsd/openssl/dist/crypto/mdc2/mdc2dgst.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/modes/Makefile | 24 +-
crypto/external/bsd/openssl/dist/crypto/modes/asm/aesni-gcm-x86_64.pl | 1057 +
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghash-armv4.pl | 231 +-
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghash-s390x.pl | 10 +-
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghash-sparcv9.pl | 249 +-
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghash-x86.pl | 199 +-
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghash-x86_64.pl | 1153 +-
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghashp8-ppc.pl | 234 +
crypto/external/bsd/openssl/dist/crypto/modes/asm/ghashv8-armx.pl | 409 +
crypto/external/bsd/openssl/dist/crypto/modes/cbc128.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c | 98 +-
crypto/external/bsd/openssl/dist/crypto/modes/modes_lcl.h | 50 +-
crypto/external/bsd/openssl/dist/crypto/modes/wrap128.c | 138 +
crypto/external/bsd/openssl/dist/crypto/objects/obj_dat.h | 234 +-
crypto/external/bsd/openssl/dist/crypto/objects/obj_mac.h | 163 +
crypto/external/bsd/openssl/dist/crypto/objects/obj_mac.num | 38 +
crypto/external/bsd/openssl/dist/crypto/objects/obj_xref.h | 25 +
crypto/external/bsd/openssl/dist/crypto/objects/obj_xref.txt | 12 +
crypto/external/bsd/openssl/dist/crypto/objects/objects.txt | 58 +
crypto/external/bsd/openssl/dist/crypto/objects/objxref.pl | 3 +-
crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp.h | 17 +-
crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp_cl.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp_ext.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp_ht.c | 151 +-
crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp_lib.c | 14 +-
crypto/external/bsd/openssl/dist/crypto/pem/Makefile | 13 +-
crypto/external/bsd/openssl/dist/crypto/pem/pem.h | 18 +-
crypto/external/bsd/openssl/dist/crypto/pem/pem_all.c | 5 +-
crypto/external/bsd/openssl/dist/crypto/pem/pem_err.c | 5 +-
crypto/external/bsd/openssl/dist/crypto/pem/pem_lib.c | 31 +-
crypto/external/bsd/openssl/dist/crypto/pem/pem_pkey.c | 50 +
crypto/external/bsd/openssl/dist/crypto/pem/pvkfmt.c | 7 +
crypto/external/bsd/openssl/dist/crypto/perlasm/ppc-xlate.pl | 101 +-
crypto/external/bsd/openssl/dist/crypto/perlasm/sparcv9_modes.pl | 1691 +
crypto/external/bsd/openssl/dist/crypto/perlasm/x86_64-xlate.pl | 93 +-
crypto/external/bsd/openssl/dist/crypto/perlasm/x86asm.pl | 38 +
crypto/external/bsd/openssl/dist/crypto/perlasm/x86masm.pl | 4 +-
crypto/external/bsd/openssl/dist/crypto/perlasm/x86nasm.pl | 4 +-
crypto/external/bsd/openssl/dist/crypto/pkcs12/p12_mutl.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/pkcs12/p12_npas.c | 111 +-
crypto/external/bsd/openssl/dist/crypto/pkcs12/p12_p8e.c | 6 +-
crypto/external/bsd/openssl/dist/crypto/pkcs12/p12_utl.c | 4 +
crypto/external/bsd/openssl/dist/crypto/pkcs12/pkcs12.h | 2 +-
crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_smime.c | 32 +-
crypto/external/bsd/openssl/dist/crypto/rand/rand_vms.c | 123 +-
crypto/external/bsd/openssl/dist/crypto/rand/rand_win.c | 37 +-
crypto/external/bsd/openssl/dist/crypto/rc4/asm/rc4-586.pl | 8 +-
crypto/external/bsd/openssl/dist/crypto/rc4/rc4_enc.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/rsa/rsa_ameth.c | 548 +-
crypto/external/bsd/openssl/dist/crypto/rsa/rsa_asn1.c | 8 +
crypto/external/bsd/openssl/dist/crypto/rsa/rsa_chk.c | 89 +-
crypto/external/bsd/openssl/dist/crypto/rsa/rsa_lib.c | 1 +
crypto/external/bsd/openssl/dist/crypto/rsa/rsa_pmeth.c | 163 +-
crypto/external/bsd/openssl/dist/crypto/sha/Makefile | 17 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-586.pl | 365 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-armv4-large.pl | 451 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-armv8.pl | 338 +
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-mb-x86_64.pl | 1574 +
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-mips.pl | 98 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-ppc.pl | 52 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-s390x.pl | 7 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-sparcv9.pl | 165 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha256-586.pl | 1270 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha256-armv4.pl | 644 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha256-mb-x86_64.pl | 1560 +
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-586.pl | 523 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-armv4.pl | 69 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-armv8.pl | 422 +
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-ia64.pl | 351 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-mips.pl | 79 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-ppc.pl | 466 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-s390x.pl | 7 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-sparcv9.pl | 320 +-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512-x86_64.pl | 2043 ++-
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha512p8-ppc.pl | 424 +
crypto/external/bsd/openssl/dist/crypto/sha/sha512.c | 13 +
crypto/external/bsd/openssl/dist/crypto/srp/Makefile | 3 +
crypto/external/bsd/openssl/dist/crypto/srp/srp_lib.c | 26 +-
crypto/external/bsd/openssl/dist/crypto/srp/srp_vfy.c | 45 +-
crypto/external/bsd/openssl/dist/crypto/srp/srptest.c | 1 +
crypto/external/bsd/openssl/dist/crypto/stack/stack.c | 36 +-
crypto/external/bsd/openssl/dist/crypto/stack/stack.h | 1 +
crypto/external/bsd/openssl/dist/crypto/ts/ts.h | 3 +
crypto/external/bsd/openssl/dist/crypto/ts/ts_lib.c | 5 +-
crypto/external/bsd/openssl/dist/crypto/ts/ts_rsp_sign.c | 7 +-
crypto/external/bsd/openssl/dist/crypto/ts/ts_rsp_verify.c | 29 +-
crypto/external/bsd/openssl/dist/crypto/ui/ui_lib.c | 2 +
crypto/external/bsd/openssl/dist/crypto/whrlpool/asm/wp-mmx.pl | 42 +-
crypto/external/bsd/openssl/dist/crypto/whrlpool/asm/wp-x86_64.pl | 43 +-
crypto/external/bsd/openssl/dist/crypto/whrlpool/wp_dgst.c | 3 +-
crypto/external/bsd/openssl/dist/crypto/x509/Makefile | 22 +-
crypto/external/bsd/openssl/dist/crypto/x509/by_dir.c | 4 +
crypto/external/bsd/openssl/dist/crypto/x509/verify_extra_test.c | 3 +-
crypto/external/bsd/openssl/dist/crypto/x509/vpm_int.h | 70 +
crypto/external/bsd/openssl/dist/crypto/x509/x509.h | 32 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_att.c | 12 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_cmp.c | 146 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_err.c | 11 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_lu.c | 26 +
crypto/external/bsd/openssl/dist/crypto/x509/x509_obj.c | 2 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_r2x.c | 14 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_set.c | 5 +
crypto/external/bsd/openssl/dist/crypto/x509/x509_trs.c | 8 +
crypto/external/bsd/openssl/dist/crypto/x509/x509_txt.c | 27 +
crypto/external/bsd/openssl/dist/crypto/x509/x509_vfy.h | 65 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509_vpm.c | 253 +-
crypto/external/bsd/openssl/dist/crypto/x509/x509spki.c | 2 +
crypto/external/bsd/openssl/dist/crypto/x509/x_all.c | 14 +
crypto/external/bsd/openssl/dist/crypto/x509v3/Makefile | 20 +-
crypto/external/bsd/openssl/dist/crypto/x509v3/ext_dat.h | 3 +
crypto/external/bsd/openssl/dist/crypto/x509v3/v3_alt.c | 2 +
crypto/external/bsd/openssl/dist/crypto/x509v3/v3_conf.c | 4 +-
crypto/external/bsd/openssl/dist/crypto/x509v3/v3_lib.c | 22 +
crypto/external/bsd/openssl/dist/crypto/x509v3/v3_purp.c | 46 +-
crypto/external/bsd/openssl/dist/crypto/x509v3/v3_scts.c | 334 +
crypto/external/bsd/openssl/dist/crypto/x509v3/v3_utl.c | 432 +
crypto/external/bsd/openssl/dist/crypto/x509v3/v3err.c | 9 +-
crypto/external/bsd/openssl/dist/crypto/x509v3/v3nametest.c | 346 +
crypto/external/bsd/openssl/dist/crypto/x509v3/x509v3.h | 44 +-
crypto/external/bsd/openssl/dist/demos/bio/Makefile | 10 +-
crypto/external/bsd/openssl/dist/demos/bio/README | 4 +
crypto/external/bsd/openssl/dist/demos/bio/accept.cnf | 13 +
crypto/external/bsd/openssl/dist/demos/bio/client-arg.c | 111 +
crypto/external/bsd/openssl/dist/demos/bio/client-conf.c | 120 +
crypto/external/bsd/openssl/dist/demos/bio/connect.cnf | 9 +
crypto/external/bsd/openssl/dist/demos/bio/saccept.c | 8 +-
crypto/external/bsd/openssl/dist/demos/bio/server-arg.c | 144 +
crypto/external/bsd/openssl/dist/demos/bio/server-conf.c | 138 +
crypto/external/bsd/openssl/dist/demos/bio/server.pem | 78 +-
crypto/external/bsd/openssl/dist/engines/Makefile | 30 +-
crypto/external/bsd/openssl/dist/engines/ccgost/Makefile | 11 +-
crypto/external/bsd/openssl/dist/engines/ccgost/gost2001.c | 10 +-
crypto/external/bsd/openssl/dist/engines/ccgost/gost89.c | 19 +-
crypto/external/bsd/openssl/dist/engines/ccgost/gost_ameth.c | 14 +
crypto/external/bsd/openssl/dist/engines/ccgost/gost_crypt.c | 4 +-
crypto/external/bsd/openssl/dist/engines/ccgost/gost_pmeth.c | 12 +
crypto/external/bsd/openssl/dist/engines/e_4758cca.c | 8 +
crypto/external/bsd/openssl/dist/engines/e_aep.c | 3 +-
crypto/external/bsd/openssl/dist/engines/e_capi.c | 187 +-
crypto/external/bsd/openssl/dist/engines/e_chil.c | 35 +-
crypto/external/bsd/openssl/dist/engines/vendor_defns/hwcryptohook.h | 188 +-
crypto/external/bsd/openssl/dist/ssl/bad_dtls_test.c | 923 +
crypto/external/bsd/openssl/dist/ssl/clienthellotest.c | 1 +
crypto/external/bsd/openssl/dist/ssl/d1_clnt.c | 927 +-
crypto/external/bsd/openssl/dist/ssl/d1_meth.c | 26 +-
crypto/external/bsd/openssl/dist/ssl/dtlstest.c | 147 +
crypto/external/bsd/openssl/dist/ssl/heartbeat_test.c | 38 +-
crypto/external/bsd/openssl/dist/ssl/s2_clnt.c | 20 +-
crypto/external/bsd/openssl/dist/ssl/s3_both.c | 164 +-
crypto/external/bsd/openssl/dist/ssl/ssl_algs.c | 4 +
crypto/external/bsd/openssl/dist/ssl/ssl_asn1.c | 3 +
crypto/external/bsd/openssl/dist/ssl/ssl_cert.c | 553 +-
crypto/external/bsd/openssl/dist/ssl/ssl_conf.c | 691 +
crypto/external/bsd/openssl/dist/ssl/ssl_rsa.c | 311 +-
crypto/external/bsd/openssl/dist/ssl/ssl_sess.c | 45 +-
crypto/external/bsd/openssl/dist/ssl/ssl_txt.c | 2 +
crypto/external/bsd/openssl/dist/ssl/sslv2conftest.c | 231 +
crypto/external/bsd/openssl/dist/ssl/t1_clnt.c | 8 +-
crypto/external/bsd/openssl/dist/ssl/t1_ext.c | 300 +
crypto/external/bsd/openssl/dist/ssl/t1_meth.c | 9 +-
crypto/external/bsd/openssl/dist/ssl/t1_srvr.c | 9 +-
crypto/external/bsd/openssl/dist/ssl/t1_trce.c | 1266 +
crypto/external/bsd/openssl/dist/test/certs/pss1.pem | 21 +
crypto/external/bsd/openssl/dist/test/cms-test.pl | 163 +
crypto/external/bsd/openssl/dist/test/evptests.txt | 67 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D1_Cert_EE.pem | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D1_Issuer_ICA.pem | 27 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D2_Cert_ICA.pem | 26 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D2_Issuer_Root.pem | 21 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D3_Cert_EE.pem | 31 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/D3_Issuer_Root.pem | 83 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISDOSC_D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISDOSC_D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISDOSC_D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISIC_D1_Issuer_ICA.pem | 27 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISIC_D2_Issuer_Root.pem | 21 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISIC_D3_Issuer_Root.pem | 41 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISIC_ND1_Issuer_ICA.pem | 29 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISIC_ND2_Issuer_Root.pem | 23 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISIC_ND3_Issuer_Root.pem | 25 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISOP_D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISOP_D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISOP_D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISOP_ND1.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISOP_ND2.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ISOP_ND3.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND1.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND1_Cert_EE.pem | 36 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND1_Issuer_ICA.pem | 29 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND2.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND2_Cert_ICA.pem | 29 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND2_Issuer_Root.pem | 23 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND3.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND3_Cert_EE.pem | 34 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/ND3_Issuer_Root.pem | 25 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WIKH_D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WIKH_D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WIKH_D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WIKH_ND1.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WIKH_ND2.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WIKH_ND3.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WINH_D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WINH_D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WINH_D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WINH_ND1.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WINH_ND2.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WINH_ND3.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKDOSC_D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKDOSC_D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKDOSC_D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKIC_D1_Issuer_ICA.pem | 27 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKIC_D2_Issuer_Root.pem | 21 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKIC_D3_Issuer_Root.pem | 41 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKIC_ND1_Issuer_ICA.pem | 29 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKIC_ND2_Issuer_Root.pem | 23 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WKIC_ND3_Issuer_Root.pem | 25 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WRID_D1.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WRID_D2.ors | 32 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WRID_D3.ors | 38 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WRID_ND1.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WRID_ND2.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WRID_ND3.ors | 10 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WSNIC_D1_Issuer_ICA.pem | 27 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WSNIC_D2_Issuer_Root.pem | 21 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WSNIC_D3_Issuer_Root.pem | 41 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WSNIC_ND1_Issuer_ICA.pem | 29 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WSNIC_ND2_Issuer_Root.pem | 23 +
crypto/external/bsd/openssl/dist/test/ocsp-tests/WSNIC_ND3_Issuer_Root.pem | 25 +
crypto/external/bsd/openssl/dist/test/serverinfo.pem | 16 +
crypto/external/bsd/openssl/dist/test/smime-certs/ca.cnf | 66 +
crypto/external/bsd/openssl/dist/test/smime-certs/mksmime-certs.sh | 74 +
crypto/external/bsd/openssl/dist/test/smime-certs/smdh.pem | 33 +
crypto/external/bsd/openssl/dist/test/smime-certs/smdsa1.pem | 75 +-
crypto/external/bsd/openssl/dist/test/smime-certs/smdsa2.pem | 75 +-
crypto/external/bsd/openssl/dist/test/smime-certs/smdsa3.pem | 75 +-
crypto/external/bsd/openssl/dist/test/smime-certs/smec1.pem | 22 +
crypto/external/bsd/openssl/dist/test/smime-certs/smec2.pem | 23 +
crypto/external/bsd/openssl/dist/test/smime-certs/smroot.pem | 75 +-
crypto/external/bsd/openssl/dist/test/smime-certs/smrsa1.pem | 74 +-
crypto/external/bsd/openssl/dist/test/smime-certs/smrsa2.pem | 74 +-
crypto/external/bsd/openssl/dist/test/smime-certs/smrsa3.pem | 74 +-
crypto/external/bsd/openssl/dist/test/ssltestlib.c | 687 +
crypto/external/bsd/openssl/dist/test/ssltestlib.h | 36 +
crypto/external/bsd/openssl/dist/test/tcrl | 48 +-
crypto/external/bsd/openssl/dist/test/testenc | 2 +-
crypto/external/bsd/openssl/dist/test/tocsp | 147 +
crypto/external/bsd/openssl/dist/test/tocsp.com | 152 +
crypto/external/bsd/openssl/dist/test/tpkcs7 | 26 +-
crypto/external/bsd/openssl/dist/test/tpkcs7d | 20 +-
crypto/external/bsd/openssl/dist/test/treq | 48 +-
crypto/external/bsd/openssl/dist/test/trsa | 48 +-
crypto/external/bsd/openssl/dist/test/tsid | 48 +-
crypto/external/bsd/openssl/dist/test/tx509 | 61 +-
crypto/external/bsd/openssl/dist/tools/c_rehash | 78 +-
crypto/external/bsd/openssl/dist/tools/c_rehash.in | 78 +-
crypto/external/bsd/openssl/dist/util/copy-if-different.pl | 78 +
crypto/external/bsd/openssl/dist/util/domd | 3 +-
crypto/external/bsd/openssl/dist/util/files.pl | 8 +-
crypto/external/bsd/openssl/dist/util/libeay.num | 102 +-
crypto/external/bsd/openssl/dist/util/mkerr.pl | 46 +-
crypto/external/bsd/openssl/dist/util/mkstack.pl | 4 +-
crypto/external/bsd/openssl/dist/util/pl/BC-32.pl | 2 +-
crypto/external/bsd/openssl/dist/util/pl/VC-32.pl | 34 +-
crypto/external/bsd/openssl/dist/util/pl/unix.pl | 350 +-
crypto/external/bsd/openssl/dist/util/shlib_wrap.sh | 9 +
437 files changed, 67010 insertions(+), 5655 deletions(-)
diffs (truncated from 85327 to 300 lines):
diff -r 4d74b98c4187 -r 5a9a47eb4e70 crypto/external/bsd/openssl/dist/crypto/asn1/Makefile
--- a/crypto/external/bsd/openssl/dist/crypto/asn1/Makefile Fri Oct 14 16:02:35 2016 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/asn1/Makefile Fri Oct 14 16:02:36 2016 +0000
@@ -176,7 +176,7 @@
a_gentm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
a_gentm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
a_gentm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-a_gentm.o: ../cryptlib.h ../o_time.h a_gentm.c
+a_gentm.o: ../cryptlib.h ../o_time.h a_gentm.c asn1_locl.h
a_i2d_fp.o: ../../e_os.h ../../include/openssl/asn1.h
a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
a_i2d_fp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
@@ -277,6 +277,7 @@
a_time.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
a_time.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
a_time.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_time.c
+a_time.o: asn1_locl.h
a_type.o: ../../e_os.h ../../include/openssl/asn1.h
a_type.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
a_type.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -293,7 +294,7 @@
a_utctm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
a_utctm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
a_utctm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-a_utctm.o: ../cryptlib.h ../o_time.h a_utctm.c
+a_utctm.o: ../cryptlib.h ../o_time.h a_utctm.c asn1_locl.h
a_utf8.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
a_utf8.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
a_utf8.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
diff -r 4d74b98c4187 -r 5a9a47eb4e70 crypto/external/bsd/openssl/dist/crypto/asn1/a_strnid.c
--- a/crypto/external/bsd/openssl/dist/crypto/asn1/a_strnid.c Fri Oct 14 16:02:35 2016 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/asn1/a_strnid.c Fri Oct 14 16:02:36 2016 +0000
@@ -250,6 +250,7 @@
}
tmp->flags = flags | STABLE_FLAGS_MALLOC;
tmp->nid = nid;
+ tmp->minsize = tmp->maxsize = -1;
new_nid = 1;
} else
tmp->flags = (tmp->flags & STABLE_FLAGS_MALLOC) | flags;
diff -r 4d74b98c4187 -r 5a9a47eb4e70 crypto/external/bsd/openssl/dist/crypto/asn1/a_time.c
--- a/crypto/external/bsd/openssl/dist/crypto/asn1/a_time.c Fri Oct 14 16:02:35 2016 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/asn1/a_time.c Fri Oct 14 16:02:36 2016 +0000
@@ -66,6 +66,7 @@
#include "cryptlib.h"
#include "o_time.h"
#include <openssl/asn1t.h>
+#include "asn1_locl.h"
IMPLEMENT_ASN1_MSTRING(ASN1_TIME, B_ASN1_TIME)
@@ -196,3 +197,32 @@
return 1;
}
+
+static int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *t)
+{
+ if (t == NULL) {
+ time_t now_t;
+ time(&now_t);
+ if (OPENSSL_gmtime(&now_t, tm))
+ return 1;
+ return 0;
+ }
+
+ if (t->type == V_ASN1_UTCTIME)
+ return asn1_utctime_to_tm(tm, t);
+ else if (t->type == V_ASN1_GENERALIZEDTIME)
+ return asn1_generalizedtime_to_tm(tm, t);
+
+ return 0;
+}
+
+int ASN1_TIME_diff(int *pday, int *psec,
+ const ASN1_TIME *from, const ASN1_TIME *to)
+{
+ struct tm tm_from, tm_to;
+ if (!asn1_time_to_tm(&tm_from, from))
+ return 0;
+ if (!asn1_time_to_tm(&tm_to, to))
+ return 0;
+ return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to);
+}
diff -r 4d74b98c4187 -r 5a9a47eb4e70 crypto/external/bsd/openssl/dist/crypto/asn1/a_utctm.c
--- a/crypto/external/bsd/openssl/dist/crypto/asn1/a_utctm.c Fri Oct 14 16:02:35 2016 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/asn1/a_utctm.c Fri Oct 14 16:02:36 2016 +0000
@@ -61,6 +61,7 @@
#include "cryptlib.h"
#include "o_time.h"
#include <openssl/asn1.h>
+#include "asn1_locl.h"
#if 0
int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp)
@@ -109,7 +110,7 @@
#endif
-int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
+int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d)
{
static const int min[8] = { 0, 1, 1, 0, 0, 0, 0, 0 };
static const int max[8] = { 99, 12, 31, 23, 59, 59, 12, 59 };
@@ -127,6 +128,8 @@
for (i = 0; i < 6; i++) {
if ((i == 5) && ((a[o] == 'Z') || (a[o] == '+') || (a[o] == '-'))) {
i++;
+ if (tm)
+ tm->tm_sec = 0;
break;
}
if ((a[o] < '0') || (a[o] > '9'))
@@ -143,10 +146,33 @@
if ((n < min[i]) || (n > max[i]))
goto err;
+ if (tm) {
+ switch (i) {
+ case 0:
+ tm->tm_year = n < 50 ? n + 100 : n;
+ break;
+ case 1:
+ tm->tm_mon = n - 1;
+ break;
+ case 2:
+ tm->tm_mday = n;
+ break;
+ case 3:
+ tm->tm_hour = n;
+ break;
+ case 4:
+ tm->tm_min = n;
+ break;
+ case 5:
+ tm->tm_sec = n;
+ break;
+ }
+ }
}
if (a[o] == 'Z')
o++;
else if ((a[o] == '+') || (a[o] == '-')) {
+ int offsign = a[o] == '-' ? -1 : 1, offset = 0;
o++;
if (o + 4 > l)
goto err;
@@ -160,12 +186,25 @@
n = (n * 10) + a[o] - '0';
if ((n < min[i]) || (n > max[i]))
goto err;
+ if (tm) {
+ if (i == 6)
+ offset = n * 3600;
+ else if (i == 7)
+ offset += n * 60;
+ }
o++;
}
+ if (offset && !OPENSSL_gmtime_adj(tm, 0, offset * offsign))
+ return 0;
}
- return (o == l);
+ return o == l;
err:
- return (0);
+ return 0;
+}
+
+int ASN1_UTCTIME_check(const ASN1_UTCTIME *d)
+{
+ return asn1_utctime_to_tm(NULL, d);
}
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str)
@@ -249,43 +288,26 @@
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
{
- struct tm *tm;
- struct tm data;
- int offset;
- int year;
-
-#define g2(p) (((p)[0]-'0')*10+(p)[1]-'0')
+ struct tm stm, ttm;
+ int day, sec;
- if (s->data[12] == 'Z')
- offset = 0;
- else {
- offset = g2(s->data + 13) * 60 + g2(s->data + 15);
- if (s->data[12] == '-')
- offset = -offset;
- }
+ if (!asn1_utctime_to_tm(&stm, s))
+ return -2;
- t -= offset * 60; /* FIXME: may overflow in extreme cases */
-
- tm = OPENSSL_gmtime(&t, &data);
- /*
- * NB: -1, 0, 1 already valid return values so use -2 to indicate error.
- */
- if (tm == NULL)
+ if (!OPENSSL_gmtime(&t, &ttm))
return -2;
-#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
- year = g2(s->data);
- if (year < 50)
- year += 100;
- return_cmp(year, tm->tm_year);
- return_cmp(g2(s->data + 2) - 1, tm->tm_mon);
- return_cmp(g2(s->data + 4), tm->tm_mday);
- return_cmp(g2(s->data + 6), tm->tm_hour);
- return_cmp(g2(s->data + 8), tm->tm_min);
- return_cmp(g2(s->data + 10), tm->tm_sec);
-#undef g2
-#undef return_cmp
+ if (!OPENSSL_gmtime_diff(&day, &sec, &ttm, &stm))
+ return -2;
+ if (day > 0)
+ return 1;
+ if (day < 0)
+ return -1;
+ if (sec > 0)
+ return 1;
+ if (sec < 0)
+ return -1;
return 0;
}
diff -r 4d74b98c4187 -r 5a9a47eb4e70 crypto/external/bsd/openssl/dist/crypto/asn1/asn1_lib.c
--- a/crypto/external/bsd/openssl/dist/crypto/asn1/asn1_lib.c Fri Oct 14 16:02:35 2016 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/asn1/asn1_lib.c Fri Oct 14 16:02:36 2016 +0000
@@ -256,26 +256,30 @@
int ASN1_object_size(int constructed, int length, int tag)
{
- int ret;
-
- ret = length;
- ret++;
+ int ret = 1;
+ if (length < 0)
+ return -1;
if (tag >= 31) {
while (tag > 0) {
tag >>= 7;
ret++;
}
}
- if (constructed == 2)
- return ret + 3;
- ret++;
- if (length > 127) {
- while (length > 0) {
- length >>= 8;
- ret++;
+ if (constructed == 2) {
+ ret += 3;
+ } else {
+ ret++;
+ if (length > 127) {
+ int tmplen = length;
+ while (tmplen > 0) {
+ tmplen >>= 8;
+ ret++;
+ }
}
}
- return (ret);
+ if (ret >= INT_MAX - length)
+ return -1;
+ return ret + length;
}
static int _asn1_Finish(ASN1_const_CTX *c)
@@ -324,7 +328,7 @@
return (0);
}
if (c->inf == (1 | V_ASN1_CONSTRUCTED))
- c->slen = *length + *(c->pp) - c->p;
+ c->slen = *length;
c->eos = 0;
return (1);
}
@@ -366,7 +370,7 @@
else
len = strlen(data);
}
- if ((str->length < len) || (str->data == NULL)) {
+ if ((str->length <= len) || (str->data == NULL)) {
c = str->data;
if (c == NULL)
str->data = OPENSSL_malloc(len + 1);
diff -r 4d74b98c4187 -r 5a9a47eb4e70 crypto/external/bsd/openssl/dist/crypto/asn1/asn1_locl.h
--- a/crypto/external/bsd/openssl/dist/crypto/asn1/asn1_locl.h Fri Oct 14 16:02:35 2016 +0000
Home |
Main Index |
Thread Index |
Old Index