head 1.8; access; symbols pkgsrc-2022Q1:1.7.0.10 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.8 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.6 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.4 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.2 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.6.0.12 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.10 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.8 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.4 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.6 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.2 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.5.0.20 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.18 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.16 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.14 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.12 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.10 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.8 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.6 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.2 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.4.0.2 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.3.0.2 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.1.0.4 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.2 pkgsrc-2016Q2-base:1.1; locks; strict; comment @// @; 1.8 date 2022.04.01.08.07.29; author wiz; state dead; branches; next 1.7; commitid g2PBalMf4KIDityD; 1.7 date 2021.03.07.17.56.25; author he; state Exp; branches; next 1.6; commitid HRlbuq885oGd5pKC; 1.6 date 2019.07.15.18.31.29; author bsiegert; state Exp; branches; next 1.5; commitid hcLOzYzg99OwBavB; 1.5 date 2017.04.10.21.14.45; author joerg; state Exp; branches; next 1.4; commitid a9tFT2Y65Jlp12Nz; 1.4 date 2017.01.16.01.50.14; author joerg; state Exp; branches; next 1.3; commitid mwmRQm79XzjJj8Cz; 1.3 date 2016.11.11.19.44.51; author joerg; state Exp; branches 1.3.2.1; next 1.2; commitid r44e4bjsBB6TnKtz; 1.2 date 2016.11.11.19.41.44; author joerg; state Exp; branches; next 1.1; commitid hoLfpoZgKqZAkKtz; 1.1 date 2016.05.19.21.58.43; author joerg; state Exp; branches; next ; commitid eJiO3Ysuf1e8J87z; 1.3.2.1 date 2017.01.20.18.35.38; author bsiegert; state Exp; branches; next ; commitid H8dtUKEaNeDKKJCz; desc @@ 1.8 log @*: finish move of botan to versioned directories @ text @$NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.7 2021/03/07 17:56:25 he Exp $ Add check for ability to do mlock() on SunOS. --- src/lib/utils/os_utils.cpp.orig 2019-07-15 18:14:39.932394200 +0000 +++ src/lib/utils/os_utils.cpp @@@@ -325,7 +325,21 @@@@ size_t OS::system_page_size() size_t OS::get_memory_locking_limit() { -#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) && defined(RLIMIT_MEMLOCK) +#if defined(__sun) + priv_set_t *priv_set = priv_allocset(); + if (priv_set == nullptr) + return 0; + bool can_mlock = false; + + if(getppriv(PRIV_EFFECTIVE, priv_set) == 0) + can_mlock = priv_ismember(priv_set, PRIV_PROC_LOCK_MEMORY); + + priv_freeset(priv_set); + + /* XXX how to obtain the real limit? */ + size_t mlock_requested = BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB; + return can_mlock ? std::min(512 * 1024, mlock_requested) : 0; +#elif defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) && defined(RLIMIT_MEMLOCK) /* * If RLIMIT_MEMLOCK is not defined, likely the OS does not support * unprivileged mlock calls. @ 1.7 log @Update botan-devel to version 2.17.3. Informally OK'ed by joerg@@ Pkgsrc changes: * Add comment the patches which lacked them. * Adjust PLIST. Upstream changes: Version 2.17.3, 2020-12-21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Change base64, base58, base32, and hex encoding and decoding opearations to run in constant time (GH #2549) * Fix a build problem on PPC64 building with Clang (GH #2547) * Fix an install problem introduced in 2.17.2 affecting MSVC 2015 * Fix use of -L flag in linking when configured using ``--with-external-libdir`` (GH #2496) * Fix a build problem on big-endian PowerPC related to VSX instructions in the AES code. (GH #2515) Version 2.17.2, 2020-11-13 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Fix an build problem on ppc64 introduced with certain recent versions of GCC or binutils where using the DARN instruction requires using an appropriate -mcpu flag to enable the instruction in the assembler. (GH #2481 2463) * Resolve an issue in the modular square root algorithm where a loop to find a quadratic non-residue could, for a carefully chosen composite modulus, not terminte in a timely manner. (GH #2482 #2476) * Fix a regression in MinGW builds introduced in 2.17.1 Version 2.17.1, 2020-11-07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Fix a build problem that could occur if Python was not in the PATH. This was known to occur on some installations of macOS. * Re-enable support for the x86 CLMUL instruction on Visual C++, which was accidentally disabled starting in 2.12.0. (GH #2460) Version 2.17.0, 2020-11-05 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Fix a bug in ECDSA which could occur when the group size and hash length differ. In this case, on occasion the generated signature would not be accepted by other ECDSA implementations. This was particularly likely to affect users of 160-bit or 239-bit curves. (GH #2433 #2415) * Fix a bug in ECDSA verification when the public key was chosen to be a small multiple of the group generator. In that case, verification would fail even if the signature was actually valid. (GH #2425) * SIV's functionality of supporting multiple associated data inputs has been generalized onto the AEAD_Mode interface. However at the moment SIV is the only AEAD implemented which supports more than one AD. (GH #2440) * The contents of ASN.1 headers ``asn1_str.h``, ``asn1_time.h``, ``asn1_oid.h`` and ``alg_id.h`` have been moved to ``asn1_obj.h``. The header files remain but simply forward the include to ``asn1_obj.h``. These now-empty header files are deprecated, and will be removed in a future major release. (GH #2441) * The contents of X.509/PKIX headers ``asn1_attribute.h`` ``asn1_alt_name.h`` ``name_constraint.h`` ``x509_dn.h`` ``cert_status.h`` and ``key_constraint.h`` have been merged into ``pkix_enums.h`` (for enumerations) and ``pkix_types.h`` (for all other definitions). The previous header files remain but simply forward the include to the new header containing the definition. These now-empty header files are deprecated, and will be removed in a future major release. (GH #2441) * A number of other headers including those related to HOTP/TOTP, XMSS, PKCS11, PSK_DB have also been merged. Any now deprecated/empty headers simply include the new header and issue a deprecation warning. (GH #2443 #2446 #2447 2448 #2449) * Small optimizations in the non-hardware assisted AES key generation code path (GH #2417 #2418) * Move the GHASH code to a new module in utils, making it possible to build GMAC support without requiring GCM (GH #2416) * Add more detection logic for AVX-512 features (GH #2430) * Avoid std::is_pod which is deprecated in C++20 (GH #2429) * Fix a bug parsing deeply nested cipher names (GH #2426) * Add support for ``aarch64_be`` target CPU (GH #2422) * Fix order of linker flags so they are always applied effectively (GH #2420) * Prevent requesting DER encoding of signatures when the algorithm did not support it (GH #2419) Version 2.16.0, 2020-10-06 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Now userspace PRNG objects (such as AutoSeeded_RNG and HMAC_DRBG) use an internal lock, which allows safe concurrent use. This however is purely a precaution in case of accidental sharing of such RNG objects; for performance reasons it is always preferable to use a RNG per thread if a userspace RNG is needed. (GH #2399) * DL_Group and EC_Group objects now track if they were created from a known trusted group (such as P-256 or an IPsec DH parameter). If so, then verification tests can be relaxed, as compared to parameters which may have been maliciously constructed in order to pass primality checks. (GH #2409) * RandomNumberGenerator::add_entropy_T assumed its input was a POD type but did not verify this. (GH #2403) * Support OCSP responders that live on a non-standard port (GH #2401) * Add support for Solaris sandbox (GH #2385) * Support suffixes on release numbers for alpha/beta releases (GH #2404) * Fix a bug in EAX which allowed requesting a 0 length tag, which had the effect of using a full length tag. Instead omit the length field, or request the full tag length explicitly. (GH #2392 #2390) * Fix a memory leak in GCM where if passed an unsuitable block cipher (eg not 128 bit) it would throw an exception and leak the cipher object. (GH #2392 #2388) Version 2.15.0, 2020-07-07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Fix a bug where the name constraint extension did not constrain the alternative DN field which can be included in a subject alternative name. This would allow a corrupted sub-CA which was otherwise constrained by a name constraint to issue a certificate with a prohibited DN. * Fix a bug in the TLS server during client authentication where where if a (disabled by default) static RSA ciphersuite was selected, then no certificate request would be sent. This would have an equivalent effect to a client which simply replied with an empty Certificate message. (GH #2367) * Replace the T-Tables implementation of AES with a 32-bit bitsliced version. As a result AES is now constant time on all processors. (GH #2346 #2348 #2353 #2329 #2355) * In TLS, enforce that the key usage given in the server certificate allows the operation being performed in the ciphersuite. (GH #2367) * In X.509 certificates, verify that the algorithm parameters are the expected NULL or empty. (GH #2367) * Change the HMAC key schedule to attempt to reduce the information leaked from the key schedule with regards to the length of the key, as this is at times (as for example in PBKDF2) sensitive information. (GH #2362) * Add Processor_RNG which wraps RDRAND or the POWER DARN RNG instructions. The previous RDRAND_RNG interface is deprecated. (GH #2352) * The documentation claimed that mlocked pages were created with a guard page both before and after. However only a trailing guard page was used. Add a leading guard page. (GH #2334) * Add support for generating and verifying DER-encoded ECDSA signatures in the C and Python interfaces. (GH #2357 #2356) * Workaround a bug in GCC's UbSan which triggered on a code sequence in XMSS (GH #2322) * When building documentation using Sphinx avoid parallel builds with version 3.0 due to a bug in that version (GH #2326 #2324) * Fix a memory leak in the CommonCrypto block cipher calls (GH #2371) * Fix a flaky test that would occasionally fail when running the tests with a large number of threads. (GH #2325 #2197) * Additional algorithms are now deprecated: XTEA, GOST, and Tiger. They will be removed in a future major release. Version 2.14.0, 2020-04-06 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Add support for using POWER8+ VPSUMD instruction to accelerate GCM (GH #2247) * Optimize the vector permute AES implementation, especially improving performance on ARMv7, Aarch64, and POWER. (GH #2243) * Use a new algorithm for modular inversions which is both faster and more resistant to side channel attacks. (GH #2287 #2296 #2301) * Address an issue in CBC padding which would leak the length of the plaintext which was being padded. Unpadding during decryption was not affected. Thanks to Maximilian Blochberger for reporting this. (GH #2312) * Optimize NIST prime field reductions, improving ECDSA by 3-9% (GH #2295) * Increase the size of the ECC blinding mask and scale it based on the size of the group order. (GH #880 #893 #2308) * Add server side support for the TLS asio wrapper. (GH #2229) * Add support for using Windows certificate store on MinGW (GH #2280) * Use the library thread pool instead of a new thread for RSA computations, improving signature performance by up to 20%. (GH #2257) * Precompute and cache additional fields in ``X509_Certificate`` (GH #2250) * Add a CLI utility ``cpu_clock`` which estimates the speed of the processor cycle counter. (GH #2251) * Fix a bug which prevented using DER-encoded ECDSA signatures with a PKCS11 key (GH #2293) * Enable use of raw block ciphers from CommonCrypto (GH #2278) * Support for splitting up the amalgamation file by ABI extension has been removed. Instead only ``botan_all.cpp`` and ``botan_all.h`` are generated. (GH #2246) * Improve support for baremetal systems with no underlying OS, with target OS ``none`` (GH #2303 #2304 #2305) * The build system now avoids using ``-rpath=$ORIGIN`` or (on macOS) install_name which allowed running the tests from the build directory without setting ``LD_LIBRARY_PATH``/``DYLD_LIBRARY_PATH`` environment variables. Instead set the dynamic linker variables appropriately, or use ``make check``. (GH #2294 #2302) * Add new option ``--name-amalgamation`` which allows naming the amalgamation output, instead of the default ``botan_all``. (GH #2246) * Avoid using symbolic links on Windows (GH #2288 #2286 #2285) * Fix a bug that prevented compilation of the amalgamation on ARM and POWER processors (GH #2245 #2241) * Fix some build problems under Intel C++ (GH #2260) * Remove use of Toolhelp Windows library, which was known to trigger false positives under some antivirus systems. (GH #2261) * Fix a compilation problem when building on Windows in Unicode mode. Add Unicode build to CI to prevent regressions. (GH #2254 #2256) * Work around a GCC bug affecting old libc (GH #2235) * Workaround a bug in macOS 10.15 which caused a test to crash. (GH #2279 #2268) * Avoid a crash in PKCS8::load_key due to a bug in Clang 8. (GH #2277) Version 2.13.0, 2020-01-06 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Add Roughtime client (GH #2143 #1842) * Add support for XMSS X.509 certificates (GH #2172) * Add support for X.509 CRLs in FFI layer and Python wrapper (GH #2213) * It is now possible to disable TLS v1.0/v1.1 and DTLS v1.0 at build time. (GH #2188) * The format of encrypted TLS sessions has changed, which will invalidate all existing session tickets. The new format will make it easier to support ticket key rotation in the future. (GH #2225) * Improve RSA key generation performance (GH #2148) * Make gcd computation constant-time (GH #2147) * Add AVX2 implementation of SHACAL2 (GH #2196) * Update BSI policy to reflect 2019 update of TR 02102-2 (GH #2195) * Support more functionality for X.509 in the Python API (GH #2165) * Add ``generic`` CPU target useful when building for some new or unusual platform. * Disable MD5 in BSI or NIST modes (GH #2188) * Disable stack protector on MinGW as it causes crashes with some recent versions. (GH #2187) * On Windows the DLL is now installed into the binary directory (GH #2233) * Previously Windows required an explicit ``.lib`` suffix be added when providing an explicit library name, as is used for example for Boost. Now the ``.lib`` suffix is implicit, and should be omitted. * Remove the 32-bit x86 inline asm for Visual C++ as it seemed to not offer much in the way of improved performance. (GH #2204 #256) * Resolve all compile time warnings generated by GCC, Clang and MSVC. Modify CI to compile with warnings-as-errors. (GH #2170 #2206 #2211 #2212) * Fix bugs linking to 3rd party libraries on Windows due to invalid link specifiers. (GH #2210 #2215) * Add long input and NIST Monte-Carlo hash function tests. * Fix a bug introduced in 2.12.0 where ``TLS::Channel::is_active`` and ``TLS::Channel::is_closed`` could simultaneously return true. (GH #2174 #2171) * Use ``std::shared_ptr`` instead of ``boost::shared_ptr`` in some examples. (GH #2155) Version 2.12.1, 2019-10-14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Fix a bug that prevented building with nmake (GH #2142 #2141) * Fix an issue where make install would attempt to build targets which were disabled. (GH #2140) * If the option ``--without-documentation`` is used, avoid invoking the documentation build script. (GH #2138) * Fix a bug that prevented compilation on x86-32 using GCC 4.9 (GH #2139) * Fix a bug in CCM encryption, where it was possible to call ``finish`` without ever setting a nonce (GH #2151 #2150) * Improve ECIES/DLIES interfaces. If no initialization vector was set, they would typically produce hard to understand exceptions. (GH #2151 #2150) Version 2.12.0, 2019-10-07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Many currently public headers are being deprecated. If any such header is included by an application, a warning is issued at compile time. Headers issuing this warning will be made internal in a future major release. (GH #2061) * RSA signature performance improvements (GH #2068 #2070) * Performance improvements for GCM (GH #2024 #2099 #2119), OCB (#2122), XTS (#2123) and ChaCha20Poly1305 (GH #2117), especially for small messages. * Add support for constant time AES using NEON and AltiVec (GH #2093 #2095 #2100) * Improve performance of POWER8 AES instructions (GH #2096) * Add support for the POWER9 hardware random number generator (GH #2026) * Add support for 64-bit version of RDRAND, doubling performance on x86-64 (GH #934 #2022) * In DTLS server, support a client crashing and then reconnecting from the same source port, as described in RFC 6347 sec 4.2.8 (GH #2029) * Optimize DTLS MTU splitting to split precisely to the set MTU (GH #2042) * Add support for the TLS v1.3 downgrade indicator. (GH #2027) * Improve the error messages generated when an invalid TLS state transition occurs (GH #2030) * Fix some edge cases around TLS close_notify support. (GH #2054) * Modifications to support GOST 34.10-2012 signatures (GH #2055 #2056 #1860 #1897) * Add some new APIs on ``OID`` objects (GH #2057) * Properly decode OCSP responses which indicate an error (GH #2110) * Add a function to remove an X.509 extension from an Extensions object. (GH #2101 #2073 #2065) * Support Argon2 outputs longer than 64 bytes (GH #2079 #2078) * Correct a bug in CAST-128 which caused incorrect computation using 11, 13, 14, or 15 byte keys. (GH #2081) * Fix a bug which would cause Streebog to produce incorrect outputs for certain messages (GH #2082 #2083) * Fix a bug that prevented loading EC points with an affine x or y value of 0. For certain curves such points can exist. (GH #2102) * Fix a bug which would cause PBKDF2 to go into a very long loop if it was requested to use an iteration count of 0. (GH #2090 #2088) * The BearSSL provider has been removed (GH #2020) * Add a new ``entropy`` cli which allows sampling the output of the entropy sources. * Add new ``base32_enc`` and ``base32_dec`` cli for base32 encoding operations. (GH #2111) * Support setting TLS policies in CLIs like ``tls_client`` and ``tls_proxy_server`` (GH #2047) * The tests now run in multithreaded mode by default. Provide option ``--test-threads=1`` to return to previous single-threaded behavior. (GH #2071 #2075) * Cleanups in TLS record layer (GH #2021) * Fix typos in some OCSP enums which used "OSCP" instead. (GH #2048) * In the Python module, avoid trying to load DLLs for names that don't match the current platform (GH #2062 #2059) * In the Python module, also look for ``botan.dll`` so Python wrapper can run on Windows. (GH #2059 #2060) * Add support for TOTP algorithm to the Python module. (GH #2112) * Now the minimum Windows target is set to Windows 7 (GH #2036 #2028) * Add ``BOTAN_FORCE_INLINE`` macro to resolve a performance issue with BLAKE2b on MSVC (GH #2092 #2089) * Avoid using ``__GNUG__`` in headers that may be consumed by a C compiler (GH #2013) * Improve the PKCS11 tests (GH #2115) * Fix a warning from Klocwork (GH #2128 #2129) * Fix a bug which caused amalgamation builds to fail on iOS (GH #2045) * Support disabling thread local storage, needed for building on old iOS (GH #2045) * Add a script to help with building for Android, using Docker (GH #2016 #2033 #513) * Add Android NDK build to Travis CI (GH #2017) @ text @d1 1 a1 1 $NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.6 2019/07/15 18:31:29 bsiegert Exp $ @ 1.6 log @Update botan-devel to 2.11.0. There are too many changes to put them in this message. @ text @d1 3 a3 1 $NetBSD$ @ 1.5 log @Update to Botan 2.1.0, the new stable branch. Some of the more important changes: - Fix incorrect truncation in Bcrypt. Passwords in length between 56 and 72 characters were truncated at 56 characters. Found and reported by Solar Designer. (CVE-2017-7252) (GH #938) - Fix a bug in X509 DN string comparisons that could result in out of bound reads. This could result in information leakage, denial of service, or potentially incorrect certificate validation results. Found independently by Cisco Talos team and OSS-Fuzz. (CVE-2017-2801) - Correct minimum work factor for Bcrypt password hashes. All other implementations require the work factor be at least 4. Previously Botan simply required it be greater than zero. (GH #938) - Converge on a single side channel silent EC blinded multiply algorithm. Uses Montgomery ladder with order/2 bits scalar blinding and point randomization now by default. (GH #893) - Add ability to search for certificates using the SHA-256 of the distinguished name. (GH #900) - Support a 0-length IV in ChaCha stream cipher. Such an IV is treated identically to an 8-byte IV of all zeros. - Previously Botan forbid any use of times past 2037 to avoid Y2038 issues. Now this restriction is only in place on systems which have a 32-bit time_t. (GH #933 fixing #917) - Fix a longstanding bug in modular exponentiation which caused most exponentiations modulo an even number to have an incorrect result; such moduli occur only rarely in cryptographic contexts. (GH #754) - Fix a bug in BigInt multiply operation, introduced in 1.11.30, which could cause incorrect results. Found by OSS-Fuzz fuzzing the ressol function, where the bug manifested as an incorrect modular exponentiation. OSS-Fuzz bug #287 - Fix a bug that meant the “ietf/modp/6144” and “ietf/modp/8192” discrete log groups used an incorrect value for the generator, specifically the value (p-1)/2 was used instead of the correct value of 2. - DL_Group strong generation previously set the generator to 2. However sometimes 2 generates the entire group mod p, rather than the subgroup mod q. This is invalid by X9.42 standard, and exposes incautious applications to small subgroup attacks. Now DL_Group uses the smallest g which is a quadratic residue. (GH #818) - The default TLS policy now requires 2048 or larger DH groups by default. - The default Path_Validation_Restrictions constructor has changed to require at least 110 bit signature strength. This means 1024 bit RSA certificates and also SHA-1 certificates are rejected by default. Both settings were already the default for certificate validation in TLS handshake, but this changes it for applications also. - Fix integer overflow during BER decoding, found by Falko Strenzke. This bug is not thought to be directly exploitable but upgrading ASAP is advised. (CVE-2016-9132) - Add post-quantum signature scheme XMSS. Provides either 128 or 256 bit (post-quantum) security, with small public and private keys, fast verification, and reasonably small signatures (2500 bytes for 128-bit security). Signature generation is very slow, on the order of seconds. And very importantly the signature scheme is stateful: each leaf index must only be used once, or all security is lost. In the appropriate system where signatures are rarely generated (such as code signing) XMSS makes an excellent choice. (GH #717 #736) - Add support for client-side OCSP stapling to TLS. (GH #738) - Previously both public and private keys performed automatic self testing after generation or loading. However this often caused unexpected application performance problems, and so has been removed. Instead applications must call check_key explicitly. (GH #704) - Fix TLS session resumption bugs which caused resumption failures if an application used a single session cache for both TLS and DTLS. (GH #688) - The default TLS policy now disables static RSA ciphersuites, all DSA ciphersuites, and the AES CCM-8 ciphersuites. Disabling static RSA by default protects servers from oracle attacks, as well as enforcing a forward secure ciphersuite. Some applications may be forced to re-enable RSA for interop reasons. DSA and CCM-8 are rarely used, and likely should not be negotiated outside of special circumstances. - The default TLS policy now prefers ChaCha20Poly1305 cipher over any AES mode. - The default TLS policy now orders ECC curve preferences in order by performance, with x25519 first, then P-256, then P-521, then the rest. @ text @d1 1 a1 1 $NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.4 2017/01/16 01:50:14 joerg Exp $ d3 1 a3 1 --- src/lib/utils/os_utils.cpp.orig 2017-04-05 01:09:22.000000000 +0000 d5 1 a5 12 @@@@ -21,6 +21,10 @@@@ #include #endif +#ifdef __sun +#include +#endif + #if defined(BOTAN_TARGET_OS_IS_WINDOWS) || defined(BOTAN_TARGET_OS_IS_MINGW) #define NOMINMAX 1 #include @@@@ -170,7 +174,21 @@@@ uint64_t OS::get_system_timestamp_ns() d9 1 a9 1 -#if defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) d24 1 a24 1 +#elif defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) d26 2 a27 2 * Linux defaults to only 64 KiB of mlockable memory per process * (too small) but BSDs offer a small fraction of total RAM (more @ 1.4 log @More fixes for build on SmartOS/Solaris. @ text @d1 1 a1 1 $NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.3 2016/11/11 19:44:51 joerg Exp $ d3 1 a3 1 --- src/lib/utils/os_utils.cpp.orig 2016-10-26 13:39:08.000000000 +0000 d5 2 a6 2 @@@@ -19,6 +19,10 @@@@ #include d14 1 d16 1 a16 2 #endif @@@@ -146,7 +150,21 @@@@ uint64_t get_system_timestamp_ns() d18 1 a18 1 size_t get_memory_locking_limit() @ 1.3 log @Move Solaris-specific code first, at least SmartOS doesn't support 'RLIMIT_MEMLOCK' and fails with the default mlock code. @ text @d1 1 a1 1 $NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.2 2016/11/11 19:41:44 joerg Exp $ d16 1 a16 1 @@@@ -146,7 +150,20 @@@@ uint64_t get_system_timestamp_ns() d33 2 a34 1 + return can_mlock ? std::min(512 * 1024, max_req) : 0; @ 1.3.2.1 log @Pullup ticket #5194 - requested by joerg security/botan-devel: build fix Revisions pulled up: - security/botan-devel/distinfo 1.12 - security/botan-devel/patches/patch-src_build-data_os_solaris.txt 1.1 - security/botan-devel/patches/patch-src_lib_utils_locking__allocator_info.txt 1.1 - security/botan-devel/patches/patch-src_lib_utils_os__utils.cpp 1.4 --- Module Name: pkgsrc Committed By: joerg Date: Mon Jan 16 01:50:15 UTC 2017 Modified Files: pkgsrc/security/botan-devel: distinfo pkgsrc/security/botan-devel/patches: patch-src_lib_utils_os__utils.cpp Added Files: pkgsrc/security/botan-devel/patches: patch-src_build-data_os_solaris.txt patch-src_lib_utils_locking__allocator_info.txt Log Message: More fixes for build on SmartOS/Solaris. @ text @d1 1 a1 1 $NetBSD$ d16 1 a16 1 @@@@ -146,7 +150,21 @@@@ uint64_t get_system_timestamp_ns() d33 1 a33 2 + size_t mlock_requested = BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB; + return can_mlock ? std::min(512 * 1024, mlock_requested) : 0; @ 1.2 log @Update to Botan-1.11.33: - avoid side channel with OAEP (CVE-2016-8871) - avoid Lucky13 timing attack against CBC-based TLS cipher - added X25519-based key exchange for TLS - add support for the TLS Supported Point Formats Extension from RFC 4492 - add support for the NewHope Ring-LWE key encapsulation algorithm for estimated ~200 bit security level against a quantum attacker. - add support for TLS Encrypt-then-MAC extension - Fix undefined behavior in Curve25519 for 32bit platforms - bugfix for GCM when 32-bit counters overflowed - added ChaCha20Poly1305 TLS cipher @ text @d1 1 a1 1 $NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.1 2016/05/19 21:58:43 joerg Exp $ d16 6 a21 5 @@@@ -216,6 +220,19 @@@@ size_t get_memory_locking_limit() return BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB * 1024ULL; } } +#elif defined(__sun) d34 4 a37 3 #endif return 0; @ 1.1 log @Update to Botan 1.11.29: - CVE-2016-2849: side channel attack against DSA and ECDSA - CVE-2016-2850: failure to enforce TLS policies could lead to weaker algorithms being choosen - CVE-2016-2195: heap overflow in ECC point decoding - CVE-2016-2196: heap overflow in P-521 reduction - CVE-2016-2194: DOS against the modular reduction - CVE-2015-7824: padding oracle attack against TLS CBC - CVE-2015-7825: DOS due to certificate chains - CVE-2015-7826: wildcard certifications verification failures - CVE-2015-7827: protection against PKCS#1 side channel issues - CVE-2015-5726: potential DOS with invalid zero-length BER - CVE-2015-5727: unbound memory use with BER - deprecation or removal of various insecure crypto primitives - TLS heartbeat removed - various other bugfixes and improvements. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- src/lib/utils/os_utils.cpp.orig 2016-03-21 01:26:12.000000000 +0000 d13 1 a13 1 #if defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) d16 1 a16 1 @@@@ -171,6 +175,19 @@@@ size_t get_memory_locking_limit() @