.github/workflows/ci.yml .gitignore .lgtm.yml .travis.yml configure.py doc/abi.rst doc/api_ref/bigint.rst doc/api_ref/block_cipher.rst doc/api_ref/cipher_modes.rst doc/api_ref/compression.rst doc/api_ref/contents.rst doc/api_ref/credentials_manager.rst doc/api_ref/cryptobox.rst doc/api_ref/ecc.rst doc/api_ref/env_vars.rst doc/api_ref/ffi.rst doc/api_ref/filters.rst doc/api_ref/fpe.rst doc/api_ref/hash.rst doc/api_ref/kdf.rst doc/api_ref/keywrap.rst doc/api_ref/message_auth_codes.rst doc/api_ref/otp.rst doc/api_ref/passhash.rst doc/api_ref/pbkdf.rst doc/api_ref/pkcs11.rst doc/api_ref/psk_db.rst doc/api_ref/pubkey.rst doc/api_ref/python.rst doc/api_ref/rng.rst doc/api_ref/roughtime.rst doc/api_ref/secmem.rst doc/api_ref/srp.rst doc/api_ref/stream_ciphers.rst doc/api_ref/tls.rst doc/api_ref/tpm.rst doc/api_ref/tss.rst doc/api_ref/versions.rst doc/api_ref/x509.rst doc/authors.txt doc/building.rst doc/cli.rst doc/contents.rst doc/credits.rst doc/deprecated.rst doc/dev_ref/configure.rst doc/dev_ref/contents.rst doc/dev_ref/continuous_integration.rst doc/dev_ref/contributing.rst doc/dev_ref/fuzzing.rst doc/dev_ref/mistakes.rst doc/dev_ref/oids.rst doc/dev_ref/os.rst doc/dev_ref/reading_list.rst doc/dev_ref/release_process.rst doc/dev_ref/test_framework.rst doc/dev_ref/todo.rst doc/goals.rst doc/index.rst doc/old_news.rst doc/packaging.rst doc/pgpkey.txt doc/roadmap.rst doc/security.rst doc/side_channels.rst doc/support.rst license.txt news.rst readme.rst src/bogo_shim/bogo_shim.cpp src/bogo_shim/config.json src/build-data/arch/alpha.txt src/build-data/arch/arm32.txt src/build-data/arch/arm64.txt src/build-data/arch/generic.txt src/build-data/arch/hppa.txt src/build-data/arch/ia64.txt src/build-data/arch/llvm.txt src/build-data/arch/m68k.txt src/build-data/arch/mips32.txt src/build-data/arch/mips64.txt src/build-data/arch/powerpcspe.txt src/build-data/arch/ppc32.txt src/build-data/arch/ppc64.txt src/build-data/arch/riscv32.txt src/build-data/arch/riscv64.txt src/build-data/arch/s390.txt src/build-data/arch/s390x.txt src/build-data/arch/sparc32.txt src/build-data/arch/sparc64.txt src/build-data/arch/superh.txt src/build-data/arch/x32.txt src/build-data/arch/x86_32.txt src/build-data/arch/x86_64.txt src/build-data/bakefile.in src/build-data/botan.doxy.in src/build-data/botan.pc.in src/build-data/buildh.in src/build-data/cc/clang.txt src/build-data/cc/ekopath.txt src/build-data/cc/gcc.txt src/build-data/cc/hpcc.txt src/build-data/cc/icc.txt src/build-data/cc/msvc.txt src/build-data/cc/pgi.txt src/build-data/cc/sunstudio.txt src/build-data/cc/xlc.txt src/build-data/cmake.in src/build-data/detect_arch.cpp src/build-data/detect_version.cpp src/build-data/innosetup.in src/build-data/makefile.in src/build-data/oids.txt src/build-data/os/aix.txt src/build-data/os/android.txt src/build-data/os/cygwin.txt src/build-data/os/dragonfly.txt src/build-data/os/emscripten.txt src/build-data/os/freebsd.txt src/build-data/os/haiku.txt src/build-data/os/hpux.txt src/build-data/os/hurd.txt src/build-data/os/includeos.txt src/build-data/os/ios.txt src/build-data/os/linux.txt src/build-data/os/llvm.txt src/build-data/os/macos.txt src/build-data/os/mingw.txt src/build-data/os/nacl.txt src/build-data/os/netbsd.txt src/build-data/os/none.txt src/build-data/os/openbsd.txt src/build-data/os/qnx.txt src/build-data/os/solaris.txt src/build-data/os/uwp.txt src/build-data/os/windows.txt src/build-data/policy/bsi.txt src/build-data/policy/modern.txt src/build-data/policy/nist.txt src/build-data/version.txt src/cli/argon2.cpp src/cli/argparse.h src/cli/asn1.cpp src/cli/bcrypt.cpp src/cli/cc_enc.cpp src/cli/cli.cpp src/cli/cli.h src/cli/cli_exceptions.h src/cli/cli_rng.cpp src/cli/codec.cpp src/cli/compress.cpp src/cli/encryption.cpp src/cli/entropy.cpp src/cli/hash.cpp src/cli/hmac.cpp src/cli/main.cpp src/cli/math.cpp src/cli/pbkdf.cpp src/cli/pk_crypt.cpp src/cli/psk.cpp src/cli/pubkey.cpp src/cli/roughtime.cpp src/cli/sandbox.cpp src/cli/sandbox.h src/cli/socket_utils.h src/cli/speed.cpp src/cli/timing_tests.cpp src/cli/tls_client.cpp src/cli/tls_helpers.h src/cli/tls_http_server.cpp src/cli/tls_proxy.cpp src/cli/tls_server.cpp src/cli/tls_utils.cpp src/cli/tss.cpp src/cli/utils.cpp src/cli/x509.cpp src/configs/astyle.rc src/configs/coverage.rc src/configs/eclipse.xml src/configs/indent.el src/configs/pylint.rc src/configs/sonar-project.properties src/configs/sphinx/conf.py src/configs/sphinx/templates/layout.html src/fuzzer/asn1.cpp src/fuzzer/barrett.cpp src/fuzzer/bn_cmp.cpp src/fuzzer/bn_sqr.cpp src/fuzzer/cert.cpp src/fuzzer/crl.cpp src/fuzzer/divide.cpp src/fuzzer/ecc_bp256.cpp src/fuzzer/ecc_helper.h src/fuzzer/ecc_p256.cpp src/fuzzer/ecc_p384.cpp src/fuzzer/ecc_p521.cpp src/fuzzer/fuzzers.h src/fuzzer/invert.cpp src/fuzzer/mem_pool.cpp src/fuzzer/mode_padding.cpp src/fuzzer/oaep.cpp src/fuzzer/ocsp.cpp src/fuzzer/os2ecp.cpp src/fuzzer/pkcs1.cpp src/fuzzer/pkcs8.cpp src/fuzzer/pow_mod.cpp src/fuzzer/redc_p192.cpp src/fuzzer/redc_p224.cpp src/fuzzer/redc_p256.cpp src/fuzzer/redc_p384.cpp src/fuzzer/redc_p521.cpp src/fuzzer/ressol.cpp src/fuzzer/tls_client.cpp src/fuzzer/tls_client_hello.cpp src/fuzzer/tls_server.cpp src/fuzzer/uri.cpp src/fuzzer/x509_dn.cpp src/lib/asn1/alg_id.cpp src/lib/asn1/alg_id.h src/lib/asn1/asn1_obj.cpp src/lib/asn1/asn1_obj.h src/lib/asn1/asn1_oid.cpp src/lib/asn1/asn1_oid.h src/lib/asn1/asn1_print.cpp src/lib/asn1/asn1_print.h src/lib/asn1/asn1_str.cpp src/lib/asn1/asn1_str.h src/lib/asn1/asn1_time.cpp src/lib/asn1/asn1_time.h src/lib/asn1/ber_dec.cpp src/lib/asn1/ber_dec.h src/lib/asn1/der_enc.cpp src/lib/asn1/der_enc.h src/lib/asn1/info.txt src/lib/asn1/oid_maps.cpp src/lib/asn1/oids.cpp src/lib/asn1/oids.h src/lib/base/botan.h src/lib/base/buf_comp.cpp src/lib/base/buf_comp.h src/lib/base/info.txt src/lib/base/init.h src/lib/base/key_spec.h src/lib/base/lookup.h src/lib/base/scan_name.cpp src/lib/base/scan_name.h src/lib/base/secmem.h src/lib/base/sym_algo.cpp src/lib/base/sym_algo.h src/lib/base/symkey.cpp src/lib/base/symkey.h src/lib/block/aes/aes.cpp src/lib/block/aes/aes.h src/lib/block/aes/aes_armv8/aes_armv8.cpp src/lib/block/aes/aes_armv8/info.txt src/lib/block/aes/aes_ni/aes_ni.cpp src/lib/block/aes/aes_ni/info.txt src/lib/block/aes/aes_power8/aes_power8.cpp src/lib/block/aes/aes_power8/info.txt src/lib/block/aes/aes_vperm/aes_vperm.cpp src/lib/block/aes/aes_vperm/info.txt src/lib/block/aes/info.txt src/lib/block/aria/aria.cpp src/lib/block/aria/aria.h src/lib/block/aria/info.txt src/lib/block/block_cipher.cpp src/lib/block/block_cipher.h src/lib/block/blowfish/blowfish.cpp src/lib/block/blowfish/blowfish.h src/lib/block/blowfish/info.txt src/lib/block/camellia/camellia.cpp src/lib/block/camellia/camellia.h src/lib/block/camellia/info.txt src/lib/block/cascade/cascade.cpp src/lib/block/cascade/cascade.h src/lib/block/cascade/info.txt src/lib/block/cast128/cast128.cpp src/lib/block/cast128/cast128.h src/lib/block/cast128/cast_sboxes.h src/lib/block/cast128/info.txt src/lib/block/cast256/cast256.cpp src/lib/block/cast256/cast256.h src/lib/block/cast256/info.txt src/lib/block/des/des.cpp src/lib/block/des/des.h src/lib/block/des/des_tab.cpp src/lib/block/des/desx.cpp src/lib/block/des/desx.h src/lib/block/des/info.txt src/lib/block/gost_28147/gost_28147.cpp src/lib/block/gost_28147/gost_28147.h src/lib/block/gost_28147/info.txt src/lib/block/idea/idea.cpp src/lib/block/idea/idea.h src/lib/block/idea/idea_sse2/idea_sse2.cpp src/lib/block/idea/idea_sse2/info.txt src/lib/block/idea/info.txt src/lib/block/info.txt src/lib/block/kasumi/info.txt src/lib/block/kasumi/kasumi.cpp src/lib/block/kasumi/kasumi.h src/lib/block/lion/info.txt src/lib/block/lion/lion.cpp src/lib/block/lion/lion.h src/lib/block/misty1/info.txt src/lib/block/misty1/misty1.cpp src/lib/block/misty1/misty1.h src/lib/block/noekeon/info.txt src/lib/block/noekeon/noekeon.cpp src/lib/block/noekeon/noekeon.h src/lib/block/noekeon/noekeon_simd/info.txt src/lib/block/noekeon/noekeon_simd/noekeon_simd.cpp src/lib/block/seed/info.txt src/lib/block/seed/seed.cpp src/lib/block/seed/seed.h src/lib/block/serpent/info.txt src/lib/block/serpent/serpent.cpp src/lib/block/serpent/serpent.h src/lib/block/serpent/serpent_avx2/info.txt src/lib/block/serpent/serpent_avx2/serpent_avx2.cpp src/lib/block/serpent/serpent_sbox.h src/lib/block/serpent/serpent_simd/info.txt src/lib/block/serpent/serpent_simd/serpent_simd.cpp src/lib/block/shacal2/info.txt src/lib/block/shacal2/shacal2.cpp src/lib/block/shacal2/shacal2.h src/lib/block/shacal2/shacal2_avx2/info.txt src/lib/block/shacal2/shacal2_avx2/shacal2_avx2.cpp src/lib/block/shacal2/shacal2_simd/info.txt src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp src/lib/block/shacal2/shacal2_x86/info.txt src/lib/block/shacal2/shacal2_x86/shacal2_x86.cpp src/lib/block/sm4/info.txt src/lib/block/sm4/sm4.cpp src/lib/block/sm4/sm4.h src/lib/block/sm4/sm4_armv8/info.txt src/lib/block/sm4/sm4_armv8/sm4_armv8.cpp src/lib/block/threefish_512/info.txt src/lib/block/threefish_512/threefish.h src/lib/block/threefish_512/threefish_512.cpp src/lib/block/threefish_512/threefish_512.h src/lib/block/threefish_512/threefish_512_avx2/info.txt src/lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp src/lib/block/twofish/info.txt src/lib/block/twofish/twofish.cpp src/lib/block/twofish/twofish.h src/lib/block/twofish/twofish_tab.cpp src/lib/block/xtea/info.txt src/lib/block/xtea/xtea.cpp src/lib/block/xtea/xtea.h src/lib/codec/base32/base32.cpp src/lib/codec/base32/base32.h src/lib/codec/base32/info.txt src/lib/codec/base58/base58.cpp src/lib/codec/base58/base58.h src/lib/codec/base58/info.txt src/lib/codec/base64/base64.cpp src/lib/codec/base64/base64.h src/lib/codec/base64/info.txt src/lib/codec/hex/hex.cpp src/lib/codec/hex/hex.h src/lib/codec/hex/info.txt src/lib/compat/sodium/info.txt src/lib/compat/sodium/sodium.h src/lib/compat/sodium/sodium_25519.cpp src/lib/compat/sodium/sodium_aead.cpp src/lib/compat/sodium/sodium_auth.cpp src/lib/compat/sodium/sodium_box.cpp src/lib/compat/sodium/sodium_chacha.cpp src/lib/compat/sodium/sodium_salsa.cpp src/lib/compat/sodium/sodium_secretbox.cpp src/lib/compat/sodium/sodium_utils.cpp src/lib/compression/bzip2/bzip2.cpp src/lib/compression/bzip2/bzip2.h src/lib/compression/bzip2/info.txt src/lib/compression/compress_utils.cpp src/lib/compression/compress_utils.h src/lib/compression/compression.cpp src/lib/compression/compression.h src/lib/compression/info.txt src/lib/compression/lzma/info.txt src/lib/compression/lzma/lzma.cpp src/lib/compression/lzma/lzma.h src/lib/compression/zlib/info.txt src/lib/compression/zlib/zlib.cpp src/lib/compression/zlib/zlib.h src/lib/entropy/dev_random/dev_random.cpp src/lib/entropy/dev_random/dev_random.h src/lib/entropy/dev_random/info.txt src/lib/entropy/entropy_src.h src/lib/entropy/entropy_srcs.cpp src/lib/entropy/getentropy/getentropy.cpp src/lib/entropy/getentropy/getentropy.h src/lib/entropy/getentropy/info.txt src/lib/entropy/info.txt src/lib/entropy/proc_walk/info.txt src/lib/entropy/proc_walk/proc_walk.cpp src/lib/entropy/proc_walk/proc_walk.h src/lib/entropy/rdseed/info.txt src/lib/entropy/rdseed/rdseed.cpp src/lib/entropy/rdseed/rdseed.h src/lib/entropy/win32_stats/es_win32.cpp src/lib/entropy/win32_stats/es_win32.h src/lib/entropy/win32_stats/info.txt src/lib/ffi/ffi.cpp src/lib/ffi/ffi.h src/lib/ffi/ffi_block.cpp src/lib/ffi/ffi_cert.cpp src/lib/ffi/ffi_cipher.cpp src/lib/ffi/ffi_fpe.cpp src/lib/ffi/ffi_hash.cpp src/lib/ffi/ffi_hotp.cpp src/lib/ffi/ffi_kdf.cpp src/lib/ffi/ffi_keywrap.cpp src/lib/ffi/ffi_mac.cpp src/lib/ffi/ffi_mp.cpp src/lib/ffi/ffi_mp.h src/lib/ffi/ffi_pk_op.cpp src/lib/ffi/ffi_pkey.cpp src/lib/ffi/ffi_pkey.h src/lib/ffi/ffi_pkey_algs.cpp src/lib/ffi/ffi_rng.cpp src/lib/ffi/ffi_rng.h src/lib/ffi/ffi_totp.cpp src/lib/ffi/ffi_util.h src/lib/ffi/info.txt src/lib/filters/algo_filt.cpp src/lib/filters/b64_filt.cpp src/lib/filters/b64_filt.h src/lib/filters/basefilt.cpp src/lib/filters/basefilt.h src/lib/filters/buf_filt.cpp src/lib/filters/buf_filt.h src/lib/filters/cipher_filter.cpp src/lib/filters/cipher_filter.h src/lib/filters/comp_filter.cpp src/lib/filters/comp_filter.h src/lib/filters/data_snk.cpp src/lib/filters/data_snk.h src/lib/filters/fd_unix/fd_unix.cpp src/lib/filters/fd_unix/fd_unix.h src/lib/filters/fd_unix/info.txt src/lib/filters/filter.cpp src/lib/filters/filter.h src/lib/filters/filters.h src/lib/filters/hex_filt.cpp src/lib/filters/hex_filt.h src/lib/filters/info.txt src/lib/filters/key_filt.h src/lib/filters/out_buf.cpp src/lib/filters/out_buf.h src/lib/filters/pipe.cpp src/lib/filters/pipe.h src/lib/filters/pipe_io.cpp src/lib/filters/pipe_rw.cpp src/lib/filters/secqueue.cpp src/lib/filters/secqueue.h src/lib/filters/threaded_fork.cpp src/lib/hash/blake2/blake2b.cpp src/lib/hash/blake2/blake2b.h src/lib/hash/blake2/info.txt src/lib/hash/checksum/adler32/adler32.cpp src/lib/hash/checksum/adler32/adler32.h src/lib/hash/checksum/adler32/info.txt src/lib/hash/checksum/crc24/crc24.cpp src/lib/hash/checksum/crc24/crc24.h src/lib/hash/checksum/crc24/info.txt src/lib/hash/checksum/crc32/crc32.cpp src/lib/hash/checksum/crc32/crc32.h src/lib/hash/checksum/crc32/info.txt src/lib/hash/checksum/info.txt src/lib/hash/comb4p/comb4p.cpp src/lib/hash/comb4p/comb4p.h src/lib/hash/comb4p/info.txt src/lib/hash/gost_3411/gost_3411.cpp src/lib/hash/gost_3411/gost_3411.h src/lib/hash/gost_3411/info.txt src/lib/hash/hash.cpp src/lib/hash/hash.h src/lib/hash/info.txt src/lib/hash/keccak/info.txt src/lib/hash/keccak/keccak.cpp src/lib/hash/keccak/keccak.h src/lib/hash/md4/info.txt src/lib/hash/md4/md4.cpp src/lib/hash/md4/md4.h src/lib/hash/md5/info.txt src/lib/hash/md5/md5.cpp src/lib/hash/md5/md5.h src/lib/hash/mdx_hash/info.txt src/lib/hash/mdx_hash/mdx_hash.cpp src/lib/hash/mdx_hash/mdx_hash.h src/lib/hash/par_hash/info.txt src/lib/hash/par_hash/par_hash.cpp src/lib/hash/par_hash/par_hash.h src/lib/hash/rmd160/info.txt src/lib/hash/rmd160/rmd160.cpp src/lib/hash/rmd160/rmd160.h src/lib/hash/sha1/info.txt src/lib/hash/sha1/sha160.cpp src/lib/hash/sha1/sha160.h src/lib/hash/sha1/sha1_armv8/info.txt src/lib/hash/sha1/sha1_armv8/sha1_armv8.cpp src/lib/hash/sha1/sha1_sse2/info.txt src/lib/hash/sha1/sha1_sse2/sha1_sse2.cpp src/lib/hash/sha1/sha1_x86/info.txt src/lib/hash/sha1/sha1_x86/sha1_x86.cpp src/lib/hash/sha2_32/info.txt src/lib/hash/sha2_32/sha2_32.cpp src/lib/hash/sha2_32/sha2_32.h src/lib/hash/sha2_32/sha2_32_armv8/info.txt src/lib/hash/sha2_32/sha2_32_armv8/sha2_32_armv8.cpp src/lib/hash/sha2_32/sha2_32_bmi2/info.txt src/lib/hash/sha2_32/sha2_32_bmi2/sha2_32_bmi2.cpp src/lib/hash/sha2_32/sha2_32_x86/info.txt src/lib/hash/sha2_32/sha2_32_x86/sha2_32_x86.cpp src/lib/hash/sha2_64/info.txt src/lib/hash/sha2_64/sha2_64.cpp src/lib/hash/sha2_64/sha2_64.h src/lib/hash/sha2_64/sha2_64_bmi2/info.txt src/lib/hash/sha2_64/sha2_64_bmi2/sha2_64_bmi2.cpp src/lib/hash/sha3/info.txt src/lib/hash/sha3/sha3.cpp src/lib/hash/sha3/sha3.h src/lib/hash/sha3/sha3_bmi2/info.txt src/lib/hash/sha3/sha3_bmi2/sha3_bmi2.cpp src/lib/hash/shake/info.txt src/lib/hash/shake/shake.cpp src/lib/hash/shake/shake.h src/lib/hash/skein/info.txt src/lib/hash/skein/skein_512.cpp src/lib/hash/skein/skein_512.h src/lib/hash/sm3/info.txt src/lib/hash/sm3/sm3.cpp src/lib/hash/sm3/sm3.h src/lib/hash/streebog/info.txt src/lib/hash/streebog/streebog.cpp src/lib/hash/streebog/streebog.h src/lib/hash/streebog/streebog_precalc.cpp src/lib/hash/tiger/info.txt src/lib/hash/tiger/tig_tab.cpp src/lib/hash/tiger/tiger.cpp src/lib/hash/tiger/tiger.h src/lib/hash/whirlpool/info.txt src/lib/hash/whirlpool/whirlpool.cpp src/lib/hash/whirlpool/whrl_tab.cpp src/lib/hash/whirlpool/whrlpool.h src/lib/kdf/hkdf/hkdf.cpp src/lib/kdf/hkdf/hkdf.h src/lib/kdf/hkdf/info.txt src/lib/kdf/info.txt src/lib/kdf/kdf.cpp src/lib/kdf/kdf.h src/lib/kdf/kdf1/info.txt src/lib/kdf/kdf1/kdf1.cpp src/lib/kdf/kdf1/kdf1.h src/lib/kdf/kdf1_iso18033/info.txt src/lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h src/lib/kdf/kdf2/info.txt src/lib/kdf/kdf2/kdf2.cpp src/lib/kdf/kdf2/kdf2.h src/lib/kdf/prf_tls/info.txt src/lib/kdf/prf_tls/prf_tls.cpp src/lib/kdf/prf_tls/prf_tls.h src/lib/kdf/prf_x942/info.txt src/lib/kdf/prf_x942/prf_x942.cpp src/lib/kdf/prf_x942/prf_x942.h src/lib/kdf/sp800_108/info.txt src/lib/kdf/sp800_108/sp800_108.cpp src/lib/kdf/sp800_108/sp800_108.h src/lib/kdf/sp800_56a/info.txt src/lib/kdf/sp800_56a/sp800_56a.cpp src/lib/kdf/sp800_56a/sp800_56a.h src/lib/kdf/sp800_56c/info.txt src/lib/kdf/sp800_56c/sp800_56c.cpp src/lib/kdf/sp800_56c/sp800_56c.h src/lib/mac/cbc_mac/cbc_mac.cpp src/lib/mac/cbc_mac/cbc_mac.h src/lib/mac/cbc_mac/info.txt src/lib/mac/cmac/cmac.cpp src/lib/mac/cmac/cmac.h src/lib/mac/cmac/info.txt src/lib/mac/gmac/gmac.cpp src/lib/mac/gmac/gmac.h src/lib/mac/gmac/info.txt src/lib/mac/hmac/hmac.cpp src/lib/mac/hmac/hmac.h src/lib/mac/hmac/info.txt src/lib/mac/info.txt src/lib/mac/mac.cpp src/lib/mac/mac.h src/lib/mac/poly1305/info.txt src/lib/mac/poly1305/poly1305.cpp src/lib/mac/poly1305/poly1305.h src/lib/mac/siphash/info.txt src/lib/mac/siphash/siphash.cpp src/lib/mac/siphash/siphash.h src/lib/mac/x919_mac/info.txt src/lib/mac/x919_mac/x919_mac.cpp src/lib/mac/x919_mac/x919_mac.h src/lib/math/bigint/big_code.cpp src/lib/math/bigint/big_io.cpp src/lib/math/bigint/big_ops2.cpp src/lib/math/bigint/big_ops3.cpp src/lib/math/bigint/big_rand.cpp src/lib/math/bigint/bigint.cpp src/lib/math/bigint/bigint.h src/lib/math/bigint/divide.cpp src/lib/math/bigint/divide.h src/lib/math/bigint/info.txt src/lib/math/mp/info.txt src/lib/math/mp/mp_asmi.h src/lib/math/mp/mp_comba.cpp src/lib/math/mp/mp_core.h src/lib/math/mp/mp_karat.cpp src/lib/math/mp/mp_madd.h src/lib/math/mp/mp_monty.cpp src/lib/math/mp/mp_monty.h src/lib/math/mp/mp_monty_n.cpp src/lib/math/numbertheory/curve_nistp.h src/lib/math/numbertheory/dsa_gen.cpp src/lib/math/numbertheory/info.txt src/lib/math/numbertheory/jacobi.cpp src/lib/math/numbertheory/make_prm.cpp src/lib/math/numbertheory/mod_inv.cpp src/lib/math/numbertheory/monty.cpp src/lib/math/numbertheory/monty.h src/lib/math/numbertheory/monty_exp.cpp src/lib/math/numbertheory/monty_exp.h src/lib/math/numbertheory/mp_numth.cpp src/lib/math/numbertheory/nistp_redc.cpp src/lib/math/numbertheory/numthry.cpp src/lib/math/numbertheory/numthry.h src/lib/math/numbertheory/pow_mod.cpp src/lib/math/numbertheory/pow_mod.h src/lib/math/numbertheory/primality.cpp src/lib/math/numbertheory/primality.h src/lib/math/numbertheory/primes.cpp src/lib/math/numbertheory/reducer.cpp src/lib/math/numbertheory/reducer.h src/lib/math/numbertheory/ressol.cpp src/lib/misc/aont/info.txt src/lib/misc/aont/package.cpp src/lib/misc/aont/package.h src/lib/misc/cryptobox/cryptobox.cpp src/lib/misc/cryptobox/cryptobox.h src/lib/misc/cryptobox/info.txt src/lib/misc/fpe_fe1/fpe_fe1.cpp src/lib/misc/fpe_fe1/fpe_fe1.h src/lib/misc/fpe_fe1/info.txt src/lib/misc/hotp/hotp.cpp src/lib/misc/hotp/hotp.h src/lib/misc/hotp/info.txt src/lib/misc/hotp/otp.h src/lib/misc/hotp/totp.cpp src/lib/misc/hotp/totp.h src/lib/misc/nist_keywrap/info.txt src/lib/misc/nist_keywrap/nist_keywrap.cpp src/lib/misc/nist_keywrap/nist_keywrap.h src/lib/misc/rfc3394/info.txt src/lib/misc/rfc3394/rfc3394.cpp src/lib/misc/rfc3394/rfc3394.h src/lib/misc/roughtime/info.txt src/lib/misc/roughtime/roughtime.cpp src/lib/misc/roughtime/roughtime.h src/lib/misc/srp6/info.txt src/lib/misc/srp6/srp6.cpp src/lib/misc/srp6/srp6.h src/lib/misc/tss/info.txt src/lib/misc/tss/tss.cpp src/lib/misc/tss/tss.h src/lib/modes/aead/aead.cpp src/lib/modes/aead/aead.h src/lib/modes/aead/ccm/ccm.cpp src/lib/modes/aead/ccm/ccm.h src/lib/modes/aead/ccm/info.txt src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp src/lib/modes/aead/chacha20poly1305/chacha20poly1305.h src/lib/modes/aead/chacha20poly1305/info.txt src/lib/modes/aead/eax/eax.cpp src/lib/modes/aead/eax/eax.h src/lib/modes/aead/eax/info.txt src/lib/modes/aead/gcm/gcm.cpp src/lib/modes/aead/gcm/gcm.h src/lib/modes/aead/gcm/info.txt src/lib/modes/aead/info.txt src/lib/modes/aead/ocb/info.txt src/lib/modes/aead/ocb/ocb.cpp src/lib/modes/aead/ocb/ocb.h src/lib/modes/aead/siv/info.txt src/lib/modes/aead/siv/siv.cpp src/lib/modes/aead/siv/siv.h src/lib/modes/cbc/cbc.cpp src/lib/modes/cbc/cbc.h src/lib/modes/cbc/info.txt src/lib/modes/cfb/cfb.cpp src/lib/modes/cfb/cfb.h src/lib/modes/cfb/info.txt src/lib/modes/cipher_mode.cpp src/lib/modes/cipher_mode.h src/lib/modes/info.txt src/lib/modes/mode_pad/info.txt src/lib/modes/mode_pad/mode_pad.cpp src/lib/modes/mode_pad/mode_pad.h src/lib/modes/stream_mode.h src/lib/modes/xts/info.txt src/lib/modes/xts/xts.cpp src/lib/modes/xts/xts.h src/lib/passhash/bcrypt/bcrypt.cpp src/lib/passhash/bcrypt/bcrypt.h src/lib/passhash/bcrypt/info.txt src/lib/passhash/passhash9/info.txt src/lib/passhash/passhash9/passhash9.cpp src/lib/passhash/passhash9/passhash9.h src/lib/pbkdf/argon2/argon2.cpp src/lib/pbkdf/argon2/argon2.h src/lib/pbkdf/argon2/argon2fmt.cpp src/lib/pbkdf/argon2/argon2pwhash.cpp src/lib/pbkdf/argon2/info.txt src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.cpp src/lib/pbkdf/bcrypt_pbkdf/bcrypt_pbkdf.h src/lib/pbkdf/bcrypt_pbkdf/info.txt src/lib/pbkdf/info.txt src/lib/pbkdf/pbkdf.cpp src/lib/pbkdf/pbkdf.h src/lib/pbkdf/pbkdf1/info.txt src/lib/pbkdf/pbkdf1/pbkdf1.cpp src/lib/pbkdf/pbkdf1/pbkdf1.h src/lib/pbkdf/pbkdf2/info.txt src/lib/pbkdf/pbkdf2/pbkdf2.cpp src/lib/pbkdf/pbkdf2/pbkdf2.h src/lib/pbkdf/pgp_s2k/info.txt src/lib/pbkdf/pgp_s2k/pgp_s2k.cpp src/lib/pbkdf/pgp_s2k/pgp_s2k.h src/lib/pbkdf/pwdhash.cpp src/lib/pbkdf/pwdhash.h src/lib/pbkdf/scrypt/info.txt src/lib/pbkdf/scrypt/scrypt.cpp src/lib/pbkdf/scrypt/scrypt.h src/lib/pk_pad/eme.cpp src/lib/pk_pad/eme.h src/lib/pk_pad/eme_oaep/info.txt src/lib/pk_pad/eme_oaep/oaep.cpp src/lib/pk_pad/eme_oaep/oaep.h src/lib/pk_pad/eme_pkcs1/eme_pkcs.cpp src/lib/pk_pad/eme_pkcs1/eme_pkcs.h src/lib/pk_pad/eme_pkcs1/info.txt src/lib/pk_pad/eme_raw/eme_raw.cpp src/lib/pk_pad/eme_raw/eme_raw.h src/lib/pk_pad/eme_raw/info.txt src/lib/pk_pad/emsa.cpp src/lib/pk_pad/emsa.h src/lib/pk_pad/emsa1/emsa1.cpp src/lib/pk_pad/emsa1/emsa1.h src/lib/pk_pad/emsa1/info.txt src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.h src/lib/pk_pad/emsa_pkcs1/info.txt src/lib/pk_pad/emsa_pssr/info.txt src/lib/pk_pad/emsa_pssr/pssr.cpp src/lib/pk_pad/emsa_pssr/pssr.h src/lib/pk_pad/emsa_raw/emsa_raw.cpp src/lib/pk_pad/emsa_raw/emsa_raw.h src/lib/pk_pad/emsa_raw/info.txt src/lib/pk_pad/emsa_x931/emsa_x931.cpp src/lib/pk_pad/emsa_x931/emsa_x931.h src/lib/pk_pad/emsa_x931/info.txt src/lib/pk_pad/hash_id/hash_id.cpp src/lib/pk_pad/hash_id/hash_id.h src/lib/pk_pad/hash_id/info.txt src/lib/pk_pad/info.txt src/lib/pk_pad/iso9796/info.txt src/lib/pk_pad/iso9796/iso9796.cpp src/lib/pk_pad/iso9796/iso9796.h src/lib/pk_pad/mgf1/info.txt src/lib/pk_pad/mgf1/mgf1.cpp src/lib/pk_pad/mgf1/mgf1.h src/lib/pk_pad/padding.cpp src/lib/pk_pad/padding.h src/lib/prov/commoncrypto/commoncrypto.h src/lib/prov/commoncrypto/commoncrypto_block.cpp src/lib/prov/commoncrypto/commoncrypto_hash.cpp src/lib/prov/commoncrypto/commoncrypto_mode.cpp src/lib/prov/commoncrypto/commoncrypto_utils.cpp src/lib/prov/commoncrypto/commoncrypto_utils.h src/lib/prov/commoncrypto/info.txt src/lib/prov/openssl/info.txt src/lib/prov/openssl/openssl.h src/lib/prov/openssl/openssl_block.cpp src/lib/prov/openssl/openssl_ec.cpp src/lib/prov/openssl/openssl_hash.cpp src/lib/prov/openssl/openssl_mode.cpp src/lib/prov/openssl/openssl_rc4.cpp src/lib/prov/openssl/openssl_rsa.cpp src/lib/prov/pkcs11/info.txt src/lib/prov/pkcs11/p11.cpp src/lib/prov/pkcs11/p11.h src/lib/prov/pkcs11/p11_ecc_key.cpp src/lib/prov/pkcs11/p11_ecc_key.h src/lib/prov/pkcs11/p11_ecdh.cpp src/lib/prov/pkcs11/p11_ecdh.h src/lib/prov/pkcs11/p11_ecdsa.cpp src/lib/prov/pkcs11/p11_ecdsa.h src/lib/prov/pkcs11/p11_mechanism.cpp src/lib/prov/pkcs11/p11_mechanism.h src/lib/prov/pkcs11/p11_module.cpp src/lib/prov/pkcs11/p11_module.h src/lib/prov/pkcs11/p11_object.cpp src/lib/prov/pkcs11/p11_object.h src/lib/prov/pkcs11/p11_randomgenerator.cpp src/lib/prov/pkcs11/p11_randomgenerator.h src/lib/prov/pkcs11/p11_rsa.cpp src/lib/prov/pkcs11/p11_rsa.h src/lib/prov/pkcs11/p11_session.cpp src/lib/prov/pkcs11/p11_session.h src/lib/prov/pkcs11/p11_slot.cpp src/lib/prov/pkcs11/p11_slot.h src/lib/prov/pkcs11/p11_types.h src/lib/prov/pkcs11/p11_x509.cpp src/lib/prov/pkcs11/p11_x509.h src/lib/prov/pkcs11/pkcs11.h src/lib/prov/pkcs11/pkcs11f.h src/lib/prov/pkcs11/pkcs11t.h src/lib/prov/tpm/info.txt src/lib/prov/tpm/tpm.cpp src/lib/prov/tpm/tpm.h src/lib/psk_db/info.txt src/lib/psk_db/psk_db.cpp src/lib/psk_db/psk_db.h src/lib/psk_db/psk_db_sql.cpp src/lib/psk_db/psk_db_sql.h src/lib/pubkey/blinding.cpp src/lib/pubkey/blinding.h src/lib/pubkey/cecpq1/cecpq1.cpp src/lib/pubkey/cecpq1/cecpq1.h src/lib/pubkey/cecpq1/info.txt src/lib/pubkey/curve25519/curve25519.cpp src/lib/pubkey/curve25519/curve25519.h src/lib/pubkey/curve25519/donna.cpp src/lib/pubkey/curve25519/info.txt src/lib/pubkey/dh/dh.cpp src/lib/pubkey/dh/dh.h src/lib/pubkey/dh/info.txt src/lib/pubkey/dl_algo/dl_algo.cpp src/lib/pubkey/dl_algo/dl_algo.h src/lib/pubkey/dl_algo/info.txt src/lib/pubkey/dl_group/dl_group.cpp src/lib/pubkey/dl_group/dl_group.h src/lib/pubkey/dl_group/dl_named.cpp src/lib/pubkey/dl_group/info.txt src/lib/pubkey/dlies/dlies.cpp src/lib/pubkey/dlies/dlies.h src/lib/pubkey/dlies/info.txt src/lib/pubkey/dsa/dsa.cpp src/lib/pubkey/dsa/dsa.h src/lib/pubkey/dsa/info.txt src/lib/pubkey/ec_group/curve_gfp.cpp src/lib/pubkey/ec_group/curve_gfp.h src/lib/pubkey/ec_group/ec_group.cpp src/lib/pubkey/ec_group/ec_group.h src/lib/pubkey/ec_group/ec_named.cpp src/lib/pubkey/ec_group/info.txt src/lib/pubkey/ec_group/point_gfp.cpp src/lib/pubkey/ec_group/point_gfp.h src/lib/pubkey/ec_group/point_mul.cpp src/lib/pubkey/ec_group/point_mul.h src/lib/pubkey/ecc_key/ecc_key.cpp src/lib/pubkey/ecc_key/ecc_key.h src/lib/pubkey/ecc_key/info.txt src/lib/pubkey/ecdh/ecdh.cpp src/lib/pubkey/ecdh/ecdh.h src/lib/pubkey/ecdh/info.txt src/lib/pubkey/ecdsa/ecdsa.cpp src/lib/pubkey/ecdsa/ecdsa.h src/lib/pubkey/ecdsa/info.txt src/lib/pubkey/ecgdsa/ecgdsa.cpp src/lib/pubkey/ecgdsa/ecgdsa.h src/lib/pubkey/ecgdsa/info.txt src/lib/pubkey/ecies/ecies.cpp src/lib/pubkey/ecies/ecies.h src/lib/pubkey/ecies/info.txt src/lib/pubkey/eckcdsa/eckcdsa.cpp src/lib/pubkey/eckcdsa/eckcdsa.h src/lib/pubkey/eckcdsa/info.txt src/lib/pubkey/ed25519/ed25519.cpp src/lib/pubkey/ed25519/ed25519.h src/lib/pubkey/ed25519/ed25519_fe.cpp src/lib/pubkey/ed25519/ed25519_fe.h src/lib/pubkey/ed25519/ed25519_internal.h src/lib/pubkey/ed25519/ed25519_key.cpp src/lib/pubkey/ed25519/ge.cpp src/lib/pubkey/ed25519/info.txt src/lib/pubkey/ed25519/sc_muladd.cpp src/lib/pubkey/ed25519/sc_reduce.cpp src/lib/pubkey/elgamal/elgamal.cpp src/lib/pubkey/elgamal/elgamal.h src/lib/pubkey/elgamal/info.txt src/lib/pubkey/gost_3410/gost_3410.cpp src/lib/pubkey/gost_3410/gost_3410.h src/lib/pubkey/gost_3410/info.txt src/lib/pubkey/info.txt src/lib/pubkey/keypair/info.txt src/lib/pubkey/keypair/keypair.cpp src/lib/pubkey/keypair/keypair.h src/lib/pubkey/mce/code_based_key_gen.cpp src/lib/pubkey/mce/code_based_util.h src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp src/lib/pubkey/mce/gf2m_small_m.cpp src/lib/pubkey/mce/gf2m_small_m.h src/lib/pubkey/mce/goppa_code.cpp src/lib/pubkey/mce/info.txt src/lib/pubkey/mce/mce_internal.h src/lib/pubkey/mce/mce_workfactor.cpp src/lib/pubkey/mce/mceliece.cpp src/lib/pubkey/mce/mceliece.h src/lib/pubkey/mce/mceliece_key.cpp src/lib/pubkey/mce/polyn_gf2m.cpp src/lib/pubkey/mce/polyn_gf2m.h src/lib/pubkey/mceies/info.txt src/lib/pubkey/mceies/mceies.cpp src/lib/pubkey/mceies/mceies.h src/lib/pubkey/newhope/info.txt src/lib/pubkey/newhope/newhope.cpp src/lib/pubkey/newhope/newhope.h src/lib/pubkey/pbes2/info.txt src/lib/pubkey/pbes2/pbes2.cpp src/lib/pubkey/pbes2/pbes2.h src/lib/pubkey/pem/info.txt src/lib/pubkey/pem/pem.cpp src/lib/pubkey/pem/pem.h src/lib/pubkey/pk_algs.cpp src/lib/pubkey/pk_algs.h src/lib/pubkey/pk_keys.cpp src/lib/pubkey/pk_keys.h src/lib/pubkey/pk_ops.cpp src/lib/pubkey/pk_ops.h src/lib/pubkey/pk_ops_fwd.h src/lib/pubkey/pk_ops_impl.h src/lib/pubkey/pkcs8.cpp src/lib/pubkey/pkcs8.h src/lib/pubkey/pubkey.cpp src/lib/pubkey/pubkey.h src/lib/pubkey/rfc6979/info.txt src/lib/pubkey/rfc6979/rfc6979.cpp src/lib/pubkey/rfc6979/rfc6979.h src/lib/pubkey/rsa/info.txt src/lib/pubkey/rsa/rsa.cpp src/lib/pubkey/rsa/rsa.h src/lib/pubkey/sm2/info.txt src/lib/pubkey/sm2/sm2.cpp src/lib/pubkey/sm2/sm2.h src/lib/pubkey/sm2/sm2_enc.cpp src/lib/pubkey/sm2/sm2_enc.h src/lib/pubkey/workfactor.cpp src/lib/pubkey/workfactor.h src/lib/pubkey/x509_key.cpp src/lib/pubkey/x509_key.h src/lib/pubkey/xmss/atomic.h src/lib/pubkey/xmss/info.txt src/lib/pubkey/xmss/xmss.h src/lib/pubkey/xmss/xmss_address.h src/lib/pubkey/xmss/xmss_common_ops.cpp src/lib/pubkey/xmss/xmss_common_ops.h src/lib/pubkey/xmss/xmss_hash.cpp src/lib/pubkey/xmss/xmss_hash.h src/lib/pubkey/xmss/xmss_index_registry.cpp src/lib/pubkey/xmss/xmss_index_registry.h src/lib/pubkey/xmss/xmss_key_pair.h src/lib/pubkey/xmss/xmss_parameters.cpp src/lib/pubkey/xmss/xmss_parameters.h src/lib/pubkey/xmss/xmss_privatekey.cpp src/lib/pubkey/xmss/xmss_privatekey.h src/lib/pubkey/xmss/xmss_publickey.cpp src/lib/pubkey/xmss/xmss_publickey.h src/lib/pubkey/xmss/xmss_signature.cpp src/lib/pubkey/xmss/xmss_signature.h src/lib/pubkey/xmss/xmss_signature_operation.cpp src/lib/pubkey/xmss/xmss_signature_operation.h src/lib/pubkey/xmss/xmss_tools.h src/lib/pubkey/xmss/xmss_verification_operation.cpp src/lib/pubkey/xmss/xmss_verification_operation.h src/lib/pubkey/xmss/xmss_wots.h src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h src/lib/pubkey/xmss/xmss_wots_parameters.cpp src/lib/pubkey/xmss/xmss_wots_parameters.h src/lib/pubkey/xmss/xmss_wots_privatekey.cpp src/lib/pubkey/xmss/xmss_wots_privatekey.h src/lib/pubkey/xmss/xmss_wots_publickey.cpp src/lib/pubkey/xmss/xmss_wots_publickey.h src/lib/rng/auto_rng/auto_rng.cpp src/lib/rng/auto_rng/auto_rng.h src/lib/rng/auto_rng/info.txt src/lib/rng/chacha_rng/chacha_rng.cpp src/lib/rng/chacha_rng/chacha_rng.h src/lib/rng/chacha_rng/info.txt src/lib/rng/hmac_drbg/hmac_drbg.cpp src/lib/rng/hmac_drbg/hmac_drbg.h src/lib/rng/hmac_drbg/info.txt src/lib/rng/info.txt src/lib/rng/processor_rng/info.txt src/lib/rng/processor_rng/processor_rng.cpp src/lib/rng/processor_rng/processor_rng.h src/lib/rng/rdrand_rng/info.txt src/lib/rng/rdrand_rng/rdrand_rng.cpp src/lib/rng/rdrand_rng/rdrand_rng.h src/lib/rng/rng.cpp src/lib/rng/rng.h src/lib/rng/stateful_rng/info.txt src/lib/rng/stateful_rng/stateful_rng.cpp src/lib/rng/stateful_rng/stateful_rng.h src/lib/rng/system_rng/info.txt src/lib/rng/system_rng/system_rng.cpp src/lib/rng/system_rng/system_rng.h src/lib/stream/chacha/chacha.cpp src/lib/stream/chacha/chacha.h src/lib/stream/chacha/chacha_avx2/chacha_avx2.cpp src/lib/stream/chacha/chacha_avx2/info.txt src/lib/stream/chacha/chacha_simd32/chacha_simd32.cpp src/lib/stream/chacha/chacha_simd32/info.txt src/lib/stream/chacha/info.txt src/lib/stream/ctr/ctr.cpp src/lib/stream/ctr/ctr.h src/lib/stream/ctr/info.txt src/lib/stream/info.txt src/lib/stream/ofb/info.txt src/lib/stream/ofb/ofb.cpp src/lib/stream/ofb/ofb.h src/lib/stream/rc4/info.txt src/lib/stream/rc4/rc4.cpp src/lib/stream/rc4/rc4.h src/lib/stream/salsa20/info.txt src/lib/stream/salsa20/salsa20.cpp src/lib/stream/salsa20/salsa20.h src/lib/stream/shake_cipher/info.txt src/lib/stream/shake_cipher/shake_cipher.cpp src/lib/stream/shake_cipher/shake_cipher.h src/lib/stream/stream_cipher.cpp src/lib/stream/stream_cipher.h src/lib/tls/asio/asio_async_ops.h src/lib/tls/asio/asio_context.h src/lib/tls/asio/asio_error.h src/lib/tls/asio/asio_stream.h src/lib/tls/asio/info.txt src/lib/tls/credentials_manager.cpp src/lib/tls/credentials_manager.h src/lib/tls/info.txt src/lib/tls/msg_cert_req.cpp src/lib/tls/msg_cert_status.cpp src/lib/tls/msg_cert_verify.cpp src/lib/tls/msg_certificate.cpp src/lib/tls/msg_client_hello.cpp src/lib/tls/msg_client_kex.cpp src/lib/tls/msg_finished.cpp src/lib/tls/msg_hello_verify.cpp src/lib/tls/msg_server_hello.cpp src/lib/tls/msg_server_kex.cpp src/lib/tls/msg_session_ticket.cpp src/lib/tls/sessions_sql/info.txt src/lib/tls/sessions_sql/tls_session_manager_sql.cpp src/lib/tls/sessions_sql/tls_session_manager_sql.h src/lib/tls/sessions_sqlite3/info.txt src/lib/tls/sessions_sqlite3/tls_session_manager_sqlite.cpp src/lib/tls/sessions_sqlite3/tls_session_manager_sqlite.h src/lib/tls/tls_10/info.txt src/lib/tls/tls_alert.cpp src/lib/tls/tls_alert.h src/lib/tls/tls_algos.cpp src/lib/tls/tls_algos.h src/lib/tls/tls_blocking.cpp src/lib/tls/tls_blocking.h src/lib/tls/tls_callbacks.cpp src/lib/tls/tls_callbacks.h src/lib/tls/tls_cbc/info.txt src/lib/tls/tls_cbc/tls_cbc.cpp src/lib/tls/tls_cbc/tls_cbc.h src/lib/tls/tls_channel.cpp src/lib/tls/tls_channel.h src/lib/tls/tls_ciphersuite.cpp src/lib/tls/tls_ciphersuite.h src/lib/tls/tls_client.cpp src/lib/tls/tls_client.h src/lib/tls/tls_exceptn.h src/lib/tls/tls_extensions.cpp src/lib/tls/tls_extensions.h src/lib/tls/tls_handshake_hash.cpp src/lib/tls/tls_handshake_hash.h src/lib/tls/tls_handshake_io.cpp src/lib/tls/tls_handshake_io.h src/lib/tls/tls_handshake_msg.h src/lib/tls/tls_handshake_state.cpp src/lib/tls/tls_handshake_state.h src/lib/tls/tls_magic.h src/lib/tls/tls_messages.h src/lib/tls/tls_policy.cpp src/lib/tls/tls_policy.h src/lib/tls/tls_reader.h src/lib/tls/tls_record.cpp src/lib/tls/tls_record.h src/lib/tls/tls_seq_numbers.h src/lib/tls/tls_server.cpp src/lib/tls/tls_server.h src/lib/tls/tls_server_info.h src/lib/tls/tls_session.cpp src/lib/tls/tls_session.h src/lib/tls/tls_session_key.cpp src/lib/tls/tls_session_key.h src/lib/tls/tls_session_manager.h src/lib/tls/tls_session_manager_memory.cpp src/lib/tls/tls_suite_info.cpp src/lib/tls/tls_text_policy.cpp src/lib/tls/tls_version.cpp src/lib/tls/tls_version.h src/lib/utils/assert.cpp src/lib/utils/assert.h src/lib/utils/bit_ops.h src/lib/utils/boost/info.txt src/lib/utils/bswap.h src/lib/utils/calendar.cpp src/lib/utils/calendar.h src/lib/utils/charset.cpp src/lib/utils/charset.h src/lib/utils/codec_base.h src/lib/utils/compiler.h src/lib/utils/cpuid/cpuid.cpp src/lib/utils/cpuid/cpuid.h src/lib/utils/cpuid/cpuid_arm.cpp src/lib/utils/cpuid/cpuid_ppc.cpp src/lib/utils/cpuid/cpuid_x86.cpp src/lib/utils/cpuid/info.txt src/lib/utils/ct_utils.cpp src/lib/utils/ct_utils.h src/lib/utils/data_src.cpp src/lib/utils/data_src.h src/lib/utils/database.h src/lib/utils/donna128.h src/lib/utils/dyn_load/dyn_load.cpp src/lib/utils/dyn_load/dyn_load.h src/lib/utils/dyn_load/info.txt src/lib/utils/exceptn.cpp src/lib/utils/exceptn.h src/lib/utils/filesystem.cpp src/lib/utils/filesystem.h src/lib/utils/ghash/ghash.cpp src/lib/utils/ghash/ghash.h src/lib/utils/ghash/ghash_cpu/ghash_cpu.cpp src/lib/utils/ghash/ghash_cpu/info.txt src/lib/utils/ghash/ghash_vperm/ghash_vperm.cpp src/lib/utils/ghash/ghash_vperm/info.txt src/lib/utils/ghash/info.txt src/lib/utils/http_util/http_util.cpp src/lib/utils/http_util/http_util.h src/lib/utils/http_util/info.txt src/lib/utils/info.txt src/lib/utils/loadstor.h src/lib/utils/locking_allocator/info.txt src/lib/utils/locking_allocator/locking_allocator.cpp src/lib/utils/locking_allocator/locking_allocator.h src/lib/utils/mem_ops.cpp src/lib/utils/mem_ops.h src/lib/utils/mem_pool/info.txt src/lib/utils/mem_pool/mem_pool.cpp src/lib/utils/mem_pool/mem_pool.h src/lib/utils/mul128.h src/lib/utils/mutex.h src/lib/utils/os_utils.cpp src/lib/utils/os_utils.h src/lib/utils/parsing.cpp src/lib/utils/parsing.h src/lib/utils/poly_dbl/info.txt src/lib/utils/poly_dbl/poly_dbl.cpp src/lib/utils/poly_dbl/poly_dbl.h src/lib/utils/prefetch.h src/lib/utils/read_cfg.cpp src/lib/utils/read_kv.cpp src/lib/utils/rotate.h src/lib/utils/rounding.h src/lib/utils/safeint.h src/lib/utils/simd/info.txt src/lib/utils/simd/simd_32.h src/lib/utils/simd/simd_avx2/info.txt src/lib/utils/simd/simd_avx2/simd_avx2.h src/lib/utils/socket/info.txt src/lib/utils/socket/socket.cpp src/lib/utils/socket/socket.h src/lib/utils/socket/socket_udp.cpp src/lib/utils/socket/socket_udp.h src/lib/utils/socket/uri.cpp src/lib/utils/socket/uri.h src/lib/utils/sqlite3/info.txt src/lib/utils/sqlite3/sqlite3.cpp src/lib/utils/sqlite3/sqlite3.h src/lib/utils/stl_compatibility.h src/lib/utils/stl_util.h src/lib/utils/thread_utils/barrier.cpp src/lib/utils/thread_utils/barrier.h src/lib/utils/thread_utils/info.txt src/lib/utils/thread_utils/rwlock.cpp src/lib/utils/thread_utils/rwlock.h src/lib/utils/thread_utils/semaphore.cpp src/lib/utils/thread_utils/semaphore.h src/lib/utils/thread_utils/thread_pool.cpp src/lib/utils/thread_utils/thread_pool.h src/lib/utils/timer.cpp src/lib/utils/timer.h src/lib/utils/types.h src/lib/utils/uuid/info.txt src/lib/utils/uuid/uuid.cpp src/lib/utils/uuid/uuid.h src/lib/utils/version.cpp src/lib/utils/version.h src/lib/x509/asn1_alt_name.cpp src/lib/x509/asn1_alt_name.h src/lib/x509/asn1_attribute.h src/lib/x509/cert_status.cpp src/lib/x509/cert_status.h src/lib/x509/certstor.cpp src/lib/x509/certstor.h src/lib/x509/certstor_flatfile/certstor_flatfile.cpp src/lib/x509/certstor_flatfile/certstor_flatfile.h src/lib/x509/certstor_flatfile/info.txt src/lib/x509/certstor_sql/certstor_sql.cpp src/lib/x509/certstor_sql/certstor_sql.h src/lib/x509/certstor_sql/info.txt src/lib/x509/certstor_sqlite3/certstor_sqlite.cpp src/lib/x509/certstor_sqlite3/certstor_sqlite.h src/lib/x509/certstor_sqlite3/info.txt src/lib/x509/certstor_system/certstor_system.cpp src/lib/x509/certstor_system/certstor_system.h src/lib/x509/certstor_system/info.txt src/lib/x509/certstor_system_macos/certstor_macos.cpp src/lib/x509/certstor_system_macos/certstor_macos.h src/lib/x509/certstor_system_macos/info.txt src/lib/x509/certstor_system_windows/certstor_windows.cpp src/lib/x509/certstor_system_windows/certstor_windows.h src/lib/x509/certstor_system_windows/info.txt src/lib/x509/crl_ent.cpp src/lib/x509/crl_ent.h src/lib/x509/datastor.cpp src/lib/x509/datastor.h src/lib/x509/info.txt src/lib/x509/key_constraint.cpp src/lib/x509/key_constraint.h src/lib/x509/name_constraint.cpp src/lib/x509/name_constraint.h src/lib/x509/ocsp.cpp src/lib/x509/ocsp.h src/lib/x509/ocsp_types.cpp src/lib/x509/ocsp_types.h src/lib/x509/pkcs10.cpp src/lib/x509/pkcs10.h src/lib/x509/pkix_enums.h src/lib/x509/pkix_types.h src/lib/x509/x509_attribute.cpp src/lib/x509/x509_ca.cpp src/lib/x509/x509_ca.h src/lib/x509/x509_crl.cpp src/lib/x509/x509_crl.h src/lib/x509/x509_dn.cpp src/lib/x509/x509_dn.h src/lib/x509/x509_dn_ub.cpp src/lib/x509/x509_ext.cpp src/lib/x509/x509_ext.h src/lib/x509/x509_obj.cpp src/lib/x509/x509_obj.h src/lib/x509/x509cert.cpp src/lib/x509/x509cert.h src/lib/x509/x509opt.cpp src/lib/x509/x509path.cpp src/lib/x509/x509path.h src/lib/x509/x509self.cpp src/lib/x509/x509self.h src/python/botan2.py src/scripts/Dockerfile.android src/scripts/bench.py src/scripts/build_docs.py src/scripts/check.py src/scripts/ci/appveyor.yml src/scripts/ci/codecov.yml src/scripts/ci/lgtm.yml src/scripts/ci/setup_appveyor.bat src/scripts/ci/setup_gh_actions.sh src/scripts/ci/setup_travis.sh src/scripts/ci/travis.yml src/scripts/ci_build.py src/scripts/ci_check_install.py src/scripts/cleanup.py src/scripts/comba.py src/scripts/create_corpus_zip.py src/scripts/dist.py src/scripts/docker-android.sh src/scripts/ffi_decls.py src/scripts/fuzzer.xml src/scripts/gen_os_features.py src/scripts/install.py src/scripts/macro_checks.py src/scripts/monty.py src/scripts/oids.py src/scripts/python_unittests.py src/scripts/python_unittests_unix.py src/scripts/run_tls_attacker.py src/scripts/run_tls_fuzzer.py src/scripts/show_dependencies.py src/scripts/test_all_configs.py src/scripts/test_cli.py src/scripts/test_cli_crypt.py src/scripts/test_fuzzers.py src/scripts/test_python.py src/scripts/tls_scanner/boa.txt src/scripts/tls_scanner/policy.txt src/scripts/tls_scanner/readme.txt src/scripts/tls_scanner/tls_scanner.py src/scripts/tls_scanner/urls.txt src/scripts/tls_suite_info.py src/scripts/website.py src/tests/data/aead/ccm.vec src/tests/data/aead/chacha20poly1305.vec src/tests/data/aead/eax.vec src/tests/data/aead/gcm.vec src/tests/data/aead/ocb.vec src/tests/data/aead/siv.vec src/tests/data/argon2.vec src/tests/data/asn1_print/input1.der src/tests/data/asn1_print/input2.der src/tests/data/asn1_print/input3.der src/tests/data/asn1_print/input4.der src/tests/data/asn1_print/input5.der src/tests/data/asn1_print/input6.der src/tests/data/asn1_print/input6.pem src/tests/data/asn1_print/output1.txt src/tests/data/asn1_print/output2.txt src/tests/data/asn1_print/output3.txt src/tests/data/asn1_print/output4.txt src/tests/data/asn1_print/output5.txt src/tests/data/asn1_print/output6.txt src/tests/data/asn1_time.vec src/tests/data/base32.vec src/tests/data/base58.vec src/tests/data/base58c.vec src/tests/data/base64.vec src/tests/data/bcrypt_pbkdf.vec src/tests/data/block/aes.vec src/tests/data/block/aria.vec src/tests/data/block/blowfish.vec src/tests/data/block/camellia.vec src/tests/data/block/cascade.vec src/tests/data/block/cast128.vec src/tests/data/block/cast256.vec src/tests/data/block/des.vec src/tests/data/block/gost_28147.vec src/tests/data/block/idea.vec src/tests/data/block/kasumi.vec src/tests/data/block/lion.vec src/tests/data/block/misty.vec src/tests/data/block/noekeon.vec src/tests/data/block/seed.vec src/tests/data/block/serpent.vec src/tests/data/block/shacal2.vec src/tests/data/block/sm4.vec src/tests/data/block/threefish.vec src/tests/data/block/twofish.vec src/tests/data/block/xtea.vec src/tests/data/bn/add.vec src/tests/data/bn/cmp.vec src/tests/data/bn/divide.vec src/tests/data/bn/dsa_gen.vec src/tests/data/bn/gcd.vec src/tests/data/bn/invmod.vec src/tests/data/bn/isprime.vec src/tests/data/bn/jacobi.vec src/tests/data/bn/lshift.vec src/tests/data/bn/mod.vec src/tests/data/bn/mul.vec src/tests/data/bn/perfect_square.vec src/tests/data/bn/powmod.vec src/tests/data/bn/random.vec src/tests/data/bn/ressol.vec src/tests/data/bn/rshift.vec src/tests/data/bn/sqr.vec src/tests/data/bn/sub.vec src/tests/data/charset.vec src/tests/data/cryptobox.vec src/tests/data/dates.vec src/tests/data/fpe_fe1.vec src/tests/data/hash/adler32.vec src/tests/data/hash/blake2b.vec src/tests/data/hash/comp4p.vec src/tests/data/hash/crc24.vec src/tests/data/hash/crc32.vec src/tests/data/hash/gost.vec src/tests/data/hash/keccak.vec src/tests/data/hash/md4.vec src/tests/data/hash/md5.vec src/tests/data/hash/parallel.vec src/tests/data/hash/ripemd160.vec src/tests/data/hash/sha1.vec src/tests/data/hash/sha2_32.vec src/tests/data/hash/sha2_64.vec src/tests/data/hash/sha3.vec src/tests/data/hash/shake.vec src/tests/data/hash/skein.vec src/tests/data/hash/sm3.vec src/tests/data/hash/streebog.vec src/tests/data/hash/tiger.vec src/tests/data/hash/whirlpool.vec src/tests/data/hash_mc.vec src/tests/data/hash_rep.vec src/tests/data/hkdf_label.vec src/tests/data/hostnames.vec src/tests/data/kdf/hkdf.vec src/tests/data/kdf/kdf1.vec src/tests/data/kdf/kdf1_iso18033.vec src/tests/data/kdf/kdf2.vec src/tests/data/kdf/sp800_108_ctr.vec src/tests/data/kdf/sp800_108_fb.vec src/tests/data/kdf/sp800_108_pipe.vec src/tests/data/kdf/sp800_56a.vec src/tests/data/kdf/sp800_56c.vec src/tests/data/kdf/tls_prf.vec src/tests/data/kdf/x942_prf.vec src/tests/data/keywrap/nist_key_wrap.vec src/tests/data/keywrap/nist_key_wrap_invalid.vec src/tests/data/keywrap/rfc3394.vec src/tests/data/mac/cbcmac.vec src/tests/data/mac/cmac.vec src/tests/data/mac/gmac.vec src/tests/data/mac/hmac.vec src/tests/data/mac/poly1305.vec src/tests/data/mac/siphash.vec src/tests/data/mac/x919_mac.vec src/tests/data/misc/roughtime_nonce_from_blind.vec src/tests/data/misc/roughtime_request.vec src/tests/data/misc/roughtime_response.vec src/tests/data/modes/cbc.vec src/tests/data/modes/cfb.vec src/tests/data/modes/ctr.vec src/tests/data/modes/xts.vec src/tests/data/ocb/ocb_long.vec src/tests/data/ocb/ocb_wide.vec src/tests/data/ocb/ocb_wide_long.vec src/tests/data/otp/hotp.vec src/tests/data/otp/totp.vec src/tests/data/pad.vec src/tests/data/passhash/argon2.vec src/tests/data/passhash/bcrypt.vec src/tests/data/passhash/passhash9.vec src/tests/data/pbkdf/pbkdf1.vec src/tests/data/pbkdf/pbkdf2.vec src/tests/data/pbkdf/pgp_s2k.vec src/tests/data/pk_pad_eme/pkcs1.vec src/tests/data/poly_dbl.vec src/tests/data/pubkey/c25519_scalar.vec src/tests/data/pubkey/dh.vec src/tests/data/pubkey/dh_invalid.vec src/tests/data/pubkey/dlies.vec src/tests/data/pubkey/dsa_prob.vec src/tests/data/pubkey/dsa_rfc6979.vec src/tests/data/pubkey/dsa_verify.vec src/tests/data/pubkey/ecc_base_point_mul.vec src/tests/data/pubkey/ecc_invalid.vec src/tests/data/pubkey/ecc_var_point_mul.vec src/tests/data/pubkey/ecdh.vec src/tests/data/pubkey/ecdsa_invalid.vec src/tests/data/pubkey/ecdsa_key_recovery.vec src/tests/data/pubkey/ecdsa_prob.vec src/tests/data/pubkey/ecdsa_rfc6979.vec src/tests/data/pubkey/ecdsa_verify.vec src/tests/data/pubkey/ecdsa_wycheproof.vec src/tests/data/pubkey/ecgdsa.vec src/tests/data/pubkey/ecies-18033.vec src/tests/data/pubkey/ecies.vec src/tests/data/pubkey/eckcdsa.vec src/tests/data/pubkey/ed25519.vec src/tests/data/pubkey/ed25519_verify.vec src/tests/data/pubkey/elgamal_decrypt.vec src/tests/data/pubkey/elgamal_encrypt.vec src/tests/data/pubkey/gost_3410_sign.vec src/tests/data/pubkey/gost_3410_verify.vec src/tests/data/pubkey/mce.vec src/tests/data/pubkey/newhope.vec src/tests/data/pubkey/rsa_decrypt.vec src/tests/data/pubkey/rsa_invalid.vec src/tests/data/pubkey/rsa_kem.vec src/tests/data/pubkey/rsa_pss.vec src/tests/data/pubkey/rsa_pss_raw.vec src/tests/data/pubkey/rsa_sig.vec src/tests/data/pubkey/rsa_verify.vec src/tests/data/pubkey/rsaes.vec src/tests/data/pubkey/sm2_enc.vec src/tests/data/pubkey/sm2_sig.vec src/tests/data/pubkey/workfactor.vec src/tests/data/pubkey/x25519.vec src/tests/data/pubkey/xmss_invalid.vec src/tests/data/pubkey/xmss_sig.vec src/tests/data/pubkey/xmss_verify.vec src/tests/data/rfc6979.vec src/tests/data/rng/chacha_rng.vec src/tests/data/rng/hmac_drbg.vec src/tests/data/salted_blowfish.vec src/tests/data/scrypt.vec src/tests/data/siv_ad.vec src/tests/data/srp6a.vec src/tests/data/stream/chacha.vec src/tests/data/stream/ctr.vec src/tests/data/stream/ofb.vec src/tests/data/stream/rc4.vec src/tests/data/stream/salsa20.vec src/tests/data/stream/shake128.vec src/tests/data/timing/bleichenbacher.vec src/tests/data/timing/ecc_mul.vec src/tests/data/timing/ecdsa.vec src/tests/data/timing/inverse_mod.vec src/tests/data/timing/lucky13sec3.vec src/tests/data/timing/lucky13sec4sha1.vec src/tests/data/timing/lucky13sec4sha256.vec src/tests/data/timing/lucky13sec4sha384.vec src/tests/data/timing/manger.vec src/tests/data/timing/pow_mod.vec src/tests/data/tls-policy/bsi.txt src/tests/data/tls-policy/compat.txt src/tests/data/tls-policy/datagram.txt src/tests/data/tls-policy/default.txt src/tests/data/tls-policy/strict.txt src/tests/data/tls-policy/suiteb_128.txt src/tests/data/tls-policy/suiteb_192.txt src/tests/data/tls/alert.vec src/tests/data/tls/cert_status.vec src/tests/data/tls/cert_verify.vec src/tests/data/tls/client_hello.vec src/tests/data/tls/hello_request.vec src/tests/data/tls/hello_verify.vec src/tests/data/tls/new_session_ticket.vec src/tests/data/tls/server_hello.vec src/tests/data/tls_cbc.vec src/tests/data/tls_cbc_padding.vec src/tests/data/tss/generation.vec src/tests/data/tss/recovery.vec src/tests/data/util.vec src/tests/data/utils/read_kv.vec src/tests/data/x509/bsi/cert_path_CRL_01/cert_path_CRL_01_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_01/cert_path_CRL_01_ee.pem src/tests/data/x509/bsi/cert_path_CRL_01/cert_path_CRL_01_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_01/cert_path_CRL_01_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_01/cert_path_CRL_01_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_01/cert_path_CRL_01_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_01/description.txt src/tests/data/x509/bsi/cert_path_CRL_02/cert_path_CRL_02_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_02/cert_path_CRL_02_ee.pem src/tests/data/x509/bsi/cert_path_CRL_02/cert_path_CRL_02_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_02/cert_path_CRL_02_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_02/cert_path_CRL_02_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_02/cert_path_CRL_02_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_02/crls/cert_path_CRL_02_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_02/crls/cert_path_CRL_02_sub_ca_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_02/description.txt src/tests/data/x509/bsi/cert_path_CRL_03/cert_path_CRL_03_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_03/cert_path_CRL_03_ee.pem src/tests/data/x509/bsi/cert_path_CRL_03/cert_path_CRL_03_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_03/cert_path_CRL_03_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_03/cert_path_CRL_03_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_03/cert_path_CRL_03_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_03/crls/cert_path_CRL_03_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_03/crls/cert_path_CRL_03_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_03/description.txt src/tests/data/x509/bsi/cert_path_CRL_04/cert_path_CRL_04_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_04/cert_path_CRL_04_ee.pem src/tests/data/x509/bsi/cert_path_CRL_04/cert_path_CRL_04_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_04/cert_path_CRL_04_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_04/cert_path_CRL_04_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_04/cert_path_CRL_04_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_04/crls/cert_path_CRL_04_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_04/crls/cert_path_CRL_04_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_04/description.txt src/tests/data/x509/bsi/cert_path_CRL_05/cert_path_CRL_05_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_05/cert_path_CRL_05_ee.pem src/tests/data/x509/bsi/cert_path_CRL_05/cert_path_CRL_05_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_05/cert_path_CRL_05_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_05/cert_path_CRL_05_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_05/cert_path_CRL_05_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_05/crls/cert_path_CRL_05_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_05/crls/cert_path_CRL_05_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_05/description.txt src/tests/data/x509/bsi/cert_path_CRL_06/cert_path_CRL_06_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_06/cert_path_CRL_06_ee.pem src/tests/data/x509/bsi/cert_path_CRL_06/cert_path_CRL_06_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_06/cert_path_CRL_06_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_06/cert_path_CRL_06_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_06/cert_path_CRL_06_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_06/crls/cert_path_CRL_06_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_06/crls/cert_path_CRL_06_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_06/description.txt src/tests/data/x509/bsi/cert_path_CRL_07/cert_path_CRL_07_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_07/cert_path_CRL_07_ee.pem src/tests/data/x509/bsi/cert_path_CRL_07/cert_path_CRL_07_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_07/cert_path_CRL_07_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_07/cert_path_CRL_07_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_07/cert_path_CRL_07_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_07/crls/cert_path_CRL_07_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_07/crls/cert_path_CRL_07_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_07/description.txt src/tests/data/x509/bsi/cert_path_CRL_08/cert_path_CRL_08_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_08/cert_path_CRL_08_ee.pem src/tests/data/x509/bsi/cert_path_CRL_08/cert_path_CRL_08_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_08/cert_path_CRL_08_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_08/cert_path_CRL_08_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_08/cert_path_CRL_08_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_08/crls/cert_path_CRL_08_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_08/crls/cert_path_CRL_08_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_08/description.txt src/tests/data/x509/bsi/cert_path_CRL_09/cert_path_CRL_09_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_09/cert_path_CRL_09_ee.pem src/tests/data/x509/bsi/cert_path_CRL_09/cert_path_CRL_09_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_09/cert_path_CRL_09_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_09/cert_path_CRL_09_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_09/cert_path_CRL_09_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_09/crls/cert_path_CRL_09_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_09/crls/cert_path_CRL_09_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_09/description.txt src/tests/data/x509/bsi/cert_path_CRL_10/cert_path_CRL_10_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_10/cert_path_CRL_10_ee.pem src/tests/data/x509/bsi/cert_path_CRL_10/cert_path_CRL_10_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_10/cert_path_CRL_10_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_10/cert_path_CRL_10_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_10/cert_path_CRL_10_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_10/crls/cert_path_CRL_10_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_10/crls/cert_path_CRL_10_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_10/description.txt src/tests/data/x509/bsi/cert_path_CRL_11/cert_path_CRL_11_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_11/cert_path_CRL_11_ee.pem src/tests/data/x509/bsi/cert_path_CRL_11/cert_path_CRL_11_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_11/cert_path_CRL_11_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_11/cert_path_CRL_11_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_11/cert_path_CRL_11_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_11/crls/cert_path_CRL_11_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_11/crls/cert_path_CRL_11_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_11/description.txt src/tests/data/x509/bsi/cert_path_CRL_12/cert_path_CRL_12_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_12/cert_path_CRL_12_ee.pem src/tests/data/x509/bsi/cert_path_CRL_12/cert_path_CRL_12_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_12/cert_path_CRL_12_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_12/cert_path_CRL_12_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_12/cert_path_CRL_12_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_12/crls/cert_path_CRL_12_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_12/crls/cert_path_CRL_12_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_12/description.txt src/tests/data/x509/bsi/cert_path_CRL_13/cert_path_CRL_13_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_13/cert_path_CRL_13_ee.pem src/tests/data/x509/bsi/cert_path_CRL_13/cert_path_CRL_13_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_13/cert_path_CRL_13_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_13/cert_path_CRL_13_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_13/cert_path_CRL_13_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_13/crls/cert_path_CRL_13_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_13/crls/cert_path_CRL_13_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_13/description.txt src/tests/data/x509/bsi/cert_path_CRL_14/cert_path_CRL_14_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_14/cert_path_CRL_14_ee.pem src/tests/data/x509/bsi/cert_path_CRL_14/cert_path_CRL_14_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_14/cert_path_CRL_14_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_14/cert_path_CRL_14_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_14/cert_path_CRL_14_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_14/crls/cert_path_CRL_14_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_14/crls/cert_path_CRL_14_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_14/description.txt src/tests/data/x509/bsi/cert_path_CRL_15/cert_path_CRL_15_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_15/cert_path_CRL_15_ee.pem src/tests/data/x509/bsi/cert_path_CRL_15/cert_path_CRL_15_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_15/cert_path_CRL_15_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_15/cert_path_CRL_15_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_15/cert_path_CRL_15_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_15/crls/cert_path_CRL_15_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_15/description.txt src/tests/data/x509/bsi/cert_path_CRL_16/cert_path_CRL_16_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_CRL_16/cert_path_CRL_16_ee.pem src/tests/data/x509/bsi/cert_path_CRL_16/cert_path_CRL_16_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_CRL_16/cert_path_CRL_16_root_ca.pem src/tests/data/x509/bsi/cert_path_CRL_16/cert_path_CRL_16_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_CRL_16/cert_path_CRL_16_sub_ca.pem src/tests/data/x509/bsi/cert_path_CRL_16/crls/cert_path_CRL_16_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_16/crls/cert_path_CRL_16_root_crl.pem.crl src/tests/data/x509/bsi/cert_path_CRL_16/description.txt src/tests/data/x509/bsi/cert_path_algo_strength_01/cert_path_algo_strength_01_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_01/cert_path_algo_strength_01_ee.pem src/tests/data/x509/bsi/cert_path_algo_strength_01/cert_path_algo_strength_01_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_01/cert_path_algo_strength_01_root_ca.pem src/tests/data/x509/bsi/cert_path_algo_strength_01/cert_path_algo_strength_01_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_01/cert_path_algo_strength_01_sub_ca.pem src/tests/data/x509/bsi/cert_path_algo_strength_01/description.txt src/tests/data/x509/bsi/cert_path_algo_strength_02/cert_path_algo_strength_02_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_02/cert_path_algo_strength_02_ee.pem src/tests/data/x509/bsi/cert_path_algo_strength_02/cert_path_algo_strength_02_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_02/cert_path_algo_strength_02_root_ca.pem src/tests/data/x509/bsi/cert_path_algo_strength_02/cert_path_algo_strength_02_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_02/cert_path_algo_strength_02_sub_ca.pem src/tests/data/x509/bsi/cert_path_algo_strength_02/description.txt src/tests/data/x509/bsi/cert_path_algo_strength_03/cert_path_algo_strength_03_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_03/cert_path_algo_strength_03_ee.pem src/tests/data/x509/bsi/cert_path_algo_strength_03/cert_path_algo_strength_03_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_03/cert_path_algo_strength_03_root_ca.pem src/tests/data/x509/bsi/cert_path_algo_strength_03/cert_path_algo_strength_03_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_algo_strength_03/cert_path_algo_strength_03_sub_ca.pem src/tests/data/x509/bsi/cert_path_algo_strength_03/description.txt src/tests/data/x509/bsi/cert_path_common_01/cert_path_common_01_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_01/cert_path_common_01_ee.pem src/tests/data/x509/bsi/cert_path_common_01/cert_path_common_01_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_01/cert_path_common_01_root_ca.pem src/tests/data/x509/bsi/cert_path_common_01/cert_path_common_01_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_01/cert_path_common_01_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_01/description.txt src/tests/data/x509/bsi/cert_path_common_02/cert_path_common_02_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_02/cert_path_common_02_ee.pem src/tests/data/x509/bsi/cert_path_common_02/cert_path_common_02_root_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_02/cert_path_common_02_root_ca.pem src/tests/data/x509/bsi/cert_path_common_02/cert_path_common_02_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_02/cert_path_common_02_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_02/description.txt src/tests/data/x509/bsi/cert_path_common_03/cert_path_common_03_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_03/cert_path_common_03_ee.pem src/tests/data/x509/bsi/cert_path_common_03/cert_path_common_03_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_03/cert_path_common_03_root_ca.pem src/tests/data/x509/bsi/cert_path_common_03/cert_path_common_03_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_03/cert_path_common_03_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_03/description.txt src/tests/data/x509/bsi/cert_path_common_04/cert_path_common_04_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_04/cert_path_common_04_ee.pem src/tests/data/x509/bsi/cert_path_common_04/cert_path_common_04_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_04/cert_path_common_04_root_ca.pem src/tests/data/x509/bsi/cert_path_common_04/cert_path_common_04_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_04/cert_path_common_04_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_04/description.txt src/tests/data/x509/bsi/cert_path_common_05/cert_path_common_05_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_05/cert_path_common_05_ee.pem src/tests/data/x509/bsi/cert_path_common_05/cert_path_common_05_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_05/cert_path_common_05_root_ca.pem src/tests/data/x509/bsi/cert_path_common_05/cert_path_common_05_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_05/cert_path_common_05_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_05/description.txt src/tests/data/x509/bsi/cert_path_common_06/cert_path_common_06_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_06/cert_path_common_06_ee.pem src/tests/data/x509/bsi/cert_path_common_06/cert_path_common_06_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_06/cert_path_common_06_root_ca.pem src/tests/data/x509/bsi/cert_path_common_06/cert_path_common_06_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_06/cert_path_common_06_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_06/description.txt src/tests/data/x509/bsi/cert_path_common_07/cert_path_common_07_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_07/cert_path_common_07_ee.pem src/tests/data/x509/bsi/cert_path_common_07/cert_path_common_07_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_07/cert_path_common_07_root_ca.pem src/tests/data/x509/bsi/cert_path_common_07/cert_path_common_07_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_07/cert_path_common_07_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_07/description.txt src/tests/data/x509/bsi/cert_path_common_08/cert_path_common_08_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_08/cert_path_common_08_ee.pem src/tests/data/x509/bsi/cert_path_common_08/cert_path_common_08_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_08/cert_path_common_08_root_ca.pem src/tests/data/x509/bsi/cert_path_common_08/cert_path_common_08_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_08/cert_path_common_08_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_08/description.txt src/tests/data/x509/bsi/cert_path_common_09/cert_path_common_09_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_09/cert_path_common_09_ee.pem src/tests/data/x509/bsi/cert_path_common_09/cert_path_common_09_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_09/cert_path_common_09_root_ca.pem src/tests/data/x509/bsi/cert_path_common_09/cert_path_common_09_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_09/cert_path_common_09_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_09/description.txt src/tests/data/x509/bsi/cert_path_common_10/cert_path_common_10_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_10/cert_path_common_10_ee.pem src/tests/data/x509/bsi/cert_path_common_10/cert_path_common_10_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_10/cert_path_common_10_root_ca.pem src/tests/data/x509/bsi/cert_path_common_10/cert_path_common_10_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_10/cert_path_common_10_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_10/description.txt src/tests/data/x509/bsi/cert_path_common_11/cert_path_common_11_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_11/cert_path_common_11_ee.pem src/tests/data/x509/bsi/cert_path_common_11/cert_path_common_11_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_11/cert_path_common_11_root_ca.pem src/tests/data/x509/bsi/cert_path_common_11/cert_path_common_11_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_11/cert_path_common_11_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_11/description.txt src/tests/data/x509/bsi/cert_path_common_12/cert_path_common_12_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_12/cert_path_common_12_ee.pem src/tests/data/x509/bsi/cert_path_common_12/cert_path_common_12_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_12/cert_path_common_12_root_ca.pem src/tests/data/x509/bsi/cert_path_common_12/cert_path_common_12_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_12/cert_path_common_12_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_12/description.txt src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_ee.pem src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_root_ca.pem src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_root_ca_key_rollover.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_root_ca_key_rollover.pem src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_subca_ca_key_rollover.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_13/cert_path_common_13_subca_ca_key_rollover.pem src/tests/data/x509/bsi/cert_path_common_13/description.txt src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_ee.pem src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_root_ca.pem src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_wrong_root_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_wrong_root_ca.pem src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_wrong_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_common_14/cert_path_common_14_wrong_sub_ca.pem src/tests/data/x509/bsi/cert_path_common_14/description.txt src/tests/data/x509/bsi/cert_path_crypt_01/cert_path_crypt_01_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_crypt_01/cert_path_crypt_01_ee.pem src/tests/data/x509/bsi/cert_path_crypt_01/cert_path_crypt_01_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_crypt_01/cert_path_crypt_01_root_ca.pem src/tests/data/x509/bsi/cert_path_crypt_01/cert_path_crypt_01_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_crypt_01/cert_path_crypt_01_sub_ca.pem src/tests/data/x509/bsi/cert_path_crypt_01/description.txt src/tests/data/x509/bsi/cert_path_crypt_02/cert_path_crypt_02_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_crypt_02/cert_path_crypt_02_ee.pem src/tests/data/x509/bsi/cert_path_crypt_02/cert_path_crypt_02_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_crypt_02/cert_path_crypt_02_root_ca.pem src/tests/data/x509/bsi/cert_path_crypt_02/cert_path_crypt_02_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_crypt_02/cert_path_crypt_02_sub_ca.pem src/tests/data/x509/bsi/cert_path_crypt_02/description.txt src/tests/data/x509/bsi/cert_path_ext_01/cert_path_ext_01_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_01/cert_path_ext_01_ee.pem src/tests/data/x509/bsi/cert_path_ext_01/cert_path_ext_01_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_01/cert_path_ext_01_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_01/cert_path_ext_01_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_01/cert_path_ext_01_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_01/description.txt src/tests/data/x509/bsi/cert_path_ext_02/cert_path_ext_02_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_02/cert_path_ext_02_ee.pem src/tests/data/x509/bsi/cert_path_ext_02/cert_path_ext_02_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_02/cert_path_ext_02_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_02/cert_path_ext_02_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_02/cert_path_ext_02_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_02/description.txt src/tests/data/x509/bsi/cert_path_ext_03/cert_path_ext_03_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_03/cert_path_ext_03_ee.pem src/tests/data/x509/bsi/cert_path_ext_03/cert_path_ext_03_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_03/cert_path_ext_03_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_03/cert_path_ext_03_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_03/cert_path_ext_03_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_03/description.txt src/tests/data/x509/bsi/cert_path_ext_04/cert_path_ext_04_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_04/cert_path_ext_04_ee.pem src/tests/data/x509/bsi/cert_path_ext_04/cert_path_ext_04_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_04/cert_path_ext_04_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_04/cert_path_ext_04_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_04/cert_path_ext_04_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_04/description.txt src/tests/data/x509/bsi/cert_path_ext_05/cert_path_ext_05_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_05/cert_path_ext_05_ee.pem src/tests/data/x509/bsi/cert_path_ext_05/cert_path_ext_05_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_05/cert_path_ext_05_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_05/cert_path_ext_05_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_05/cert_path_ext_05_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_05/description.txt src/tests/data/x509/bsi/cert_path_ext_06/cert_path_ext_06_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_06/cert_path_ext_06_ee.pem src/tests/data/x509/bsi/cert_path_ext_06/cert_path_ext_06_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_06/cert_path_ext_06_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_06/cert_path_ext_06_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_06/cert_path_ext_06_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_06/description.txt src/tests/data/x509/bsi/cert_path_ext_07/cert_path_ext_07_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_07/cert_path_ext_07_ee.pem src/tests/data/x509/bsi/cert_path_ext_07/cert_path_ext_07_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_07/cert_path_ext_07_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_07/cert_path_ext_07_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_07/cert_path_ext_07_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_07/description.txt src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_ee.pem src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_sub_ca_l1.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_sub_ca_l1.pem src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_sub_ca_l2.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_08/cert_path_ext_08_sub_ca_l2.pem src/tests/data/x509/bsi/cert_path_ext_08/description.txt src/tests/data/x509/bsi/cert_path_ext_09/cert_path_ext_09_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_09/cert_path_ext_09_ee.pem src/tests/data/x509/bsi/cert_path_ext_09/cert_path_ext_09_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_09/cert_path_ext_09_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_09/cert_path_ext_09_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_09/cert_path_ext_09_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_09/description.txt src/tests/data/x509/bsi/cert_path_ext_10/cert_path_ext_10_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_10/cert_path_ext_10_ee.pem src/tests/data/x509/bsi/cert_path_ext_10/cert_path_ext_10_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_10/cert_path_ext_10_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_10/cert_path_ext_10_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_10/cert_path_ext_10_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_10/description.txt src/tests/data/x509/bsi/cert_path_ext_11/cert_path_ext_11_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_11/cert_path_ext_11_ee.pem src/tests/data/x509/bsi/cert_path_ext_11/cert_path_ext_11_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_11/cert_path_ext_11_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_11/cert_path_ext_11_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_11/cert_path_ext_11_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_11/description.txt src/tests/data/x509/bsi/cert_path_ext_12/cert_path_ext_12_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_12/cert_path_ext_12_ee.pem src/tests/data/x509/bsi/cert_path_ext_12/cert_path_ext_12_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_12/cert_path_ext_12_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_12/cert_path_ext_12_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_12/cert_path_ext_12_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_12/description.txt src/tests/data/x509/bsi/cert_path_ext_13/cert_path_ext_13_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_13/cert_path_ext_13_ee.pem src/tests/data/x509/bsi/cert_path_ext_13/cert_path_ext_13_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_13/cert_path_ext_13_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_13/cert_path_ext_13_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_13/cert_path_ext_13_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_13/description.txt src/tests/data/x509/bsi/cert_path_ext_14/cert_path_ext_14_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_14/cert_path_ext_14_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_14/cert_path_ext_14_sub_ca.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_14/cert_path_ext_14_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_14/description.txt src/tests/data/x509/bsi/cert_path_ext_15/cert_path_ext_15_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_15/cert_path_ext_15_ee.pem src/tests/data/x509/bsi/cert_path_ext_15/cert_path_ext_15_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_15/cert_path_ext_15_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_15/cert_path_ext_15_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_15/cert_path_ext_15_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_15/description.txt src/tests/data/x509/bsi/cert_path_ext_16/cert_path_ext_16_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_16/cert_path_ext_16_ee.pem src/tests/data/x509/bsi/cert_path_ext_16/cert_path_ext_16_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_16/cert_path_ext_16_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_16/cert_path_ext_16_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_16/cert_path_ext_16_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_16/description.txt src/tests/data/x509/bsi/cert_path_ext_17/cert_path_ext_17_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_17/cert_path_ext_17_ee.pem src/tests/data/x509/bsi/cert_path_ext_17/cert_path_ext_17_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_17/cert_path_ext_17_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_17/cert_path_ext_17_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_17/cert_path_ext_17_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_17/description.txt src/tests/data/x509/bsi/cert_path_ext_18/cert_path_ext_18_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_18/cert_path_ext_18_ee.pem src/tests/data/x509/bsi/cert_path_ext_18/cert_path_ext_18_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_18/cert_path_ext_18_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_18/cert_path_ext_18_sub_ca.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_18/cert_path_ext_18_sub_ca.pem src/tests/data/x509/bsi/cert_path_ext_18/description.txt src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_ee.TC.pem.crt src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_ee.pem src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_root_ca.TA.pem.crt src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_root_ca.pem src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_sub_ca_l1.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_sub_ca_l1.pem src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_sub_ca_l2.ca.pem.crt src/tests/data/x509/bsi/cert_path_ext_19/cert_path_ext_19_sub_ca_l2.pem src/tests/data/x509/bsi/cert_path_ext_19/description.txt src/tests/data/x509/bsi/expected.txt src/tests/data/x509/bsi/readme.txt src/tests/data/x509/certstor/cert1.crt src/tests/data/x509/certstor/cert2.crt src/tests/data/x509/certstor/cert3.crt src/tests/data/x509/certstor/cert4.crt src/tests/data/x509/certstor/cert5a.crt src/tests/data/x509/certstor/cert5b.crt src/tests/data/x509/certstor/key01.pem src/tests/data/x509/certstor/key03.pem src/tests/data/x509/certstor/key04.pem src/tests/data/x509/certstor/key05.pem src/tests/data/x509/certstor/key06.pem src/tests/data/x509/cve-2020-0601/ca.pem src/tests/data/x509/cve-2020-0601/ee.pem src/tests/data/x509/cve-2020-0601/fake_ca.pem src/tests/data/x509/ecc/CSCA.CSCA.csca-germany.1.crt src/tests/data/x509/ecc/ecc_private_with_rfc5915_ext.pem src/tests/data/x509/ecc/ecc_private_with_rfc5915_parameters.pem src/tests/data/x509/ecc/link_SHA1.166.crt src/tests/data/x509/ecc/link_SHA256.cer src/tests/data/x509/ecc/nodompar_private.pkcs8.pem src/tests/data/x509/ecc/root2_SHA256.cer src/tests/data/x509/ecc/root_SHA1.163.crt src/tests/data/x509/ecc/secp384r1_seed.pem src/tests/data/x509/ecc/withdompar_private.pkcs8.pem src/tests/data/x509/extended/01/end.crt src/tests/data/x509/extended/01/int.crt src/tests/data/x509/extended/01/root.crt src/tests/data/x509/extended/02/end.crt src/tests/data/x509/extended/02/int1-2.crt src/tests/data/x509/extended/02/int1.crt src/tests/data/x509/extended/02/root.crt src/tests/data/x509/extended/03/end.crt src/tests/data/x509/extended/03/int1.crt src/tests/data/x509/extended/03/root.crt src/tests/data/x509/extended/expected.txt src/tests/data/x509/gost/gost_int.pem src/tests/data/x509/gost/gost_root.pem src/tests/data/x509/misc/bundledcertdir/ValidCert.pem src/tests/data/x509/misc/cert_seq.der src/tests/data/x509/misc/certstor/ca_bundle_containing_non_ca.pem src/tests/data/x509/misc/certstor/valid_ca_bundle.pem src/tests/data/x509/misc/contains_authority_info_access.pem src/tests/data/x509/misc/contains_authority_info_access_with_two_ca_issuers.pem src/tests/data/x509/misc/contains_bmpstring.pem src/tests/data/x509/misc/contains_utf8string.pem src/tests/data/x509/misc/name_constraint_ci/int.pem src/tests/data/x509/misc/name_constraint_ci/leaf.pem src/tests/data/x509/misc/name_constraint_ci/root.pem src/tests/data/x509/misc/nc_skip_self/int.pem src/tests/data/x509/misc/nc_skip_self/leaf.pem src/tests/data/x509/misc/nc_skip_self/root.pem src/tests/data/x509/misc/opcuactt_ca.der src/tests/data/x509/misc/opcuactt_ca.pem src/tests/data/x509/misc/rdn_set.crt src/tests/data/x509/misc/rsa_key.pem src/tests/data/x509/misc/rsa_oaep.pem src/tests/data/x509/misc/v1ca/ee.pem src/tests/data/x509/misc/v1ca/int.pem src/tests/data/x509/misc/v1ca/root.pem src/tests/data/x509/name_constraint/Invalid_DN_Name_Constraint.crt src/tests/data/x509/name_constraint/Invalid_Email_Name_Constraint.crt src/tests/data/x509/name_constraint/Invalid_IP_Name_Constraint.crt src/tests/data/x509/name_constraint/Root_DNS_Name_Constraint.crt src/tests/data/x509/name_constraint/Root_DN_Name_Constraint.crt src/tests/data/x509/name_constraint/Root_Email_Name_Constraint.crt src/tests/data/x509/name_constraint/Root_IP_Name_Constraint.crt src/tests/data/x509/name_constraint/Valid_DNS_Name_Constraint.crt src/tests/data/x509/name_constraint/Valid_DN_Name_Constraint.crt src/tests/data/x509/name_constraint/Valid_IP_Name_Constraint.crt src/tests/data/x509/name_constraint_san/int.pem src/tests/data/x509/name_constraint_san/leaf.pem src/tests/data/x509/name_constraint_san/root.pem src/tests/data/x509/nist/expected.txt src/tests/data/x509/nist/root.crl src/tests/data/x509/nist/root.crt src/tests/data/x509/nist/test01/end.crt src/tests/data/x509/nist/test02/end.crt src/tests/data/x509/nist/test02/int.crl src/tests/data/x509/nist/test02/int.crt src/tests/data/x509/nist/test03/end.crt src/tests/data/x509/nist/test03/int.crl src/tests/data/x509/nist/test03/int.crt src/tests/data/x509/nist/test04/end.crt src/tests/data/x509/nist/test04/int1.crl src/tests/data/x509/nist/test04/int1.crt src/tests/data/x509/nist/test04/int2.crl src/tests/data/x509/nist/test04/int2.crt src/tests/data/x509/nist/test05/end.crt src/tests/data/x509/nist/test05/int.crl src/tests/data/x509/nist/test05/int.crt src/tests/data/x509/nist/test06/end.crt src/tests/data/x509/nist/test06/int.crl src/tests/data/x509/nist/test06/int.crt src/tests/data/x509/nist/test07/end.crt src/tests/data/x509/nist/test07/int.crl src/tests/data/x509/nist/test07/int.crt src/tests/data/x509/nist/test08/end.crt src/tests/data/x509/nist/test08/int.crl src/tests/data/x509/nist/test08/int.crt src/tests/data/x509/nist/test09/end.crt src/tests/data/x509/nist/test09/int.crl src/tests/data/x509/nist/test09/int.crt src/tests/data/x509/nist/test10/end.crt src/tests/data/x509/nist/test10/int.crl src/tests/data/x509/nist/test10/int.crt src/tests/data/x509/nist/test11/end.crt src/tests/data/x509/nist/test11/int.crl src/tests/data/x509/nist/test11/int.crt src/tests/data/x509/nist/test12/end.crt src/tests/data/x509/nist/test12/int.crl src/tests/data/x509/nist/test12/int.crt src/tests/data/x509/nist/test13/end.crt src/tests/data/x509/nist/test13/int.crl src/tests/data/x509/nist/test13/int.crt src/tests/data/x509/nist/test14/end.crt src/tests/data/x509/nist/test14/int.crl src/tests/data/x509/nist/test14/int.crt src/tests/data/x509/nist/test15/end.crt src/tests/data/x509/nist/test15/int.crl src/tests/data/x509/nist/test15/int.crt src/tests/data/x509/nist/test16/end.crt src/tests/data/x509/nist/test16/int.crl src/tests/data/x509/nist/test16/int.crt src/tests/data/x509/nist/test17/end.crt src/tests/data/x509/nist/test17/int.crl src/tests/data/x509/nist/test17/int.crt src/tests/data/x509/nist/test18/end.crt src/tests/data/x509/nist/test18/int.crl src/tests/data/x509/nist/test18/int.crt src/tests/data/x509/nist/test19/end.crt src/tests/data/x509/nist/test19/int.crt src/tests/data/x509/nist/test20/end.crt src/tests/data/x509/nist/test20/int.crl src/tests/data/x509/nist/test20/int.crt src/tests/data/x509/nist/test21/end.crt src/tests/data/x509/nist/test21/int.crl src/tests/data/x509/nist/test21/int.crt src/tests/data/x509/nist/test22/end.crt src/tests/data/x509/nist/test22/int.crl src/tests/data/x509/nist/test22/int.crt src/tests/data/x509/nist/test23/end.crt src/tests/data/x509/nist/test23/int.crl src/tests/data/x509/nist/test23/int.crt src/tests/data/x509/nist/test24/end.crt src/tests/data/x509/nist/test24/int.crl src/tests/data/x509/nist/test24/int.crt src/tests/data/x509/nist/test25/end.crt src/tests/data/x509/nist/test25/int.crl src/tests/data/x509/nist/test25/int.crt src/tests/data/x509/nist/test26/end.crt src/tests/data/x509/nist/test26/int.crl src/tests/data/x509/nist/test26/int.crt src/tests/data/x509/nist/test27/end.crt src/tests/data/x509/nist/test27/int.crl src/tests/data/x509/nist/test27/int.crt src/tests/data/x509/nist/test28/end.crt src/tests/data/x509/nist/test28/int.crl src/tests/data/x509/nist/test28/int.crt src/tests/data/x509/nist/test29/end.crt src/tests/data/x509/nist/test29/int.crl src/tests/data/x509/nist/test29/int.crt src/tests/data/x509/nist/test30/end.crt src/tests/data/x509/nist/test30/int.crl src/tests/data/x509/nist/test30/int.crt src/tests/data/x509/nist/test31/end.crt src/tests/data/x509/nist/test31/int.crl src/tests/data/x509/nist/test31/int.crt src/tests/data/x509/nist/test32/end.crt src/tests/data/x509/nist/test32/int.crl src/tests/data/x509/nist/test32/int.crt src/tests/data/x509/nist/test33/end.crt src/tests/data/x509/nist/test33/int.crl src/tests/data/x509/nist/test33/int.crt src/tests/data/x509/nist/test34/end.crt src/tests/data/x509/nist/test34/int.crl src/tests/data/x509/nist/test34/int.crt src/tests/data/x509/nist/test35/end.crt src/tests/data/x509/nist/test35/int.crl src/tests/data/x509/nist/test35/int.crt src/tests/data/x509/nist/test36/end.crt src/tests/data/x509/nist/test36/int1.crl src/tests/data/x509/nist/test36/int1.crt src/tests/data/x509/nist/test36/int2.crl src/tests/data/x509/nist/test36/int2.crt src/tests/data/x509/nist/test37/end.crt src/tests/data/x509/nist/test37/int1.crl src/tests/data/x509/nist/test37/int1.crt src/tests/data/x509/nist/test37/int2.crl src/tests/data/x509/nist/test37/int2.crt src/tests/data/x509/nist/test38/end.crt src/tests/data/x509/nist/test38/int1.crl src/tests/data/x509/nist/test38/int1.crt src/tests/data/x509/nist/test38/int2.crl src/tests/data/x509/nist/test38/int2.crt src/tests/data/x509/nist/test39/end.crt src/tests/data/x509/nist/test39/int1.crl src/tests/data/x509/nist/test39/int1.crt src/tests/data/x509/nist/test39/int2.crl src/tests/data/x509/nist/test39/int2.crt src/tests/data/x509/nist/test39/int3.crl src/tests/data/x509/nist/test39/int3.crt src/tests/data/x509/nist/test40/end.crt src/tests/data/x509/nist/test40/int1.crl src/tests/data/x509/nist/test40/int1.crt src/tests/data/x509/nist/test40/int2.crl src/tests/data/x509/nist/test40/int2.crt src/tests/data/x509/nist/test40/int3.crl src/tests/data/x509/nist/test40/int3.crt src/tests/data/x509/nist/test41/end.crt src/tests/data/x509/nist/test41/int1.crl src/tests/data/x509/nist/test41/int1.crt src/tests/data/x509/nist/test41/int2.crl src/tests/data/x509/nist/test41/int2.crt src/tests/data/x509/nist/test41/int3.crl src/tests/data/x509/nist/test41/int3.crt src/tests/data/x509/nist/test42/end.crt src/tests/data/x509/nist/test42/int1.crl src/tests/data/x509/nist/test42/int1.crt src/tests/data/x509/nist/test42/int2.crl src/tests/data/x509/nist/test42/int2.crt src/tests/data/x509/nist/test42/int3.crl src/tests/data/x509/nist/test42/int3.crt src/tests/data/x509/nist/test42/int4.crl src/tests/data/x509/nist/test42/int4.crt src/tests/data/x509/nist/test43/end.crt src/tests/data/x509/nist/test43/int1.crl src/tests/data/x509/nist/test43/int1.crt src/tests/data/x509/nist/test43/int2.crl src/tests/data/x509/nist/test43/int2.crt src/tests/data/x509/nist/test43/int3.crl src/tests/data/x509/nist/test43/int3.crt src/tests/data/x509/nist/test43/int4.crl src/tests/data/x509/nist/test43/int4.crt src/tests/data/x509/nist/test44/end.crt src/tests/data/x509/nist/test44/int1.crl src/tests/data/x509/nist/test44/int1.crt src/tests/data/x509/nist/test44/int2.crl src/tests/data/x509/nist/test44/int2.crt src/tests/data/x509/nist/test44/int3.crl src/tests/data/x509/nist/test44/int3.crt src/tests/data/x509/nist/test44/int4.crl src/tests/data/x509/nist/test44/int4.crt src/tests/data/x509/nist/test45/end.crt src/tests/data/x509/nist/test45/int1.crl src/tests/data/x509/nist/test45/int1.crt src/tests/data/x509/nist/test45/int2.crl src/tests/data/x509/nist/test45/int2.crt src/tests/data/x509/nist/test45/int3.crl src/tests/data/x509/nist/test45/int3.crt src/tests/data/x509/nist/test45/int4.crl src/tests/data/x509/nist/test45/int4.crt src/tests/data/x509/nist/test46/end.crt src/tests/data/x509/nist/test46/int1.crl src/tests/data/x509/nist/test46/int1.crt src/tests/data/x509/nist/test46/int2.crl src/tests/data/x509/nist/test46/int2.crt src/tests/data/x509/nist/test46/int3.crl src/tests/data/x509/nist/test46/int3.crt src/tests/data/x509/nist/test46/int4.crl src/tests/data/x509/nist/test46/int4.crt src/tests/data/x509/nist/test47/end.crt src/tests/data/x509/nist/test47/int1.crl src/tests/data/x509/nist/test47/int1.crt src/tests/data/x509/nist/test47/int2.crl src/tests/data/x509/nist/test47/int2.crt src/tests/data/x509/nist/test47/int3.crl src/tests/data/x509/nist/test47/int3.crt src/tests/data/x509/nist/test47/int4.crl src/tests/data/x509/nist/test47/int4.crt src/tests/data/x509/nist/test48/end.crt src/tests/data/x509/nist/test48/int.crl src/tests/data/x509/nist/test48/int.crt src/tests/data/x509/nist/test49/end.crt src/tests/data/x509/nist/test49/int.crl src/tests/data/x509/nist/test49/int.crt src/tests/data/x509/nist/test50/end.crt src/tests/data/x509/nist/test50/int.crl src/tests/data/x509/nist/test50/int.crt src/tests/data/x509/nist/test51/end.crt src/tests/data/x509/nist/test51/int.crl src/tests/data/x509/nist/test51/int.crt src/tests/data/x509/nist/test52/end.crt src/tests/data/x509/nist/test52/int.crl src/tests/data/x509/nist/test52/int.crt src/tests/data/x509/nist/test53/end.crt src/tests/data/x509/nist/test53/int.crl src/tests/data/x509/nist/test53/int.crt src/tests/data/x509/nist/test54/end.crt src/tests/data/x509/nist/test54/int1.crl src/tests/data/x509/nist/test54/int1.crt src/tests/data/x509/nist/test54/int2.crl src/tests/data/x509/nist/test54/int2.crt src/tests/data/x509/nist/test55/end.crt src/tests/data/x509/nist/test55/int1.crl src/tests/data/x509/nist/test55/int1.crt src/tests/data/x509/nist/test55/int2.crl src/tests/data/x509/nist/test55/int2.crt src/tests/data/x509/nist/test56/end.crt src/tests/data/x509/nist/test56/int.crl src/tests/data/x509/nist/test56/int.crt src/tests/data/x509/nist/test57/end.crt src/tests/data/x509/nist/test57/int.crl src/tests/data/x509/nist/test57/int.crt src/tests/data/x509/nist/test58/end.crt src/tests/data/x509/nist/test58/int1.crl src/tests/data/x509/nist/test58/int1.crt src/tests/data/x509/nist/test58/int2.crl src/tests/data/x509/nist/test58/int2.crt src/tests/data/x509/nist/test58/int3.crl src/tests/data/x509/nist/test58/int3.crt src/tests/data/x509/nist/test59/end.crt src/tests/data/x509/nist/test59/int1.crl src/tests/data/x509/nist/test59/int1.crt src/tests/data/x509/nist/test59/int2.crl src/tests/data/x509/nist/test59/int2.crt src/tests/data/x509/nist/test59/int3.crl src/tests/data/x509/nist/test59/int3.crt src/tests/data/x509/nist/test60/end.crt src/tests/data/x509/nist/test60/int1.crl src/tests/data/x509/nist/test60/int1.crt src/tests/data/x509/nist/test60/int2.crl src/tests/data/x509/nist/test60/int2.crt src/tests/data/x509/nist/test60/int3.crl src/tests/data/x509/nist/test60/int3.crt src/tests/data/x509/nist/test60/int4.crl src/tests/data/x509/nist/test60/int4.crt src/tests/data/x509/nist/test61/end.crt src/tests/data/x509/nist/test61/int1.crl src/tests/data/x509/nist/test61/int1.crt src/tests/data/x509/nist/test61/int2.crl src/tests/data/x509/nist/test61/int2.crt src/tests/data/x509/nist/test61/int3.crl src/tests/data/x509/nist/test61/int3.crt src/tests/data/x509/nist/test61/int4.crl src/tests/data/x509/nist/test61/int4.crt src/tests/data/x509/nist/test62/end.crt src/tests/data/x509/nist/test62/int1.crl src/tests/data/x509/nist/test62/int1.crt src/tests/data/x509/nist/test62/int2.crl src/tests/data/x509/nist/test62/int2.crt src/tests/data/x509/nist/test62/int3.crl src/tests/data/x509/nist/test62/int3.crt src/tests/data/x509/nist/test62/int4.crl src/tests/data/x509/nist/test62/int4.crt src/tests/data/x509/nist/test63/end.crt src/tests/data/x509/nist/test63/int1.crl src/tests/data/x509/nist/test63/int1.crt src/tests/data/x509/nist/test63/int2.crl src/tests/data/x509/nist/test63/int2.crt src/tests/data/x509/nist/test63/int3.crl src/tests/data/x509/nist/test63/int3.crt src/tests/data/x509/nist/test63/int4.crl src/tests/data/x509/nist/test63/int4.crt src/tests/data/x509/nist/test64/end.crt src/tests/data/x509/nist/test64/int.crl src/tests/data/x509/nist/test64/int.crt src/tests/data/x509/nist/test65/end.crt src/tests/data/x509/nist/test65/int.crl src/tests/data/x509/nist/test65/int1.crt src/tests/data/x509/nist/test65/int2.crt src/tests/data/x509/nist/test66/end.crt src/tests/data/x509/nist/test66/int.crl src/tests/data/x509/nist/test66/int.crt src/tests/data/x509/nist/test67/end.crt src/tests/data/x509/nist/test67/int.crt src/tests/data/x509/nist/test67/int1.crl src/tests/data/x509/nist/test67/int2.crl src/tests/data/x509/nist/test68/end.crt src/tests/data/x509/nist/test68/int1.crl src/tests/data/x509/nist/test68/int1.crt src/tests/data/x509/nist/test68/int2.crl src/tests/data/x509/nist/test68/int2.crt src/tests/data/x509/nist/test69/end.crt src/tests/data/x509/nist/test69/int.crl src/tests/data/x509/nist/test69/int.crt src/tests/data/x509/nist/test70/end.crt src/tests/data/x509/nist/test70/int1.crl src/tests/data/x509/nist/test70/int1.crt src/tests/data/x509/nist/test70/int2.crl src/tests/data/x509/nist/test70/int2.crt src/tests/data/x509/nist/test71/end.crt src/tests/data/x509/nist/test71/int.crl src/tests/data/x509/nist/test71/int.crt src/tests/data/x509/nist/test72/end.crt src/tests/data/x509/nist/test72/int.crl src/tests/data/x509/nist/test72/int.crt src/tests/data/x509/nist/test73/end.crt src/tests/data/x509/nist/test73/int.crl src/tests/data/x509/nist/test73/int.crt src/tests/data/x509/nist/test74/end.crt src/tests/data/x509/nist/test74/int.crl src/tests/data/x509/nist/test74/int.crt src/tests/data/x509/nist/test75/end.crt src/tests/data/x509/nist/test75/int.crl src/tests/data/x509/nist/test75/int.crt src/tests/data/x509/nist/test76/end.crt src/tests/data/x509/nist/test76/int.crl src/tests/data/x509/nist/test76/int.crt src/tests/data/x509/ocsp/bdrive_encryption.pem src/tests/data/x509/ocsp/bdrive_root.pem src/tests/data/x509/ocsp/digicert-ecdsa-int.pem src/tests/data/x509/ocsp/digicert-root.pem src/tests/data/x509/ocsp/geotrust.pem src/tests/data/x509/ocsp/gmail.pem src/tests/data/x509/ocsp/google_g2.pem src/tests/data/x509/ocsp/identrust.pem src/tests/data/x509/ocsp/letsencrypt.pem src/tests/data/x509/ocsp/patrickschmidt.pem src/tests/data/x509/ocsp/patrickschmidt_ocsp.der src/tests/data/x509/ocsp/patrickschmidt_ocsp_try_later_wrong_sig.der src/tests/data/x509/ocsp/randombit.pem src/tests/data/x509/ocsp/randombit_ocsp.der src/tests/data/x509/ocsp/resp1.der src/tests/data/x509/ocsp/resp2.der src/tests/data/x509/ocsp/resp3.der src/tests/data/x509/pss_certs/01/README.txt src/tests/data/x509/pss_certs/01/end.crt src/tests/data/x509/pss_certs/01/root.crt src/tests/data/x509/pss_certs/02/README.txt src/tests/data/x509/pss_certs/02/end.crt src/tests/data/x509/pss_certs/02/root.crt src/tests/data/x509/pss_certs/03/end.crt src/tests/data/x509/pss_certs/03/root.crt src/tests/data/x509/pss_certs/04/end.crt src/tests/data/x509/pss_certs/04/root.crt src/tests/data/x509/pss_certs/05/end.crt src/tests/data/x509/pss_certs/05/root.crt src/tests/data/x509/pss_certs/06/end.crt src/tests/data/x509/pss_certs/06/root.crt src/tests/data/x509/pss_certs/07/end.crt src/tests/data/x509/pss_certs/07/root.crt src/tests/data/x509/pss_certs/08/end.crt src/tests/data/x509/pss_certs/08/root.crt src/tests/data/x509/pss_certs/09/end.crt src/tests/data/x509/pss_certs/09/root.crt src/tests/data/x509/pss_certs/10/end.crt src/tests/data/x509/pss_certs/10/root.crt src/tests/data/x509/pss_certs/100/end.crt src/tests/data/x509/pss_certs/100/root.crt src/tests/data/x509/pss_certs/101/end.crt src/tests/data/x509/pss_certs/101/root.crt src/tests/data/x509/pss_certs/102/end.crt src/tests/data/x509/pss_certs/102/root.crt src/tests/data/x509/pss_certs/103/end.crt src/tests/data/x509/pss_certs/103/root.crt src/tests/data/x509/pss_certs/104/end.crt src/tests/data/x509/pss_certs/104/root.crt src/tests/data/x509/pss_certs/105/end.crt src/tests/data/x509/pss_certs/105/root.crt src/tests/data/x509/pss_certs/106/end.crt src/tests/data/x509/pss_certs/106/root.crt src/tests/data/x509/pss_certs/107/end.crt src/tests/data/x509/pss_certs/108/crl-rsa-pss-sha1.crl src/tests/data/x509/pss_certs/108/end.crt src/tests/data/x509/pss_certs/108/root.crt src/tests/data/x509/pss_certs/109/README.txt src/tests/data/x509/pss_certs/109/crl-rsa-pss-sha1-badsign.crl src/tests/data/x509/pss_certs/109/end.crt src/tests/data/x509/pss_certs/109/root.crt src/tests/data/x509/pss_certs/11/end.crt src/tests/data/x509/pss_certs/11/root.crt src/tests/data/x509/pss_certs/110/crl-rsa-pss-sha224.crl src/tests/data/x509/pss_certs/110/end.crt src/tests/data/x509/pss_certs/110/root.crt src/tests/data/x509/pss_certs/111/crl-rsa-pss-sha256.crl src/tests/data/x509/pss_certs/111/end.crt src/tests/data/x509/pss_certs/111/root.crt src/tests/data/x509/pss_certs/112/crl-rsa-pss-sha384.crl src/tests/data/x509/pss_certs/112/end.crt src/tests/data/x509/pss_certs/112/root.crt src/tests/data/x509/pss_certs/113/crl-rsa-pss-sha512.crl src/tests/data/x509/pss_certs/113/end.crt src/tests/data/x509/pss_certs/113/root.crt src/tests/data/x509/pss_certs/114/server9.req.sha1.csr src/tests/data/x509/pss_certs/115/server9.req.sha224.csr src/tests/data/x509/pss_certs/116/server9.req.sha256.csr src/tests/data/x509/pss_certs/117/server9.req.sha384.csr src/tests/data/x509/pss_certs/118/server9.req.sha512.csr src/tests/data/x509/pss_certs/12/end.crt src/tests/data/x509/pss_certs/12/root.crt src/tests/data/x509/pss_certs/13/end.crt src/tests/data/x509/pss_certs/13/root.crt src/tests/data/x509/pss_certs/14/end.crt src/tests/data/x509/pss_certs/14/root.crt src/tests/data/x509/pss_certs/15/end.crt src/tests/data/x509/pss_certs/15/root.crt src/tests/data/x509/pss_certs/16/end.crt src/tests/data/x509/pss_certs/16/root.crt src/tests/data/x509/pss_certs/17/end.crt src/tests/data/x509/pss_certs/17/root.crt src/tests/data/x509/pss_certs/18/end.crt src/tests/data/x509/pss_certs/18/root.crt src/tests/data/x509/pss_certs/19/end.crt src/tests/data/x509/pss_certs/19/root.crt src/tests/data/x509/pss_certs/20/end.crt src/tests/data/x509/pss_certs/20/root.crt src/tests/data/x509/pss_certs/21/end.crt src/tests/data/x509/pss_certs/21/root.crt src/tests/data/x509/pss_certs/22/end.crt src/tests/data/x509/pss_certs/22/root.crt src/tests/data/x509/pss_certs/23/end.crt src/tests/data/x509/pss_certs/23/root.crt src/tests/data/x509/pss_certs/24/end.crt src/tests/data/x509/pss_certs/24/root.crt src/tests/data/x509/pss_certs/25/end.crt src/tests/data/x509/pss_certs/25/root.crt src/tests/data/x509/pss_certs/26/end.crt src/tests/data/x509/pss_certs/26/root.crt src/tests/data/x509/pss_certs/27/end.crt src/tests/data/x509/pss_certs/27/root.crt src/tests/data/x509/pss_certs/28/end.crt src/tests/data/x509/pss_certs/28/root.crt src/tests/data/x509/pss_certs/29/end.crt src/tests/data/x509/pss_certs/29/root.crt src/tests/data/x509/pss_certs/30/end.crt src/tests/data/x509/pss_certs/30/root.crt src/tests/data/x509/pss_certs/31/end.crt src/tests/data/x509/pss_certs/31/root.crt src/tests/data/x509/pss_certs/32/end.crt src/tests/data/x509/pss_certs/32/root.crt src/tests/data/x509/pss_certs/33/end.crt src/tests/data/x509/pss_certs/33/root.crt src/tests/data/x509/pss_certs/34/end.crt src/tests/data/x509/pss_certs/34/root.crt src/tests/data/x509/pss_certs/35/end.crt src/tests/data/x509/pss_certs/35/root.crt src/tests/data/x509/pss_certs/36/end.crt src/tests/data/x509/pss_certs/36/root.crt src/tests/data/x509/pss_certs/37/end.crt src/tests/data/x509/pss_certs/37/root.crt src/tests/data/x509/pss_certs/38/end.crt src/tests/data/x509/pss_certs/38/root.crt src/tests/data/x509/pss_certs/39/end.crt src/tests/data/x509/pss_certs/39/root.crt src/tests/data/x509/pss_certs/40/end.crt src/tests/data/x509/pss_certs/40/root.crt src/tests/data/x509/pss_certs/41/end.crt src/tests/data/x509/pss_certs/41/root.crt src/tests/data/x509/pss_certs/42/end.crt src/tests/data/x509/pss_certs/42/root.crt src/tests/data/x509/pss_certs/43/end.crt src/tests/data/x509/pss_certs/43/root.crt src/tests/data/x509/pss_certs/44/end.crt src/tests/data/x509/pss_certs/44/root.crt src/tests/data/x509/pss_certs/45/end.crt src/tests/data/x509/pss_certs/45/root.crt src/tests/data/x509/pss_certs/46/end.crt src/tests/data/x509/pss_certs/46/root.crt src/tests/data/x509/pss_certs/47/end.crt src/tests/data/x509/pss_certs/47/root.crt src/tests/data/x509/pss_certs/48/end.crt src/tests/data/x509/pss_certs/48/root.crt src/tests/data/x509/pss_certs/49/end.crt src/tests/data/x509/pss_certs/49/root.crt src/tests/data/x509/pss_certs/50/end.crt src/tests/data/x509/pss_certs/50/root.crt src/tests/data/x509/pss_certs/51/end.crt src/tests/data/x509/pss_certs/51/root.crt src/tests/data/x509/pss_certs/52/end.crt src/tests/data/x509/pss_certs/52/root.crt src/tests/data/x509/pss_certs/53/end.crt src/tests/data/x509/pss_certs/53/root.crt src/tests/data/x509/pss_certs/54/end.crt src/tests/data/x509/pss_certs/54/root.crt src/tests/data/x509/pss_certs/55/end.crt src/tests/data/x509/pss_certs/55/root.crt src/tests/data/x509/pss_certs/56/end.crt src/tests/data/x509/pss_certs/56/root.crt src/tests/data/x509/pss_certs/57/end.crt src/tests/data/x509/pss_certs/57/root.crt src/tests/data/x509/pss_certs/58/end.crt src/tests/data/x509/pss_certs/58/root.crt src/tests/data/x509/pss_certs/59/end.crt src/tests/data/x509/pss_certs/59/root.crt src/tests/data/x509/pss_certs/60/end.crt src/tests/data/x509/pss_certs/60/root.crt src/tests/data/x509/pss_certs/61/end.crt src/tests/data/x509/pss_certs/61/root.crt src/tests/data/x509/pss_certs/62/end.crt src/tests/data/x509/pss_certs/62/root.crt src/tests/data/x509/pss_certs/63/end.crt src/tests/data/x509/pss_certs/63/root.crt src/tests/data/x509/pss_certs/64/end.crt src/tests/data/x509/pss_certs/64/root.crt src/tests/data/x509/pss_certs/65/end.crt src/tests/data/x509/pss_certs/65/root.crt src/tests/data/x509/pss_certs/66/end.crt src/tests/data/x509/pss_certs/66/root.crt src/tests/data/x509/pss_certs/67/end.crt src/tests/data/x509/pss_certs/67/root.crt src/tests/data/x509/pss_certs/68/end.crt src/tests/data/x509/pss_certs/68/root.crt src/tests/data/x509/pss_certs/69/end.crt src/tests/data/x509/pss_certs/69/root.crt src/tests/data/x509/pss_certs/70/end.crt src/tests/data/x509/pss_certs/70/root.crt src/tests/data/x509/pss_certs/71/end.crt src/tests/data/x509/pss_certs/71/root.crt src/tests/data/x509/pss_certs/72/end.crt src/tests/data/x509/pss_certs/72/root.crt src/tests/data/x509/pss_certs/73/end.crt src/tests/data/x509/pss_certs/73/root.crt src/tests/data/x509/pss_certs/74/end.crt src/tests/data/x509/pss_certs/74/root.crt src/tests/data/x509/pss_certs/75/end.crt src/tests/data/x509/pss_certs/75/root.crt src/tests/data/x509/pss_certs/76/end.crt src/tests/data/x509/pss_certs/76/root.crt src/tests/data/x509/pss_certs/77/end.crt src/tests/data/x509/pss_certs/77/root.crt src/tests/data/x509/pss_certs/78/end.crt src/tests/data/x509/pss_certs/78/root.crt src/tests/data/x509/pss_certs/79/end.crt src/tests/data/x509/pss_certs/79/root.crt src/tests/data/x509/pss_certs/80/end.crt src/tests/data/x509/pss_certs/80/root.crt src/tests/data/x509/pss_certs/81/end.crt src/tests/data/x509/pss_certs/81/root.crt src/tests/data/x509/pss_certs/82/end.crt src/tests/data/x509/pss_certs/83/end.crt src/tests/data/x509/pss_certs/84/end.crt src/tests/data/x509/pss_certs/85/end.crt src/tests/data/x509/pss_certs/86/end.crt src/tests/data/x509/pss_certs/87/end.crt src/tests/data/x509/pss_certs/88/end.crt src/tests/data/x509/pss_certs/89/end.crt src/tests/data/x509/pss_certs/90/end.crt src/tests/data/x509/pss_certs/91/end.crt src/tests/data/x509/pss_certs/92/end.crt src/tests/data/x509/pss_certs/93/end.crt src/tests/data/x509/pss_certs/94/end.crt src/tests/data/x509/pss_certs/95/end.crt src/tests/data/x509/pss_certs/96/end.crt src/tests/data/x509/pss_certs/97/README.txt src/tests/data/x509/pss_certs/97/end.crt src/tests/data/x509/pss_certs/97/root.crt src/tests/data/x509/pss_certs/98/README.txt src/tests/data/x509/pss_certs/98/end.crt src/tests/data/x509/pss_certs/98/root.crt src/tests/data/x509/pss_certs/99/README.txt src/tests/data/x509/pss_certs/99/end.crt src/tests/data/x509/pss_certs/99/root.crt src/tests/data/x509/pss_certs/Sources.txt src/tests/data/x509/pss_certs/expected.txt src/tests/data/x509/pss_certs/validation_times.txt src/tests/data/x509/v2-in-v1/int.pem src/tests/data/x509/v2-in-v1/leaf.pem src/tests/data/x509/v2-in-v1/root.pem src/tests/data/x509/x509test/InvalidExtendedKeyUsage.pem src/tests/data/x509/x509test/InvalidIntCAFlag.pem src/tests/data/x509/x509test/InvalidIntCAKeyUsage.pem src/tests/data/x509/x509test/InvalidIntCALen.pem src/tests/data/x509/x509test/InvalidIntCALoop.pem src/tests/data/x509/x509test/InvalidIntCASelfSign.pem src/tests/data/x509/x509test/InvalidIntCAVersionOne.pem src/tests/data/x509/x509test/InvalidIntCAVersionTwo.pem src/tests/data/x509/x509test/InvalidKeyUsage.pem src/tests/data/x509/x509test/InvalidName.pem src/tests/data/x509/x509test/InvalidNameAltName.pem src/tests/data/x509/x509test/InvalidNameAltNameWithSubj.pem src/tests/data/x509/x509test/InvalidNameConstraintExclude.pem src/tests/data/x509/x509test/InvalidNameConstraintPermit.pem src/tests/data/x509/x509test/InvalidNameConstraintPermitRight.pem src/tests/data/x509/x509test/InvalidNameConstraintPermitThenExclude.pem src/tests/data/x509/x509test/InvalidNotAfter.pem src/tests/data/x509/x509test/InvalidNotAfterChained.pem src/tests/data/x509/x509test/InvalidNotBefore.pem src/tests/data/x509/x509test/InvalidNotBeforeChained.pem src/tests/data/x509/x509test/InvalidSelfSign.pem src/tests/data/x509/x509test/InvalidWildcardAll.pem src/tests/data/x509/x509test/InvalidWildcardAllAltName.pem src/tests/data/x509/x509test/InvalidWildcardLeft.pem src/tests/data/x509/x509test/InvalidWildcardLeftAltName.pem src/tests/data/x509/x509test/InvalidWildcardMid.pem src/tests/data/x509/x509test/InvalidWildcardMidAltName.pem src/tests/data/x509/x509test/InvalidWildcardMidMixed.pem src/tests/data/x509/x509test/InvalidWildcardMidMixedAltName.pem src/tests/data/x509/x509test/InvalidWildcardSingle.pem src/tests/data/x509/x509test/InvalidWildcardSingleAltName.pem src/tests/data/x509/x509test/MissingIntCABasicConstraintWithCertSign.pem src/tests/data/x509/x509test/MissingIntCAExtensions.pem src/tests/data/x509/x509test/ValidAltName.pem src/tests/data/x509/x509test/ValidCert.pem src/tests/data/x509/x509test/ValidChained.pem src/tests/data/x509/x509test/ValidIntCALen.pem src/tests/data/x509/x509test/ValidNameConstraint.pem src/tests/data/x509/x509test/ValidWildcard.pem src/tests/data/x509/x509test/expected.txt src/tests/data/x509/x509test/root.pem src/tests/data/x509/xmss/xmss_bouncycastle_sha256_10_root.pem src/tests/data/x509/xmss/xmss_isara_root.pem src/tests/data/x509_dn.vec src/tests/main.cpp src/tests/test_aead.cpp src/tests/test_asn1.cpp src/tests/test_bigint.cpp src/tests/test_block.cpp src/tests/test_blowfish.cpp src/tests/test_c25519.cpp src/tests/test_certstor.cpp src/tests/test_certstor_flatfile.cpp src/tests/test_certstor_system.cpp src/tests/test_certstor_utils.cpp src/tests/test_certstor_utils.h src/tests/test_clang_bug.cpp src/tests/test_compression.cpp src/tests/test_cryptobox.cpp src/tests/test_datastore.cpp src/tests/test_dh.cpp src/tests/test_dl_group.cpp src/tests/test_dlies.cpp src/tests/test_dsa.cpp src/tests/test_ecc_pointmul.cpp src/tests/test_ecdh.cpp src/tests/test_ecdsa.cpp src/tests/test_ecgdsa.cpp src/tests/test_ecies.cpp src/tests/test_eckcdsa.cpp src/tests/test_ed25519.cpp src/tests/test_elgamal.cpp src/tests/test_entropy.cpp src/tests/test_ffi.cpp src/tests/test_filters.cpp src/tests/test_fpe.cpp src/tests/test_gf2m.cpp src/tests/test_gost_3410.cpp src/tests/test_hash.cpp src/tests/test_hash_id.cpp src/tests/test_kdf.cpp src/tests/test_keywrap.cpp src/tests/test_mac.cpp src/tests/test_mceliece.cpp src/tests/test_modes.cpp src/tests/test_mp.cpp src/tests/test_name_constraint.cpp src/tests/test_newhope.cpp src/tests/test_ocb.cpp src/tests/test_ocsp.cpp src/tests/test_octetstring.cpp src/tests/test_oid.cpp src/tests/test_os_utils.cpp src/tests/test_otp.cpp src/tests/test_package_transform.cpp src/tests/test_pad.cpp src/tests/test_passhash.cpp src/tests/test_pbkdf.cpp src/tests/test_pem.cpp src/tests/test_pk_pad.cpp src/tests/test_pkcs11.h src/tests/test_pkcs11_high_level.cpp src/tests/test_pkcs11_low_level.cpp src/tests/test_psk_db.cpp src/tests/test_pubkey.cpp src/tests/test_pubkey.h src/tests/test_rfc6979.cpp src/tests/test_rng.cpp src/tests/test_rng.h src/tests/test_rng_kat.cpp src/tests/test_roughtime.cpp src/tests/test_rsa.cpp src/tests/test_runner.cpp src/tests/test_runner.h src/tests/test_simd.cpp src/tests/test_siv.cpp src/tests/test_sm2.cpp src/tests/test_sodium.cpp src/tests/test_srp6.cpp src/tests/test_stream.cpp src/tests/test_tests.cpp src/tests/test_thread_utils.cpp src/tests/test_tls.cpp src/tests/test_tls_messages.cpp src/tests/test_tls_stream_integration.cpp src/tests/test_tpm.cpp src/tests/test_tss.cpp src/tests/test_uri.cpp src/tests/test_utils.cpp src/tests/test_workfactor.cpp src/tests/test_x509_dn.cpp src/tests/test_x509_path.cpp src/tests/test_xmss.cpp src/tests/tests.cpp src/tests/tests.h src/tests/unit_asio_stream.cpp src/tests/unit_ecc.cpp src/tests/unit_ecdh.cpp src/tests/unit_ecdsa.cpp src/tests/unit_tls.cpp src/tests/unit_tls_policy.cpp src/tests/unit_x509.cpp <<<<<< network # path=/home/runner/work/botan/botan/build#include#botan#gcm.h.gcov -: 0:Source:build/include/botan/gcm.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/modes_aead_gcm.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/modes_aead_gcm.gcda -: 0:Runs:2947 -: 1:/* -: 2:* GCM Mode -: 3:* (C) 2013 Jack Lloyd -: 4:* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#ifndef BOTAN_AEAD_GCM_H_ -: 10:#define BOTAN_AEAD_GCM_H_ -: 11: -: 12:#include -: 13:#include -: 14: -: 15:BOTAN_FUTURE_INTERNAL_HEADER(gcm.h) -: 16: -: 17:namespace Botan { -: 18: -: 19:class BlockCipher; -: 20:class StreamCipher; -: 21:class GHASH; -: 22: -: 23:/** -: 24:* GCM Mode -: 25:*/ -: 26:class BOTAN_PUBLIC_API(2,0) GCM_Mode : public AEAD_Mode -: 27: { -: 28: public: -: 29: void set_associated_data(const uint8_t ad[], size_t ad_len) override; -: 30: -: 31: std::string name() const override; -: 32: -: 33: size_t update_granularity() const override; -: 34: -: 35: Key_Length_Specification key_spec() const override; -: 36: -: 37: bool valid_nonce_length(size_t len) const override; -: 38: function _ZNK5Botan8GCM_Mode8tag_sizeEv called 25064 returned 100% blocks executed 100% 25064: 39: size_t tag_size() const override { return m_tag_size; } -: 40: -: 41: void clear() override; -: 42: -: 43: void reset() override; -: 44: -: 45: std::string provider() const override; -: 46: protected: -: 47: GCM_Mode(BlockCipher* cipher, size_t tag_size); -: 48: -: 49: ~GCM_Mode(); -: 50: -: 51: static const size_t GCM_BS = 16; -: 52: -: 53: const size_t m_tag_size; -: 54: const std::string m_cipher_name; -: 55: -: 56: std::unique_ptr m_ctr; -: 57: std::unique_ptr m_ghash; -: 58: private: -: 59: void start_msg(const uint8_t nonce[], size_t nonce_len) override; -: 60: -: 61: void key_schedule(const uint8_t key[], size_t length) override; -: 62: -: 63: secure_vector m_y0; -: 64: }; -: 65: -: 66:/** -: 67:* GCM Encryption -: 68:*/ -: 69:class BOTAN_PUBLIC_API(2,0) GCM_Encryption final : public GCM_Mode -: 70: { -: 71: public: -: 72: /** -: 73: * @param cipher the 128 bit block cipher to use -: 74: * @param tag_size is how big the auth tag will be -: 75: */ -: 76: GCM_Encryption(BlockCipher* cipher, size_t tag_size = 16) : -: 77: GCM_Mode(cipher, tag_size) {} -: 78: function _ZNK5Botan14GCM_Encryption13output_lengthEm called 1404 returned 100% blocks executed 100% 1404: 79: size_t output_length(size_t input_length) const override 1404: 80: { return input_length + tag_size(); } -: 81: function _ZNK5Botan14GCM_Encryption18minimum_final_sizeEv called 379 returned 100% blocks executed 100% 379: 82: size_t minimum_final_size() const override { return 0; } -: 83: -: 84: size_t process(uint8_t buf[], size_t size) override; -: 85: -: 86: void finish(secure_vector& final_block, size_t offset = 0) override; -: 87: }; -: 88: -: 89:/** -: 90:* GCM Decryption -: 91:*/ -: 92:class BOTAN_PUBLIC_API(2,0) GCM_Decryption final : public GCM_Mode -: 93: { -: 94: public: -: 95: /** -: 96: * @param cipher the 128 bit block cipher to use -: 97: * @param tag_size is how big the auth tag will be -: 98: */ -: 99: GCM_Decryption(BlockCipher* cipher, size_t tag_size = 16) : -: 100: GCM_Mode(cipher, tag_size) {} -: 101: function _ZNK5Botan14GCM_Decryption13output_lengthEm called 1589 returned 100% blocks executed 67% 1589: 102: size_t output_length(size_t input_length) const override -: 103: { 1589*: 104: BOTAN_ASSERT(input_length >= tag_size(), "Sufficient input"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 1589: 105: return input_length - tag_size(); -: 106: } -: 107: function _ZNK5Botan14GCM_Decryption18minimum_final_sizeEv called 1789 returned 100% blocks executed 100% 1789: 108: size_t minimum_final_size() const override { return tag_size(); } -: 109: -: 110: size_t process(uint8_t buf[], size_t size) override; -: 111: -: 112: void finish(secure_vector& final_block, size_t offset = 0) override; -: 113: }; -: 114: -: 115:} -: 116: -: 117:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#compression#zlib#zlib.cpp.gcov -: 0:Source:src/lib/compression/zlib/zlib.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/compression_zlib.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/compression_zlib.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Zlib Compressor -: 3:* (C) 2001 Peter J Jones -: 4:* 2001-2007,2014 Jack Lloyd -: 5:* 2006 Matt Johnston -: 6:* -: 7:* Botan is released under the Simplified BSD License (see license.txt) -: 8:*/ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14: -: 15:namespace Botan { -: 16: -: 17:namespace { -: 18: 63*: 19:class Zlib_Stream : public Zlib_Style_Stream -: 20: { -: 21: public: 145: 22: Zlib_Stream() 145: 23: { 145: 24: streamp()->opaque = alloc(); branch 0 taken 32% (fallthrough) branch 1 taken 68% branch 2 taken 24% (fallthrough) branch 3 taken 76% 145: 25: streamp()->zalloc = Compression_Alloc_Info::malloc; 145: 26: streamp()->zfree = Compression_Alloc_Info::free; -: 27: } -: 28: function _ZNK5Botan12_GLOBAL__N_111Zlib_Stream8run_flagEv called 229 returned 100% blocks executed 100% 229: 29: uint32_t run_flag() const override { return Z_NO_FLUSH; } function _ZNK5Botan12_GLOBAL__N_111Zlib_Stream10flush_flagEv called 30 returned 100% blocks executed 100% 30: 30: uint32_t flush_flag() const override { return Z_SYNC_FLUSH; } function _ZNK5Botan12_GLOBAL__N_111Zlib_Stream11finish_flagEv called 83 returned 100% blocks executed 100% 83: 31: uint32_t finish_flag() const override { return Z_FINISH; } -: 32: 145: 33: int compute_window_bits(int wbits, int wbits_offset) const -: 34: { 145: 35: if(wbits_offset == -1) 40: 36: return -wbits; -: 37: else 105: 38: return wbits + wbits_offset; -: 39: } -: 40: }; -: 41: -: 42:class Zlib_Compression_Stream : public Zlib_Stream -: 43: { -: 44: public: function _ZN5Botan12_GLOBAL__N_123Zlib_Compression_StreamC2Emii called 83 returned 100% blocks executed 65% 83: 45: Zlib_Compression_Stream(size_t level, int wbits, int wbits_offset = 0) 83: 46: { call 0 returned 100% call 1 never executed 83: 47: wbits = compute_window_bits(wbits, wbits_offset); branch 0 taken 24% (fallthrough) branch 1 taken 76% -: 48: 83: 49: if(level >= 9) branch 0 taken 43% (fallthrough) branch 1 taken 57% -: 50: level = 9; 36: 51: else if(level == 0) branch 0 taken 14% (fallthrough) branch 1 taken 86% 5: 52: level = 6; -: 53: 83: 54: int rc = ::deflateInit2(streamp(), level, Z_DEFLATED, wbits, 8, Z_DEFAULT_STRATEGY); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 55: 83: 56: if(rc != Z_OK) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 57: throw Compression_Error("deflateInit2", ErrorType::ZlibError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 83: 58: } -: 59: 42*: 60: ~Zlib_Compression_Stream() 42*: 61: { call 0 never executed 42*: 62: ::deflateEnd(streamp()); 42*: 63: } ------------------ _ZN5Botan12_GLOBAL__N_123Zlib_Compression_StreamD0Ev: function _ZN5Botan12_GLOBAL__N_123Zlib_Compression_StreamD0Ev called 42 returned 100% blocks executed 100% 42: 60: ~Zlib_Compression_Stream() 42: 61: { call 0 returned 100% 42: 62: ::deflateEnd(streamp()); call 0 returned 100% 42: 63: } call 0 returned 100% ------------------ _ZN5Botan12_GLOBAL__N_123Zlib_Compression_StreamD2Ev: function _ZN5Botan12_GLOBAL__N_123Zlib_Compression_StreamD2Ev called 0 returned 0% blocks executed 0% #####: 60: ~Zlib_Compression_Stream() #####: 61: { call 0 never executed #####: 62: ::deflateEnd(streamp()); call 0 never executed #####: 63: } ------------------ -: 64: function _ZN5Botan12_GLOBAL__N_123Zlib_Compression_Stream3runEj called 209 returned 100% blocks executed 50% 209: 65: bool run(uint32_t flags) override -: 66: { 209: 67: int rc = ::deflate(streamp(), flags); call 0 returned 100% -: 68: 209: 69: if(rc != Z_OK && rc != Z_STREAM_END && rc != Z_BUF_ERROR) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 70: throw Compression_Error("zlib deflate", ErrorType::ZlibError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 71: 209: 72: return (rc == Z_STREAM_END); -: 73: } -: 74: }; -: 75: -: 76:class Zlib_Decompression_Stream : public Zlib_Stream -: 77: { -: 78: public: function _ZN5Botan12_GLOBAL__N_125Zlib_Decompression_StreamC2Eii called 62 returned 100% blocks executed 57% 62: 79: Zlib_Decompression_Stream(int wbits, int wbits_offset = 0) 62: 80: { call 0 returned 100% call 1 never executed 124: 81: int rc = ::inflateInit2(streamp(), compute_window_bits(wbits, wbits_offset)); branch 0 taken 32% (fallthrough) branch 1 taken 68% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 82: 62: 83: if(rc != Z_OK) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 84: throw Compression_Error("inflateInit2", ErrorType::ZlibError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 62: 85: } -: 86: 21*: 87: ~Zlib_Decompression_Stream() 21*: 88: { 21*: 89: ::inflateEnd(streamp()); 21*: 90: } ------------------ _ZN5Botan12_GLOBAL__N_125Zlib_Decompression_StreamD0Ev: function _ZN5Botan12_GLOBAL__N_125Zlib_Decompression_StreamD0Ev called 21 returned 100% blocks executed 100% 21: 87: ~Zlib_Decompression_Stream() 21: 88: { call 0 returned 100% 21: 89: ::inflateEnd(streamp()); call 0 returned 100% 21: 90: } call 0 returned 100% ------------------ _ZN5Botan12_GLOBAL__N_125Zlib_Decompression_StreamD2Ev: function _ZN5Botan12_GLOBAL__N_125Zlib_Decompression_StreamD2Ev called 0 returned 0% blocks executed 0% #####: 87: ~Zlib_Decompression_Stream() #####: 88: { call 0 never executed #####: 89: ::inflateEnd(streamp()); call 0 never executed #####: 90: } ------------------ -: 91: function _ZN5Botan12_GLOBAL__N_125Zlib_Decompression_Stream3runEj called 136 returned 100% blocks executed 50% 136: 92: bool run(uint32_t flags) override -: 93: { 136: 94: int rc = ::inflate(streamp(), flags); call 0 returned 100% -: 95: 136: 96: if(rc != Z_OK && rc != Z_STREAM_END && rc != Z_BUF_ERROR) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 97: throw Compression_Error("zlib inflate", ErrorType::ZlibError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 98: 136: 99: return (rc == Z_STREAM_END); -: 100: } -: 101: }; -: 102: -: 103:class Deflate_Compression_Stream final : public Zlib_Compression_Stream -: 104: { -: 105: public: 20: 106: Deflate_Compression_Stream(size_t level, int wbits) : 40: 107: Zlib_Compression_Stream(level, wbits, -1) {} -: 108: }; -: 109: -: 110:class Deflate_Decompression_Stream final : public Zlib_Decompression_Stream -: 111: { -: 112: public: 40: 113: explicit Deflate_Decompression_Stream(int wbits) : Zlib_Decompression_Stream(wbits, -1) {} -: 114: }; -: 115: -: 116:class Gzip_Compression_Stream final : public Zlib_Compression_Stream -: 117: { -: 118: public: function _ZN5Botan12_GLOBAL__N_123Gzip_Compression_StreamC2Emihm called 21 returned 100% blocks executed 42% 21: 119: Gzip_Compression_Stream(size_t level, int wbits, uint8_t os_code, uint64_t hdr_time) : 21: 120: Zlib_Compression_Stream(level, wbits, 16) call 0 returned 100% call 1 never executed -: 121: { 21: 122: clear_mem(&m_header, 1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 21: 123: m_header.os = os_code; 21: 124: m_header.time = static_cast(hdr_time); -: 125: 21: 126: int rc = deflateSetHeader(streamp(), &m_header); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 21: 127: if(rc != Z_OK) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 128: throw Compression_Error("deflateSetHeader", ErrorType::ZlibError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 21: 129: } -: 130: -: 131: private: -: 132: ::gz_header m_header; -: 133: }; -: 134: -: 135:class Gzip_Decompression_Stream final : public Zlib_Decompression_Stream -: 136: { -: 137: public: 42: 138: explicit Gzip_Decompression_Stream(int wbits) : Zlib_Decompression_Stream(wbits, 16) {} -: 139: }; -: 140: -: 141:} -: 142: function _ZNK5Botan16Zlib_Compression11make_streamEm called 42 returned 100% blocks executed 80% 42: 143:Compression_Stream* Zlib_Compression::make_stream(size_t level) const -: 144: { 42: 145: return new Zlib_Compression_Stream(level, 15); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 146: } -: 147: function _ZNK5Botan18Zlib_Decompression11make_streamEv called 21 returned 100% blocks executed 80% 21: 148:Compression_Stream* Zlib_Decompression::make_stream() const -: 149: { 21: 150: return new Zlib_Decompression_Stream(15); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 151: } -: 152: function _ZNK5Botan19Deflate_Compression11make_streamEm called 20 returned 100% blocks executed 80% 20: 153:Compression_Stream* Deflate_Compression::make_stream(size_t level) const -: 154: { 20: 155: return new Deflate_Compression_Stream(level, 15); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 156: } -: 157: function _ZNK5Botan21Deflate_Decompression11make_streamEv called 20 returned 100% blocks executed 80% 20: 158:Compression_Stream* Deflate_Decompression::make_stream() const -: 159: { 20: 160: return new Deflate_Decompression_Stream(15); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 161: } -: 162: function _ZNK5Botan16Gzip_Compression11make_streamEm called 21 returned 100% blocks executed 80% 21: 163:Compression_Stream* Gzip_Compression::make_stream(size_t level) const -: 164: { 21: 165: return new Gzip_Compression_Stream(level, 15, m_os_code, m_hdr_time); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 166: } -: 167: function _ZNK5Botan18Gzip_Decompression11make_streamEv called 21 returned 100% blocks executed 80% 21: 168:Compression_Stream* Gzip_Decompression::make_stream() const -: 169: { 21: 170: return new Gzip_Decompression_Stream(15); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 171: } -: 172: -: 173:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#cli#entropy.cpp.gcov -: 0:Source:src/cli/entropy.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/entropy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/entropy.gcda -: 0:Runs:710 -: 1:/* -: 2:* (C) 2019 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "cli.h" -: 8:#include "../tests/test_rng.h" // FIXME -: 9: -: 10:#include -: 11: -: 12:#if defined(BOTAN_HAS_COMPRESSION) -: 13:#include -: 14:#endif -: 15: -: 16:namespace Botan_CLI { -: 17: -: 18:class Entropy final : public Command -: 19: { -: 20: public: function _ZN9Botan_CLI7EntropyC2Ev called 2 returned 100% blocks executed 64% 4: 21: Entropy() : Command("entropy --truncate-at=128 source") {} call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 22: function _ZNK9Botan_CLI7Entropy5groupB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 23: std::string group() const override -: 24: { 1: 25: return "misc"; call 0 returned 100% -: 26: } -: 27: function _ZNK9Botan_CLI7Entropy11descriptionB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 28: std::string description() const override -: 29: { 1: 30: return "Sample a raw entropy source"; call 0 returned 100% -: 31: } -: 32: function _ZN9Botan_CLI7Entropy2goEv called 1 returned 100% blocks executed 56% 1: 33: void go() override -: 34: { 1: 35: const std::string req_source = get_arg("source"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed 1: 36: const size_t truncate_sample = get_arg_sz("truncate-at"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 37: 1: 38: auto& entropy_sources = Botan::Entropy_Sources::global_sources(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 39: 2: 40: std::vector sources; call 0 returned 100% call 1 returned 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% call 4 never executed 1: 41: if(req_source == "all") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% 2: 42: sources = entropy_sources.enabled_sources(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 43: else #####: 44: sources.push_back(req_source); call 0 never executed branch 1 never executed branch 2 never executed -: 45: 7: 46: for(std::string source : sources) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 47: { 11: 48: Botan_Tests::SeedCapturing_RNG rng; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 6: 49: const size_t entropy_estimate = entropy_sources.poll_just(rng, source); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 50: 6: 51: if(rng.samples() == 0) branch 0 taken 17% (fallthrough) branch 1 taken 83% -: 52: { 1: 53: output() << "Source " << source << " is unavailable\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) 1: 54: continue; branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 55: } -: 56: 5: 57: const auto& sample = rng.seed_material(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 58: 5: 59: output() << "Polling " << source << " gathered " << sample.size() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) 5: 60: << " bytes in " << rng.samples() << " outputs with estimated entropy " call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) 5: 61: << entropy_estimate << "\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 62: -: 63:#if defined(BOTAN_HAS_COMPRESSION) 5: 64: if(!sample.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 65: { 5: 66: std::unique_ptr comp(Botan::make_compressor("zlib")); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% 5: 67: if(comp) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 68: { 5: 69: try -: 70: { 10: 71: Botan::secure_vector compressed; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 72: compressed.assign(sample.begin(), sample.end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 73: comp->start(9); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 74: comp->finish(compressed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 75: 5: 76: if(compressed.size() < sample.size()) branch 0 taken 20% (fallthrough) branch 1 taken 80% -: 77: { 1: 78: output() << "Sample from " << source << " was zlib compressed from " << sample.size() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) 1: 79: << " bytes to " << compressed.size() << " bytes\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 80: } -: 81: } =====: 82: catch(std::exception& e) call 0 never executed call 1 never executed call 2 never executed -: 83: { =====: 84: error_output() << "Error while attempting to compress: " << e.what() << "\n"; call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed branch 8 never executed branch 9 never executed call 10 never executed branch 11 never executed branch 12 never executed -: 85: } -: 86: } -: 87: } -: 88:#endif -: 89: 5: 90: if(sample.size() <= truncate_sample) branch 0 taken 40% (fallthrough) branch 1 taken 60% -: 91: { 4: 92: output() << Botan::hex_encode(sample) << "\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) -: 93: } 3: 94: else if(truncate_sample > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 95: { 9: 96: output() << Botan::hex_encode(&sample[0], truncate_sample) << "...\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 never executed branch 10 never executed -: 97: } -: 98: } 1: 99: } -: 100: }; -: 101: function _ZNK9Botan_CLIUlvE_clEv.isra.0 called 2 returned 100% blocks executed 83% 2: 102:BOTAN_REGISTER_COMMAND("entropy", Entropy); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 103: -: 104:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#rng.h.gcov -: 0:Source:build/include/botan/rng.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pk_pad_iso9796.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pk_pad_iso9796.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Random Number Generator base classes -: 3:* (C) 1999-2009,2015,2016 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_RANDOM_NUMBER_GENERATOR_H_ -: 9:#define BOTAN_RANDOM_NUMBER_GENERATOR_H_ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17: -: 18:namespace Botan { -: 19: -: 20:class Entropy_Sources; -: 21: -: 22:/** -: 23:* An interface to a cryptographic random number generator -: 24:*/ -: 25:class BOTAN_PUBLIC_API(2,0) RandomNumberGenerator -: 26: { -: 27: public: -: 28: virtual ~RandomNumberGenerator() = default; -: 29: -: 30: RandomNumberGenerator() = default; -: 31: -: 32: /* -: 33: * Never copy a RNG, create a new one -: 34: */ -: 35: RandomNumberGenerator(const RandomNumberGenerator& rng) = delete; -: 36: RandomNumberGenerator& operator=(const RandomNumberGenerator& rng) = delete; -: 37: -: 38: /** -: 39: * Randomize a byte array. -: 40: * @param output the byte array to hold the random output. -: 41: * @param length the length of the byte array output in bytes. -: 42: */ -: 43: virtual void randomize(uint8_t output[], size_t length) = 0; -: 44: -: 45: /** -: 46: * Returns false if it is known that this RNG object is not able to accept -: 47: * externally provided inputs (via add_entropy, randomize_with_input, etc). -: 48: * In this case, any such provided inputs are ignored. -: 49: * -: 50: * If this function returns true, then inputs may or may not be accepted. -: 51: */ -: 52: virtual bool accepts_input() const = 0; -: 53: -: 54: /** -: 55: * Incorporate some additional data into the RNG state. For -: 56: * example adding nonces or timestamps from a peer's protocol -: 57: * message can help hedge against VM state rollback attacks. -: 58: * A few RNG types do not accept any externally provided input, -: 59: * in which case this function is a no-op. -: 60: * -: 61: * @param input a byte array containg the entropy to be added -: 62: * @param length the length of the byte array in -: 63: */ -: 64: virtual void add_entropy(const uint8_t input[], size_t length) = 0; -: 65: -: 66: /** -: 67: * Incorporate some additional data into the RNG state. -: 68: */ -: 69: template void add_entropy_T(const T& t) -: 70: { -: 71: static_assert(std::is_standard_layout::value && std::is_trivial::value, "add_entropy_T data must be POD"); -: 72: this->add_entropy(reinterpret_cast(&t), sizeof(T)); -: 73: } -: 74: -: 75: /** -: 76: * Incorporate entropy into the RNG state then produce output. -: 77: * Some RNG types implement this using a single operation, default -: 78: * calls add_entropy + randomize in sequence. -: 79: * -: 80: * Use this to further bind the outputs to your current -: 81: * process/protocol state. For instance if generating a new key -: 82: * for use in a session, include a session ID or other such -: 83: * value. See NIST SP 800-90 A, B, C series for more ideas. -: 84: * -: 85: * @param output buffer to hold the random output -: 86: * @param output_len size of the output buffer in bytes -: 87: * @param input entropy buffer to incorporate -: 88: * @param input_len size of the input buffer in bytes -: 89: */ -: 90: virtual void randomize_with_input(uint8_t output[], size_t output_len, -: 91: const uint8_t input[], size_t input_len); -: 92: -: 93: /** -: 94: * This calls `randomize_with_input` using some timestamps as extra input. -: 95: * -: 96: * For a stateful RNG using non-random but potentially unique data the -: 97: * extra input can help protect against problems with fork, VM state -: 98: * rollback, or other cases where somehow an RNG state is duplicated. If -: 99: * both of the duplicated RNG states later incorporate a timestamp (and the -: 100: * timestamps don't themselves repeat), their outputs will diverge. -: 101: */ -: 102: virtual void randomize_with_ts_input(uint8_t output[], size_t output_len); -: 103: -: 104: /** -: 105: * @return the name of this RNG type -: 106: */ -: 107: virtual std::string name() const = 0; -: 108: -: 109: /** -: 110: * Clear all internally held values of this RNG -: 111: * @post is_seeded() == false -: 112: */ -: 113: virtual void clear() = 0; -: 114: -: 115: /** -: 116: * Check whether this RNG is seeded. -: 117: * @return true if this RNG was already seeded, false otherwise. -: 118: */ -: 119: virtual bool is_seeded() const = 0; -: 120: -: 121: /** -: 122: * Poll provided sources for up to poll_bits bits of entropy -: 123: * or until the timeout expires. Returns estimate of the number -: 124: * of bits collected. -: 125: */ -: 126: virtual size_t reseed(Entropy_Sources& srcs, -: 127: size_t poll_bits = BOTAN_RNG_RESEED_POLL_BITS, -: 128: std::chrono::milliseconds poll_timeout = BOTAN_RNG_RESEED_DEFAULT_TIMEOUT); -: 129: -: 130: /** -: 131: * Reseed by reading specified bits from the RNG -: 132: */ -: 133: virtual void reseed_from_rng(RandomNumberGenerator& rng, -: 134: size_t poll_bits = BOTAN_RNG_RESEED_POLL_BITS); -: 135: -: 136: // Some utility functions built on the interface above: -: 137: -: 138: /** -: 139: * Return a random vector -: 140: * @param bytes number of bytes in the result -: 141: * @return randomized vector of length bytes -: 142: */ function _ZN5Botan21RandomNumberGenerator10random_vecEm called 8 returned 100% blocks executed 50% 8: 143: secure_vector random_vec(size_t bytes) -: 144: { 8: 145: secure_vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 146: random_vec(output, bytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 147: return output; -: 148: } -: 149: -: 150: template function _ZN5Botan21RandomNumberGenerator10random_vecINS_16secure_allocatorIhEEEEvRSt6vectorIhT_Em called 8 returned 100% blocks executed 100% 8: 151: void random_vec(std::vector& v, size_t bytes) -: 152: { 8: 153: v.resize(bytes); call 0 returned 100% 8: 154: this->randomize(v.data(), v.size()); call 0 returned 100% 8: 155: } -: 156: -: 157: /** -: 158: * Return a random byte -: 159: * @return random byte -: 160: */ -: 161: uint8_t next_byte() -: 162: { -: 163: uint8_t b; -: 164: this->randomize(&b, 1); -: 165: return b; -: 166: } -: 167: -: 168: /** -: 169: * @return a random byte that is greater than zero -: 170: */ -: 171: uint8_t next_nonzero_byte() -: 172: { -: 173: uint8_t b = this->next_byte(); -: 174: while(b == 0) -: 175: b = this->next_byte(); -: 176: return b; -: 177: } -: 178: -: 179: /** -: 180: * Create a seeded and active RNG object for general application use -: 181: * Added in 1.8.0 -: 182: * Use AutoSeeded_RNG instead -: 183: */ -: 184: BOTAN_DEPRECATED("Use AutoSeeded_RNG") -: 185: static RandomNumberGenerator* make_rng(); -: 186: }; -: 187: -: 188:/** -: 189:* Convenience typedef -: 190:*/ -: 191:typedef RandomNumberGenerator RNG; -: 192: -: 193:/** -: 194:* Hardware_RNG exists to tag hardware RNG types (PKCS11_RNG, TPM_RNG, Processor_RNG) -: 195:*/ -: 196:class BOTAN_PUBLIC_API(2,0) Hardware_RNG : public RandomNumberGenerator -: 197: { -: 198: public: -: 199: virtual void clear() final override { /* no way to clear state of hardware RNG */ } -: 200: }; -: 201: -: 202:/** -: 203:* Null/stub RNG - fails if you try to use it for anything -: 204:* This is not generally useful except for in certain tests -: 205:*/ -: 206:class BOTAN_PUBLIC_API(2,0) Null_RNG final : public RandomNumberGenerator -: 207: { -: 208: public: -: 209: bool is_seeded() const override { return false; } -: 210: -: 211: bool accepts_input() const override { return false; } -: 212: -: 213: void clear() override {} -: 214: function _ZN5Botan8Null_RNG9randomizeEPhm called 0 returned 0% blocks executed 0% #####: 215: void randomize(uint8_t[], size_t) override -: 216: { #####: 217: throw PRNG_Unseeded("Null_RNG called"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 218: } -: 219: -: 220: void add_entropy(const uint8_t[], size_t) override {} -: 221: -: 222: std::string name() const override { return "Null_RNG"; } -: 223: }; -: 224: -: 225:#if defined(BOTAN_TARGET_OS_HAS_THREADS) -: 226:/** -: 227:* Wraps access to a RNG in a mutex -: 228:* Note that most of the time it's much better to use a RNG per thread -: 229:* otherwise the RNG will act as an unnecessary contention point -: 230:* -: 231:* Since 2.16.0 all Stateful_RNG instances have an internal lock, so -: 232:* this class is no longer needed. It will be removed in a future major -: 233:* release. -: 234:*/ -: 235:class BOTAN_PUBLIC_API(2,0) Serialized_RNG final : public RandomNumberGenerator -: 236: { -: 237: public: function _ZN5Botan14Serialized_RNG9randomizeEPhm called 0 returned 0% blocks executed 0% #####: 238: void randomize(uint8_t out[], size_t len) override -: 239: { #####: 240: lock_guard_type lock(m_mutex); call 0 never executed #####: 241: m_rng->randomize(out, len); call 0 never executed branch 1 never executed branch 2 never executed #####: 242: } -: 243: -: 244: bool accepts_input() const override -: 245: { -: 246: lock_guard_type lock(m_mutex); -: 247: return m_rng->accepts_input(); -: 248: } -: 249: -: 250: bool is_seeded() const override -: 251: { -: 252: lock_guard_type lock(m_mutex); -: 253: return m_rng->is_seeded(); -: 254: } -: 255: -: 256: void clear() override -: 257: { -: 258: lock_guard_type lock(m_mutex); -: 259: m_rng->clear(); -: 260: } -: 261: -: 262: std::string name() const override -: 263: { -: 264: lock_guard_type lock(m_mutex); -: 265: return m_rng->name(); -: 266: } -: 267: -: 268: size_t reseed(Entropy_Sources& src, -: 269: size_t poll_bits = BOTAN_RNG_RESEED_POLL_BITS, -: 270: std::chrono::milliseconds poll_timeout = BOTAN_RNG_RESEED_DEFAULT_TIMEOUT) override -: 271: { -: 272: lock_guard_type lock(m_mutex); -: 273: return m_rng->reseed(src, poll_bits, poll_timeout); -: 274: } -: 275: -: 276: void add_entropy(const uint8_t in[], size_t len) override -: 277: { -: 278: lock_guard_type lock(m_mutex); -: 279: m_rng->add_entropy(in, len); -: 280: } -: 281: -: 282: BOTAN_DEPRECATED("Use Serialized_RNG(new AutoSeeded_RNG) instead") Serialized_RNG(); -: 283: -: 284: /* -: 285: * Since 2.16.0 this is no longer needed for any RNG type. This -: 286: * class will be removed in a future major release. -: 287: */ -: 288: explicit Serialized_RNG(RandomNumberGenerator* rng) : m_rng(rng) {} -: 289: private: -: 290: mutable mutex_type m_mutex; -: 291: std::unique_ptr m_rng; -: 292: }; -: 293:#endif -: 294: -: 295:} -: 296: -: 297:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#elgamal#elgamal.cpp.gcov -: 0:Source:src/lib/pubkey/elgamal/elgamal.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcda -: 0:Runs:2947 -: 1:/* -: 2:* ElGamal -: 3:* (C) 1999-2007,2018,2019 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:/* -: 17:* ElGamal_PublicKey Constructor -: 18:*/ 2*: 19:ElGamal_PublicKey::ElGamal_PublicKey(const DL_Group& group, const BigInt& y) : 2*: 20: DL_Scheme_PublicKey(group, y) -: 21: { 2*: 22: } ------------------ _ZN5Botan17ElGamal_PublicKeyC1ERKNS_8DL_GroupERKNS_6BigIntE: function _ZN5Botan17ElGamal_PublicKeyC1ERKNS_8DL_GroupERKNS_6BigIntE called 2 returned 100% blocks executed 100% 2: 19:ElGamal_PublicKey::ElGamal_PublicKey(const DL_Group& group, const BigInt& y) : 2: 20: DL_Scheme_PublicKey(group, y) call 0 returned 100% -: 21: { 2: 22: } ------------------ _ZN5Botan17ElGamal_PublicKeyC2ERKNS_8DL_GroupERKNS_6BigIntE: function _ZN5Botan17ElGamal_PublicKeyC2ERKNS_8DL_GroupERKNS_6BigIntE called 0 returned 0% blocks executed 0% #####: 19:ElGamal_PublicKey::ElGamal_PublicKey(const DL_Group& group, const BigInt& y) : #####: 20: DL_Scheme_PublicKey(group, y) -: 21: { #####: 22: } ------------------ -: 23: -: 24:/* -: 25:* ElGamal_PrivateKey Constructor -: 26:*/ 33*: 27:ElGamal_PrivateKey::ElGamal_PrivateKey(RandomNumberGenerator& rng, -: 28: const DL_Group& group, 33*: 29: const BigInt& x) -: 30: { 33*: 31: m_x = x; 33*: 32: m_group = group; -: 33: 64*: 34: if(m_x.is_zero()) -: 35: { 8*: 36: const size_t exp_bits = m_group.exponent_bits(); 8*: 37: m_x.randomize(rng, exp_bits); 16*: 38: m_y = m_group.power_g_p(m_x, exp_bits); -: 39: } -: 40: else -: 41: { 50*: 42: m_y = m_group.power_g_p(m_x, m_group.p_bits()); -: 43: } 33*: 44: } ------------------ _ZN5Botan18ElGamal_PrivateKeyC1ERNS_21RandomNumberGeneratorERKNS_8DL_GroupERKNS_6BigIntE: function _ZN5Botan18ElGamal_PrivateKeyC1ERNS_21RandomNumberGeneratorERKNS_8DL_GroupERKNS_6BigIntE called 33 returned 100% blocks executed 70% 33: 27:ElGamal_PrivateKey::ElGamal_PrivateKey(RandomNumberGenerator& rng, -: 28: const DL_Group& group, 33: 29: const BigInt& x) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed call 4 never executed -: 30: { 33: 31: m_x = x; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 33: 32: m_group = group; call 0 returned 100% -: 33: 64: 34: if(m_x.is_zero()) branch 0 taken 94% (fallthrough) branch 1 taken 6% branch 2 taken 24% (fallthrough) branch 3 taken 76% -: 35: { 8: 36: const size_t exp_bits = m_group.exponent_bits(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 37: m_x.randomize(rng, exp_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 16: 38: m_y = m_group.power_g_p(m_x, exp_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 0% (fallthrough) branch 6 taken 100% -: 39: } -: 40: else -: 41: { 50: 42: m_y = m_group.power_g_p(m_x, m_group.p_bits()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 0% (fallthrough) branch 9 taken 100% -: 43: } 33: 44: } ------------------ _ZN5Botan18ElGamal_PrivateKeyC2ERNS_21RandomNumberGeneratorERKNS_8DL_GroupERKNS_6BigIntE: function _ZN5Botan18ElGamal_PrivateKeyC2ERNS_21RandomNumberGeneratorERKNS_8DL_GroupERKNS_6BigIntE called 0 returned 0% blocks executed 0% #####: 27:ElGamal_PrivateKey::ElGamal_PrivateKey(RandomNumberGenerator& rng, -: 28: const DL_Group& group, #####: 29: const BigInt& x) call 0 never executed branch 1 never executed branch 2 never executed -: 30: { #####: 31: m_x = x; call 0 never executed branch 1 never executed branch 2 never executed #####: 32: m_group = group; call 0 never executed -: 33: #####: 34: if(m_x.is_zero()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 35: { #####: 36: const size_t exp_bits = m_group.exponent_bits(); call 0 never executed branch 1 never executed branch 2 never executed #####: 37: m_x.randomize(rng, exp_bits); call 0 never executed branch 1 never executed branch 2 never executed #####: 38: m_y = m_group.power_g_p(m_x, exp_bits); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed -: 39: } -: 40: else -: 41: { #####: 42: m_y = m_group.power_g_p(m_x, m_group.p_bits()); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed -: 43: } #####: 44: } ------------------ -: 45: 14*: 46:ElGamal_PrivateKey::ElGamal_PrivateKey(const AlgorithmIdentifier& alg_id, 14: 47: const secure_vector& key_bits) : 14*: 48: DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_42) -: 49: { 28*: 50: m_y = m_group.power_g_p(m_x, m_group.p_bits()); 14*: 51: } ------------------ _ZN5Botan18ElGamal_PrivateKeyC1ERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE: function _ZN5Botan18ElGamal_PrivateKeyC1ERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE called 14 returned 100% blocks executed 53% 14: 46:ElGamal_PrivateKey::ElGamal_PrivateKey(const AlgorithmIdentifier& alg_id, 14: 47: const secure_vector& key_bits) : 14: 48: DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_42) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed call 7 never executed -: 49: { 28: 50: m_y = m_group.power_g_p(m_x, m_group.p_bits()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 0% (fallthrough) branch 9 taken 100% 14: 51: } ------------------ _ZN5Botan18ElGamal_PrivateKeyC2ERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE: function _ZN5Botan18ElGamal_PrivateKeyC2ERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE called 0 returned 0% blocks executed 0% #####: 46:ElGamal_PrivateKey::ElGamal_PrivateKey(const AlgorithmIdentifier& alg_id, -: 47: const secure_vector& key_bits) : #####: 48: DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_42) call 0 never executed branch 1 never executed branch 2 never executed -: 49: { #####: 50: m_y = m_group.power_g_p(m_x, m_group.p_bits()); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed #####: 51: } ------------------ -: 52: -: 53:/* -: 54:* Check Private ElGamal Parameters -: 55:*/ function _ZNK5Botan18ElGamal_PrivateKey9check_keyERNS_21RandomNumberGeneratorEb called 5 returned 100% blocks executed 60% 5: 56:bool ElGamal_PrivateKey::check_key(RandomNumberGenerator& rng, -: 57: bool strong) const -: 58: { 5: 59: if(!DL_Scheme_PrivateKey::check_key(rng, strong)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 60: return false; -: 61: 5: 62: if(!strong) branch 0 taken 20% (fallthrough) branch 1 taken 80% -: 63: return true; -: 64: 1: 65: return KeyPair::encryption_consistency_check(rng, *this, "OAEP(SHA-256)"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 66: } -: 67: -: 68:namespace { -: 69: -: 70:/** -: 71:* ElGamal encryption operation -: 72:*/ -: 73:class ElGamal_Encryption_Operation final : public PK_Ops::Encryption_with_EME -: 74: { -: 75: public: -: 76: function _ZNK5Botan12_GLOBAL__N_128ElGamal_Encryption_Operation17ciphertext_lengthEm called 8 returned 100% blocks executed 100% 8: 77: size_t ciphertext_length(size_t) const override { return 2*m_group.p_bytes(); } call 0 returned 100% -: 78: function _ZNK5Botan12_GLOBAL__N_128ElGamal_Encryption_Operation18max_raw_input_bitsEv called 25 returned 100% blocks executed 100% 25: 79: size_t max_raw_input_bits() const override { return m_group.p_bits() - 1; } call 0 returned 100% -: 80: -: 81: ElGamal_Encryption_Operation(const ElGamal_PublicKey& key, const std::string& eme); -: 82: -: 83: secure_vector raw_encrypt(const uint8_t msg[], size_t msg_len, -: 84: RandomNumberGenerator& rng) override; -: 85: -: 86: private: -: 87: const DL_Group m_group; -: 88: std::shared_ptr m_monty_y_p; -: 89: }; -: 90: function _ZN5Botan12_GLOBAL__N_128ElGamal_Encryption_OperationC2ERKNS_17ElGamal_PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 13 returned 100% blocks executed 42% 13: 91:ElGamal_Encryption_Operation::ElGamal_Encryption_Operation(const ElGamal_PublicKey& key, 13: 92: const std::string& eme) : -: 93: PK_Ops::Encryption_with_EME(eme), 13: 94: m_group(key.get_group()) call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed -: 95: { 13: 96: const size_t powm_window = 4; 26: 97: m_monty_y_p = monty_precompute(key.get_group().monty_params_p(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 98: key.get_y(), 13: 99: powm_window); branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% 13: 100: } -: 101: -: 102:secure_vector function _ZN5Botan12_GLOBAL__N_128ElGamal_Encryption_Operation11raw_encryptEPKhmRNS_21RandomNumberGeneratorE called 13 returned 100% blocks executed 46% 13: 103:ElGamal_Encryption_Operation::raw_encrypt(const uint8_t msg[], size_t msg_len, -: 104: RandomNumberGenerator& rng) -: 105: { 13: 106: BigInt m(msg, msg_len); call 0 returned 100% -: 107: 13: 108: if(m >= m_group.get_p()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% #####: 109: throw Invalid_Argument("ElGamal encryption: Input is too large"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 110: -: 111: /* -: 112: Some ElGamal implementations generate keys where using short exponents -: 113: is unsafe. Always use full length exponents to avoid this. -: 114: -: 115: See https://eprint.iacr.org/2021/923 for details. -: 116: */ 13: 117: const size_t k_bits = m_group.p_bits() - 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 26: 118: const BigInt k(rng, k_bits, false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 119: 26: 120: const BigInt a = m_group.power_g_p(k, k_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 26: 121: const BigInt b = m_group.multiply_mod_p(m, monty_execute(*m_monty_y_p, k, k_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 122: 26: 123: return BigInt::encode_fixed_length_int_pair(a, b, m_group.p_bytes()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 124: } -: 125: -: 126:/** -: 127:* ElGamal decryption operation -: 128:*/ -: 129:class ElGamal_Decryption_Operation final : public PK_Ops::Decryption_with_EME -: 130: { -: 131: public: -: 132: -: 133: ElGamal_Decryption_Operation(const ElGamal_PrivateKey& key, -: 134: const std::string& eme, -: 135: RandomNumberGenerator& rng); -: 136: function _ZNK5Botan12_GLOBAL__N_128ElGamal_Decryption_Operation16plaintext_lengthEm called 8 returned 100% blocks executed 100% 8: 137: size_t plaintext_length(size_t) const override { return m_group.p_bytes(); } call 0 returned 100% -: 138: -: 139: secure_vector raw_decrypt(const uint8_t msg[], size_t msg_len) override; -: 140: private: function _ZNK5Botan12_GLOBAL__N_128ElGamal_Decryption_Operation12powermod_x_pERKNS_6BigIntE called 520 returned 100% blocks executed 64% 520: 141: BigInt powermod_x_p(const BigInt& v) const -: 142: { 520: 143: const size_t powm_window = 4; 520: 144: auto powm_v_p = monty_precompute(m_monty_p, v, powm_window); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) 1040: 145: return monty_execute(*powm_v_p, m_x, m_x_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 146: } -: 147: -: 148: const DL_Group m_group; -: 149: const BigInt& m_x; -: 150: const size_t m_x_bits; -: 151: std::shared_ptr m_monty_p; -: 152: Blinder m_blinder; -: 153: }; -: 154: function _ZN5Botan12_GLOBAL__N_128ElGamal_Decryption_OperationC2ERKNS_18ElGamal_PrivateKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_21RandomNumberGeneratorE called 30 returned 100% blocks executed 44% 30: 155:ElGamal_Decryption_Operation::ElGamal_Decryption_Operation(const ElGamal_PrivateKey& key, -: 156: const std::string& eme, 30: 157: RandomNumberGenerator& rng) : -: 158: PK_Ops::Decryption_with_EME(eme), -: 159: m_group(key.get_group()), 30: 160: m_x(key.get_x()), 30: 161: m_x_bits(m_x.bits()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 30: 162: m_monty_p(key.get_group().monty_params_p()), -: 163: m_blinder(m_group.get_p(), -: 164: rng, 30: 165: [](const BigInt& k) { return k; }, call 0 returned 100% 90: 166: [this](const BigInt& k) { return powermod_x_p(k); }) call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) branch 15 taken 100% (fallthrough) branch 16 taken 0% branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed -: 167: { 30: 168: } -: 169: -: 170:secure_vector function _ZN5Botan12_GLOBAL__N_128ElGamal_Decryption_Operation11raw_decryptEPKhm called 490 returned 100% blocks executed 43% 490: 171:ElGamal_Decryption_Operation::raw_decrypt(const uint8_t msg[], size_t msg_len) -: 172: { 490: 173: const size_t p_bytes = m_group.p_bytes(); call 0 returned 100% -: 174: 490: 175: if(msg_len != 2 * p_bytes) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 176: throw Invalid_Argument("ElGamal decryption: Invalid message"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 177: 490: 178: BigInt a(msg, p_bytes); call 0 returned 100% 980: 179: const BigInt b(msg + p_bytes, p_bytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 180: 490: 181: if(a >= m_group.get_p() || b >= m_group.get_p()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% call 8 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% (throw) call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% (throw) branch 14 taken 0% (fallthrough) branch 15 taken 100% #####: 182: throw Invalid_Argument("ElGamal decryption: Invalid message"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 183: 490: 184: a = m_blinder.blind(a); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 185: 1470: 186: const BigInt r = m_group.multiply_mod_p(m_group.inverse_mod_p(powermod_x_p(a)), b); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed -: 187: 1470: 188: return BigInt::encode_1363(m_blinder.unblind(r), p_bytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 189: } -: 190: -: 191:} -: 192: -: 193:std::unique_ptr function _ZNK5Botan17ElGamal_PublicKey20create_encryption_opERNS_21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_ called 31 returned 42% blocks executed 57% 31: 194:ElGamal_PublicKey::create_encryption_op(RandomNumberGenerator& /*rng*/, -: 195: const std::string& params, -: 196: const std::string& provider) const -: 197: { 31: 198: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 81% (fallthrough) branch 2 taken 19% branch 3 taken 28% (fallthrough) branch 4 taken 72% 13: 199: return std::unique_ptr(new ElGamal_Encryption_Operation(*this, params)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed 36: 200: throw Provider_Not_Found(algo_name(), provider); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 0% call 8 never executed -: 201: } -: 202: -: 203:std::unique_ptr function _ZNK5Botan18ElGamal_PrivateKey20create_decryption_opERNS_21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_ called 99 returned 30% blocks executed 57% 99: 204:ElGamal_PrivateKey::create_decryption_op(RandomNumberGenerator& rng, -: 205: const std::string& params, -: 206: const std::string& provider) const -: 207: { 99: 208: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 77% (fallthrough) branch 2 taken 23% branch 3 taken 9% (fallthrough) branch 4 taken 91% 30: 209: return std::unique_ptr(new ElGamal_Decryption_Operation(*this, params, rng)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed 138: 210: throw Provider_Not_Found(algo_name(), provider); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 0% call 8 never executed -: 211: } -: 212: -: 213:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#tls#tls_server.cpp.gcov -: 0:Source:src/lib/tls/tls_server.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/tls_server.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/tls_server.gcda -: 0:Runs:2947 -: 1:/* -: 2:* TLS Server -: 3:* (C) 2004-2011,2012,2016 Jack Lloyd -: 4:* 2016 Matthias Gierlings -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14: -: 15:namespace Botan { -: 16: -: 17:namespace TLS { -: 18: -: 19:class Server_Handshake_State final : public Handshake_State -: 20: { -: 21: public: 1636: 22: Server_Handshake_State(Handshake_IO* io, Callbacks& cb) 1636: 23: : Handshake_State(io, cb) {} call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 24: 1079: 25: Private_Key* server_rsa_kex_key() { return m_server_rsa_kex_key; } 154: 26: void set_server_rsa_kex_key(Private_Key* key) 154: 27: { m_server_rsa_kex_key = key; } -: 28: 1608: 29: bool allow_session_resumption() const 1608: 30: { return m_allow_session_resumption; } #####: 31: void set_allow_session_resumption(bool allow_session_resumption) #####: 32: { m_allow_session_resumption = allow_session_resumption; } -: 33: 1224: 34: const std::vector& resume_peer_certs() const 1224: 35: { return m_resume_peer_certs; } -: 36: 419: 37: void set_resume_certs(const std::vector& certs) 419: 38: { m_resume_peer_certs = certs; } call 0 returned 100% -: 39: 419: 40: void mark_as_resumption() { m_is_a_resumption = true; } -: 41: 1068: 42: bool is_a_resumption() const { return m_is_a_resumption; } -: 43: -: 44: private: -: 45: // Used by the server only, in case of RSA key exchange. Not owned -: 46: Private_Key* m_server_rsa_kex_key = nullptr; -: 47: -: 48: /* -: 49: * Used by the server to know if resumption should be allowed on -: 50: * a server-initiated renegotiation -: 51: */ -: 52: bool m_allow_session_resumption = true; -: 53: -: 54: bool m_is_a_resumption = false; -: 55: -: 56: std::vector m_resume_peer_certs; -: 57: }; -: 58: -: 59:namespace { -: 60: function _ZN5Botan3TLS12_GLOBAL__N_116check_for_resumeERNS0_7SessionERNS0_15Session_ManagerERNS_19Credentials_ManagerEPKNS0_12Client_HelloENSt6chrono8durationIlSt5ratioILl1ELl1EEEE called 1608 returned 100% blocks executed 65% 1608: 61:bool check_for_resume(Session& session_info, -: 62: Session_Manager& session_manager, -: 63: Credentials_Manager& credentials, -: 64: const Client_Hello* client_hello, -: 65: std::chrono::seconds session_ticket_lifetime) -: 66: { 1608: 67: const std::vector& client_session_id = client_hello->session_id(); call 0 returned 100% 3215: 68: const std::vector& session_ticket = client_hello->session_ticket(); call 0 returned 100% -: 69: 1608: 70: if(session_ticket.empty()) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 71: { 1207: 72: if(client_session_id.empty()) // not resuming branch 0 taken 4% (fallthrough) branch 1 taken 96% -: 73: return false; -: 74: -: 75: // not found 51: 76: if(!session_manager.load_from_session_id(client_session_id, session_info)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 63% branch 4 taken 37% -: 77: return false; -: 78: } -: 79: else -: 80: { -: 81: // If a session ticket was sent, ignore client session ID 401: 82: try -: 83: { 398: 84: session_info = Session::decrypt( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 85: session_ticket, 1206: 86: credentials.psk("tls-server", "session-ticket", "")); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 0% (fallthrough) branch 14 taken 100% branch 15 taken 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 taken 0% (fallthrough) branch 20 taken 100% -: 87: 398: 88: if(session_ticket_lifetime != std::chrono::seconds(0) && branch 0 taken 100% (fallthrough) branch 1 taken 0% 401*: 89: session_info.session_age() > session_ticket_lifetime) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 90: return false; // ticket has expired -: 91: } 3: 92: catch(...) call 0 returned 100% -: 93: { 3: 94: return false; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 95: } -: 96: } -: 97: -: 98: // wrong version 430: 99: if(client_hello->version() != session_info.version()) branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 100: return false; -: 101: -: 102: // client didn't send original ciphersuite 422: 103: if(!value_exists(client_hello->ciphersuites(), branch 0 taken 100% (fallthrough) branch 1 taken 1% 422: 104: session_info.ciphersuite_code())) -: 105: return false; -: 106: -: 107:#if defined(BOTAN_HAS_SRP6) -: 108: // client sent a different SRP identity 842: 109: if(client_hello->srp_identifier() != "") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 taken 0% (fallthrough) branch 6 taken 100% -: 110: { #####: 111: if(client_hello->srp_identifier() != session_info.srp_identifier()) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed -: 112: return false; -: 113: } -: 114:#endif -: 115: -: 116: // client sent a different SNI hostname 877: 117: if(client_hello->sni_hostname() != "") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 8% (fallthrough) branch 4 taken 92% branch 5 taken 100% (fallthrough) branch 6 taken 0% -: 118: { 913: 119: if(client_hello->sni_hostname() != session_info.server_info().hostname()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 8% (fallthrough) branch 7 taken 92% branch 8 taken 8% (fallthrough) branch 9 taken 92% branch 10 taken 100% (fallthrough) branch 11 taken 0% branch 12 taken 100% (fallthrough) branch 13 taken 0% -: 120: return false; -: 121: } -: 122: -: 123: // Checking extended_master_secret on resume (RFC 7627 section 5.3) 421: 124: if(client_hello->supports_extended_master_secret() != session_info.supports_extended_master_secret()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 1% (fallthrough) branch 4 taken 100% -: 125: { 2: 126: if(!session_info.supports_extended_master_secret()) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 127: { -: 128: return false; // force new handshake with extended master secret -: 129: } -: 130: else -: 131: { -: 132: /* -: 133: Client previously negotiated session with extended master secret, -: 134: but has now attempted to resume without the extension: abort -: 135: */ 1: 136: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, 3: 137: "Client resumed extended ms session without sending extension"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 100% call 7 never executed -: 138: } -: 139: } -: 140: -: 141: // Checking encrypt_then_mac on resume (RFC 7366 section 3.1) 419: 142: if(!client_hello->supports_encrypt_then_mac() && session_info.supports_encrypt_then_mac()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 98% (fallthrough) branch 4 taken 2% branch 5 taken 0% (fallthrough) branch 6 taken 100% -: 143: { -: 144: /* -: 145: Client previously negotiated session with Encrypt-then-MAC, -: 146: but has now attempted to resume without the extension: abort -: 147: */ #####: 148: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, #####: 149: "Client resumed Encrypt-then-MAC session without sending extension"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 150: } -: 151: -: 152: return true; -: 153: } -: 154: -: 155:/* -: 156:* Choose which ciphersuite to use -: 157:*/ function _ZN5Botan3TLS12_GLOBAL__N_118choose_ciphersuiteERKNS0_6PolicyENS0_16Protocol_VersionERNS_19Credentials_ManagerERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorINS_16X509_CertificateESaISG_EESt4lessISE_ESaISt4pairIKSE_SI_EEERKNS0_12Client_HelloE called 1187 returned 96% blocks executed 53% 1187: 158:uint16_t choose_ciphersuite( -: 159: const Policy& policy, -: 160: Protocol_Version version, -: 161: Credentials_Manager& creds, -: 162: const std::map>& cert_chains, -: 163: const Client_Hello& client_hello) -: 164: { 1187: 165: const bool our_choice = policy.server_uses_own_ciphersuite_preferences(); call 0 returned 100% 1187: 166: const bool have_srp = creds.attempt_srp("tls-server", client_hello.sni_hostname()); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) branch 7 taken 0% (fallthrough) branch 8 taken 100% branch 9 taken 19% (fallthrough) branch 10 taken 81% call 11 never executed 1187: 167: const std::vector client_suites = client_hello.ciphersuites(); call 0 returned 100% 2374: 168: const std::vector server_suites = policy.ciphersuite_list(version, have_srp); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 169: 1187: 170: if(server_suites.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 171: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, #####: 172: "Policy forbids us from negotiating any ciphersuite"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 173: 1187: 174: const bool have_shared_ecc_curve = 1232: 175: (policy.choose_key_exchange_group(client_hello.supported_ecc_curves()) != Group_Params::NONE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 99% (fallthrough) branch 7 taken 1% branch 8 taken 100% (fallthrough) branch 9 taken 0% -: 176: -: 177: /* -: 178: Walk down one list in preference order -: 179: */ 2374: 180: std::vector pref_list = server_suites; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 2374: 181: std::vector other_list = client_suites; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 182: 1187: 183: if(!our_choice) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 184: std::swap(pref_list, other_list); -: 185: 31348: 186: for(auto suite_id : pref_list) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 187: { 62606: 188: if(!value_exists(other_list, suite_id)) branch 0 taken 95% (fallthrough) branch 1 taken 5% 30161: 189: continue; -: 190: 1594: 191: const Ciphersuite suite = Ciphersuite::by_id(suite_id); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 192: 1594*: 193: if(suite.valid() == false) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 194: { #####: 195: continue; -: 196: } -: 197: 1594: 198: if(have_shared_ecc_curve == false && suite.ecc_ciphersuite()) branch 0 taken 4% (fallthrough) branch 1 taken 96% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 84% (fallthrough) branch 6 taken 16% -: 199: { 52: 200: continue; -: 201: } -: 202: -: 203: // For non-anon ciphersuites 1542: 204: if(suite.signature_used()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 86% (fallthrough) branch 4 taken 14% -: 205: { 2256: 206: const std::string sig_algo = suite.sig_algo(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 207: -: 208: // Do we have any certificates for this sig? 1328: 209: if(cert_chains.count(sig_algo) == 0) call 0 returned 100% -: 210: { 400: 211: continue; branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 212: } -: 213: 928: 214: if(version.supports_negotiable_signature_algorithms()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 62% (fallthrough) branch 4 taken 38% -: 215: { 572: 216: const std::vector allowed = 1144: 217: policy.allowed_signature_schemes(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 218: 572: 219: std::vector client_sig_methods = 1144: 220: client_hello.signature_schemes(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 221: 572: 222: if(client_sig_methods.empty()) branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 223: { -: 224: // If empty, then implicit SHA-1 (TLS v1.2 rules) 2: 225: client_sig_methods.push_back(Signature_Scheme::RSA_PKCS1_SHA1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 226: client_sig_methods.push_back(Signature_Scheme::ECDSA_SHA1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 227: client_sig_methods.push_back(Signature_Scheme::DSA_SHA1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 228: } -: 229: 572: 230: bool we_support_some_hash_by_client = false; -: 231: 4374: 232: for(Signature_Scheme scheme : client_sig_methods) branch 0 taken 87% (fallthrough) branch 1 taken 13% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 233: { 3802: 234: if(signature_scheme_is_known(scheme) == false) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 16% (fallthrough) branch 4 taken 84% 597: 235: continue; -: 236: 8169: 237: if(signature_algorithm_of_scheme(scheme) == suite.sig_algo() && call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 55% (fallthrough) branch 7 taken 45% branch 8 taken 2% (fallthrough) branch 9 taken 98% branch 10 taken 0% (fallthrough) branch 11 taken 100% branch 12 taken 54% (fallthrough) branch 13 taken 46% branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed 5002: 238: policy.allowed_signature_hash(hash_function_of_scheme(scheme))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 3% (fallthrough) branch 7 taken 97% branch 8 taken 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed -: 239: { 1721: 240: we_support_some_hash_by_client = true; -: 241: } -: 242: } -: 243: 572: 244: if(we_support_some_hash_by_client == false) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 245: { #####: 246: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, #####: 247: "Policy does not accept any hash function supported by client"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 248: } -: 249: } -: 250: } -: 251: -: 252:#if defined(BOTAN_HAS_SRP6) -: 253: /* -: 254: The client may offer SRP cipher suites in the hello message but -: 255: omit the SRP extension. If the server would like to select an -: 256: SRP cipher suite in this case, the server SHOULD return a fatal -: 257: "unknown_psk_identity" alert immediately after processing the -: 258: client hello message. -: 259: - RFC 5054 section 2.5.1.2 -: 260: */ 1152: 261: if(suite.kex_method() == Kex_Algo::SRP_SHA && client_hello.srp_identifier() == "") branch 0 taken 1% (fallthrough) branch 1 taken 99% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 1% (fallthrough) branch 9 taken 99% branch 10 taken 0% (fallthrough) branch 11 taken 100% #####: 262: throw TLS_Exception(Alert::UNKNOWN_PSK_IDENTITY, #####: 263: "Client wanted SRP but did not send username"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 264:#endif -: 265: 2284: 266: return suite_id; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 267: } -: 268: 45: 269: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, 135: 270: "Can't agree on a ciphersuite with client"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 100% call 7 never executed -: 271: } -: 272: -: 273:std::map> function _ZN5Botan3TLS12_GLOBAL__N_116get_server_certsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_19Credentials_ManagerE called 1200 returned 100% blocks executed 59% 1200: 274:get_server_certs(const std::string& hostname, -: 275: Credentials_Manager& creds) -: 276: { 1200: 277: const char* cert_types[] = { "RSA", "ECDSA", "DSA", nullptr }; -: 278: 1200: 279: std::map> cert_chains; -: 280: 4797: 281: for(size_t i = 0; cert_types[i]; ++i) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 282: { 3598: 283: const std::vector certs = 10794: 284: creds.cert_chain_single_type(cert_types[i], "tls-server", hostname); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 1% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% call 12 never executed -: 285: 3597: 286: if(!certs.empty()) branch 0 taken 45% (fallthrough) branch 1 taken 55% 3234: 287: cert_chains[cert_types[i]] = certs; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) -: 288: } -: 289: 1199: 290: return cert_chains; -: 291: } -: 292: -: 293:} -: 294: -: 295:/* -: 296:* TLS Server Constructor -: 297:*/ function _ZN5Botan3TLS6ServerC2ERNS0_9CallbacksERNS0_15Session_ManagerERNS_19Credentials_ManagerERKNS0_6PolicyERNS_21RandomNumberGeneratorEbm called 2768 returned 100% blocks executed 100% 2768: 298:Server::Server(Callbacks& callbacks, -: 299: Session_Manager& session_manager, -: 300: Credentials_Manager& creds, -: 301: const Policy& policy, -: 302: RandomNumberGenerator& rng, -: 303: bool is_datagram, 2768: 304: size_t io_buf_sz) : -: 305: Channel(callbacks, session_manager, rng, policy, -: 306: true, is_datagram, io_buf_sz), 2768: 307: m_creds(creds) call 0 returned 100% -: 308: { 2768: 309: } -: 310: function _ZN5Botan3TLS6ServerC2ESt8functionIFvPKhmEES6_S2_IFvNS0_5AlertES4_mEES2_IFbRKNS0_7SessionEEERNS0_15Session_ManagerERNS_19Credentials_ManagerERKNS0_6PolicyERNS_21RandomNumberGeneratorES2_IFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIST_SaIST_EEEEbm called 0 returned 0% blocks executed 0% #####: 311:Server::Server(output_fn output, -: 312: data_cb got_data_cb, -: 313: alert_cb recv_alert_cb, -: 314: handshake_cb hs_cb, -: 315: Session_Manager& session_manager, -: 316: Credentials_Manager& creds, -: 317: const Policy& policy, -: 318: RandomNumberGenerator& rng, -: 319: next_protocol_fn next_proto, -: 320: bool is_datagram, #####: 321: size_t io_buf_sz) : -: 322: Channel(output, got_data_cb, recv_alert_cb, hs_cb, #####: 323: Channel::handshake_msg_cb(), session_manager, call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 324: rng, policy, true, is_datagram, io_buf_sz), -: 325: m_creds(creds), #####: 326: m_choose_next_protocol(next_proto) call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed call 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed call 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed branch 32 never executed branch 33 never executed branch 34 never executed branch 35 never executed call 36 never executed -: 327: { #####: 328: } -: 329: function _ZN5Botan3TLS6ServerC2ESt8functionIFvPKhmEES6_S2_IFvNS0_5AlertES4_mEES2_IFbRKNS0_7SessionEEES2_IFvRKNS0_17Handshake_MessageEEERNS0_15Session_ManagerERNS_19Credentials_ManagerERKNS0_6PolicyERNS_21RandomNumberGeneratorES2_IFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISY_SaISY_EEEEb called 0 returned 0% blocks executed 0% #####: 330:Server::Server(output_fn output, -: 331: data_cb got_data_cb, -: 332: alert_cb recv_alert_cb, -: 333: handshake_cb hs_cb, -: 334: handshake_msg_cb hs_msg_cb, -: 335: Session_Manager& session_manager, -: 336: Credentials_Manager& creds, -: 337: const Policy& policy, -: 338: RandomNumberGenerator& rng, -: 339: next_protocol_fn next_proto, #####: 340: bool is_datagram) : -: 341: Channel(output, got_data_cb, recv_alert_cb, hs_cb, hs_msg_cb, -: 342: session_manager, rng, policy, true, is_datagram), -: 343: m_creds(creds), #####: 344: m_choose_next_protocol(next_proto) call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed branch 8 never executed branch 9 never executed call 10 never executed branch 11 never executed branch 12 never executed call 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed call 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed branch 32 never executed branch 33 never executed branch 34 never executed call 35 never executed branch 36 never executed branch 37 never executed call 38 never executed -: 345: { #####: 346: } -: 347: function _ZN5Botan3TLS6Server19new_handshake_stateEPNS0_12Handshake_IOE called 1636 returned 100% blocks executed 62% 1636: 348:Handshake_State* Server::new_handshake_state(Handshake_IO* io) -: 349: { 1636: 350: std::unique_ptr state(new Server_Handshake_State(io, callbacks())); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 never executed -: 351: 1636: 352: state->set_expected_next(CLIENT_HELLO); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1636: 353: return state.release(); -: 354: } -: 355: -: 356:std::vector function _ZNK5Botan3TLS6Server19get_peer_cert_chainERKNS0_15Handshake_StateE called 1223 returned 100% blocks executed 88% 1223: 357:Server::get_peer_cert_chain(const Handshake_State& state_base) const -: 358: { 1223*: 359: const Server_Handshake_State& state = dynamic_cast(state_base); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 never executed 1223: 360: if(state.resume_peer_certs().size() > 0) branch 0 taken 1% branch 1 taken 100% 1: 361: return state.resume_peer_certs(); call 0 returned 100% -: 362: 1222: 363: if(state.client_certs()) branch 0 taken 30% (fallthrough) branch 1 taken 70% 366: 364: return state.client_certs()->cert_chain(); call 0 returned 100% 856: 365: return std::vector(); -: 366: } -: 367: -: 368:/* -: 369:* Send a hello request to the client -: 370:*/ function _ZN5Botan3TLS6Server18initiate_handshakeERNS0_15Handshake_StateEb called 0 returned 0% blocks executed 0% #####: 371:void Server::initiate_handshake(Handshake_State& state, -: 372: bool force_full_renegotiation) -: 373: { #####: 374: dynamic_cast(state). #####: 375: set_allow_session_resumption(!force_full_renegotiation); branch 0 never executed branch 1 never executed -: 376: #####: 377: Hello_Request hello_req(state.handshake_io()); call 0 never executed #####: 378: } -: 379: -: 380:namespace { -: 381: function _ZN5Botan3TLS12_GLOBAL__N_114select_versionERKNS0_6PolicyENS0_16Protocol_VersionES5_bRKSt6vectorIS5_SaIS5_EE called 2177 returned 99% blocks executed 52% 2177: 382:Protocol_Version select_version(const Botan::TLS::Policy& policy, -: 383: Protocol_Version client_offer, -: 384: Protocol_Version active_version, -: 385: bool is_fallback, -: 386: const std::vector& supported_versions) -: 387: { 2177: 388: const bool is_datagram = client_offer.is_datagram_protocol(); call 0 returned 100% 2177: 389: const bool initial_handshake = (active_version.valid() == false); call 0 returned 100% -: 390: 2177: 391: const Protocol_Version latest_supported = policy.latest_supported_version(is_datagram); call 0 returned 100% -: 392: 2177: 393: if(is_fallback) branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 394: { 2: 395: if(latest_supported > client_offer) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% 1: 396: throw TLS_Exception(Alert::INAPPROPRIATE_FALLBACK, 3: 397: "Client signalled fallback SCSV, possible attack"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 398: } -: 399: 2176: 400: if(supported_versions.size() > 0) branch 0 taken 17% (fallthrough) branch 1 taken 83% -: 401: { 362: 402: if(is_datagram) branch 0 taken 57% (fallthrough) branch 1 taken 43% -: 403: { 621: 404: if(policy.allow_dtls12() && value_exists(supported_versions, Protocol_Version(Protocol_Version::DTLS_V12))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 78% (fallthrough) branch 4 taken 22% branch 5 taken 70% (fallthrough) branch 6 taken 30% 144: 405: return Protocol_Version::DTLS_V12; -: 406:#if defined(BOTAN_HAS_TLS_V10) 185: 407: if(policy.allow_dtls10() && value_exists(supported_versions, Protocol_Version(Protocol_Version::DTLS_V10))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 98% (fallthrough) branch 4 taken 2% branch 5 taken 2% (fallthrough) branch 6 taken 98% 60: 408: return Protocol_Version::DTLS_V10; -: 409:#endif 3: 410: throw TLS_Exception(Alert::PROTOCOL_VERSION, "No shared DTLS version"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 411: } -: 412: else -: 413: { 511: 414: if(policy.allow_tls12() && value_exists(supported_versions, Protocol_Version(Protocol_Version::TLS_V12))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 77% (fallthrough) branch 4 taken 23% branch 5 taken 38% (fallthrough) branch 6 taken 62% 97: 415: return Protocol_Version::TLS_V12; -: 416:#if defined(BOTAN_HAS_TLS_V10) 183: 417: if(policy.allow_tls11() && value_exists(supported_versions, Protocol_Version(Protocol_Version::TLS_V11))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 67% (fallthrough) branch 4 taken 33% branch 5 taken 52% (fallthrough) branch 6 taken 48% 29: 418: return Protocol_Version::TLS_V11; 94: 419: if(policy.allow_tls10() && value_exists(supported_versions, Protocol_Version(Protocol_Version::TLS_V10))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 97% (fallthrough) branch 4 taken 3% branch 5 taken 3% (fallthrough) branch 6 taken 97% 30: 420: return Protocol_Version::TLS_V10; -: 421:#endif 3: 422: throw TLS_Exception(Alert::PROTOCOL_VERSION, "No shared TLS version"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 423: } -: 424: } -: 425: 1814: 426: const bool client_offer_acceptable = 1814: 427: client_offer.known_version() && policy.acceptable_protocol_version(client_offer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% call 3 returned 100% branch 4 taken 1% (fallthrough) branch 5 taken 99% -: 428: 1814: 429: if(!initial_handshake) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 430: { -: 431: /* -: 432: * If this is a renegotiation, and the client has offered a -: 433: * later version than what it initially negotiated, negotiate -: 434: * the old version. This matches OpenSSL's behavior. If the -: 435: * client is offering a version earlier than what it initially -: 436: * negotiated, reject as a probable attack. -: 437: */ #####: 438: if(active_version > client_offer) call 0 never executed branch 1 never executed branch 2 never executed -: 439: { #####: 440: throw TLS_Exception(Alert::PROTOCOL_VERSION, #####: 441: "Client negotiated " + call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed #####: 442: active_version.to_string() + call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed #####: 443: " then renegotiated with " + call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed #####: 444: client_offer.to_string()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 445: } -: 446: else -: 447: { #####: 448: return active_version; -: 449: } -: 450: } 1814: 451: else if(client_offer_acceptable) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 452: { 1789: 453: return client_offer; -: 454: } 25: 455: else if(!client_offer.known_version() || client_offer > latest_supported) call 0 returned 100% branch 1 taken 72% (fallthrough) branch 2 taken 28% call 3 returned 100% branch 4 taken 44% (fallthrough) branch 5 taken 56% -: 456: { -: 457: /* -: 458: The client offered some version newer than the latest we -: 459: support. Offer them the best we know. -: 460: */ 17: 461: return latest_supported; -: 462: } -: 463: else -: 464: { 8: 465: throw TLS_Exception(Alert::PROTOCOL_VERSION, 16: 466: "Client version " + client_offer.to_string() + call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 0% (fallthrough) branch 12 taken 100% branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed 24: 467: " is unacceptable by policy"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% call 3 returned 0% call 4 never executed -: 468: } -: 469: } -: 470: -: 471:} -: 472: -: 473:/* -: 474:* Process a CLIENT HELLO Message -: 475:*/ function _ZN5Botan3TLS6Server24process_client_hello_msgEPKNS0_15Handshake_StateERNS0_22Server_Handshake_StateERKSt6vectorIhSaIhEEb called 2191 returned 95% blocks executed 60% 2191: 476:void Server::process_client_hello_msg(const Handshake_State* active_state, -: 477: Server_Handshake_State& pending_state, -: 478: const std::vector& contents, -: 479: bool epoch0_restart) -: 480: { 2191*: 481: BOTAN_ASSERT_IMPLICATION(epoch0_restart, active_state != nullptr, "Can't restart with a dead connection"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 482: 2191: 483: const bool initial_handshake = epoch0_restart || !active_state; -: 484: 2191: 485: if(initial_handshake == false && policy().allow_client_initiated_renegotiation() == false) branch 0 taken 1% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 486: { 1: 487: if(policy().abort_connection_on_undesired_renegotiation()) call 0 returned 100% branch 1 taken 100% branch 2 taken 0% 3: 488: throw TLS_Exception(Alert::NO_RENEGOTIATION, "Server policy prohibits renegotiation"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 489: else #####: 490: send_warning_alert(Alert::NO_RENEGOTIATION); call 0 never executed 557*: 491: return; -: 492: } -: 493: 2190: 494: if(!policy().allow_insecure_renegotiation() && call 0 returned 100% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 495: !(initial_handshake || secure_renegotiation_supported())) call 0 never executed branch 1 never executed branch 2 never executed -: 496: { #####: 497: send_warning_alert(Alert::NO_RENEGOTIATION); call 0 never executed #####: 498: return; -: 499: } -: 500: 2190: 501: pending_state.client_hello(new Client_Hello(contents)); call 0 returned 100% call 1 returned 100% branch 2 taken 99% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% call 5 returned 100% 2179: 502: const Protocol_Version client_offer = pending_state.client_hello()->version(); call 0 returned 100% 2179: 503: const bool datagram = client_offer.is_datagram_protocol(); call 0 returned 100% -: 504: 2179: 505: if(datagram) branch 0 taken 51% (fallthrough) branch 1 taken 49% -: 506: { 1122: 507: if(client_offer.major_version() == 0xFF) branch 0 taken 1% (fallthrough) branch 1 taken 100% 3: 508: throw TLS_Exception(Alert::PROTOCOL_VERSION, "Client offered DTLS version with major version 0xFF"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 509: } -: 510: else -: 511: { 1057: 512: if(client_offer.major_version() < 3) branch 0 taken 1% (fallthrough) branch 1 taken 100% 3: 513: throw TLS_Exception(Alert::PROTOCOL_VERSION, "Client offered TLS version with major version under 3"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed 1056: 514: if(client_offer.major_version() == 3 && client_offer.minor_version() == 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 515: throw TLS_Exception(Alert::PROTOCOL_VERSION, "SSLv3 is not supported"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 516: } -: 517: -: 518: /* -: 519: * BoGo test suite expects that we will send the hello verify with a record -: 520: * version matching the version that is eventually negotiated. This is wrong -: 521: * but harmless, so go with it. Also doing the version negotiation step first -: 522: * allows to immediately close the connection with an alert if the client has -: 523: * offered a version that we are not going to negotiate anyway, instead of -: 524: * making them first do the cookie exchange and then telling them no. -: 525: * -: 526: * There is no issue with amplification here, since the alert is just 2 bytes. -: 527: */ 2177: 528: const Protocol_Version negotiated_version = -: 529: select_version(policy(), client_offer, 2: 530: active_state ? active_state->version() : Protocol_Version(), 2177: 531: pending_state.client_hello()->sent_fallback_scsv(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6542: 532: pending_state.client_hello()->supported_versions()); call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% call 3 returned 100% branch 4 taken 99% (fallthrough) branch 5 taken 1% (throw) call 6 returned 0% -: 533: 2166: 534: pending_state.set_version(negotiated_version); call 0 returned 100% -: 535: 3685: 536: const auto compression_methods = pending_state.client_hello()->compression_methods(); call 0 returned 100% 4340: 537: if(!value_exists(compression_methods, uint8_t(0))) branch 0 taken 100% (fallthrough) branch 1 taken 1% branch 2 taken 1% (fallthrough) branch 3 taken 100% 3: 538: throw TLS_Exception(Alert::ILLEGAL_PARAMETER, "Client did not offer NULL compression"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 100% call 7 never executed -: 539: 2165: 540: if(initial_handshake && datagram) branch 0 taken 52% (fallthrough) branch 1 taken 48% -: 541: { 1679: 542: SymmetricKey cookie_secret; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 543: 1118: 544: try -: 545: { 3358: 546: cookie_secret = m_creds.psk("tls-server", "dtls-cookie-secret", ""); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 1% (throw) branch 12 taken 0% (fallthrough) branch 13 taken 100% branch 14 taken 0% (fallthrough) branch 15 taken 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% branch 18 taken 0% (fallthrough) branch 19 taken 100% -: 547: } 4: 548: catch(...) {} call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) -: 549: 1118: 550: if(cookie_secret.size() > 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 551: { 1671: 552: const std::string client_identity = callbacks().tls_peer_network_identity(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1671: 553: Hello_Verify_Request verify(pending_state.client_hello()->cookie_input_data(), client_identity, cookie_secret); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% branch 8 never executed branch 9 never executed -: 554: 1114: 555: if(pending_state.client_hello()->cookie() != verify.cookie()) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 556: { 557: 557: if(epoch0_restart) branch 0 taken 1% (fallthrough) branch 1 taken 100% 2: 558: pending_state.handshake_io().send_under_epoch(verify, 0); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 559: else 1112: 560: pending_state.handshake_io().send(verify); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 561: 557: 562: pending_state.client_hello(nullptr); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 557: 563: pending_state.set_expected_next(CLIENT_HELLO); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1114: 564: return; branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 565: } -: 566: } 4: 567: else if(epoch0_restart) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 568: { #####: 569: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, "Reuse of DTLS association requires DTLS cookie secret be set"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 570: } -: 571: } -: 572: 1608: 573: if(epoch0_restart) branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 574: { -: 575: // If we reached here then we were able to verify the cookie 1: 576: reset_active_association_state(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 577: } -: 578: 1608: 579: secure_renegotiation_check(pending_state.client_hello()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 580: 1608: 581: callbacks().tls_examine_extensions(pending_state.client_hello()->extensions(), CLIENT); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 582: 3127: 583: Session session_info; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% 1608: 584: const bool resuming = 3215: 585: pending_state.allow_session_resumption() && branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 74% (fallthrough) branch 3 taken 26% 1608: 586: check_for_resume(session_info, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 587: session_manager(), -: 588: m_creds, -: 589: pending_state.client_hello(), 1608: 590: std::chrono::seconds(policy().session_ticket_lifetime())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 1% (throw) -: 591: 1607: 592: bool have_session_ticket_key = false; -: 593: 1607: 594: try -: 595: { 3191: 596: have_session_ticket_key = 3254: 597: m_creds.psk("tls-server", "session-ticket", "").length() > 0; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 99% (fallthrough) branch 11 taken 1% (throw) branch 12 taken 100% (fallthrough) branch 13 taken 1% branch 14 taken 0% (fallthrough) branch 15 taken 100% branch 16 taken 0% (fallthrough) branch 17 taken 100% branch 18 taken 0% (fallthrough) branch 19 taken 100% -: 598: } 23: 599: catch(...) {} call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) -: 600: 1607: 601: m_next_protocol = ""; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1607: 602: if(pending_state.client_hello()->supports_alpn()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 18% (fallthrough) branch 4 taken 82% -: 603: { 284: 604: m_next_protocol = callbacks().tls_server_choose_app_protocol(pending_state.client_hello()->next_protocols()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 0% (fallthrough) branch 8 taken 100% call 9 returned 100% call 10 never executed -: 605: -: 606: // if the callback return was empty, fall back to the (deprecated) std::function 284: 607: if(m_next_protocol.empty() && m_choose_next_protocol) branch 0 taken 2% (fallthrough) branch 1 taken 98% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 608: { 89*: 609: m_next_protocol = m_choose_next_protocol(pending_state.client_hello()->next_protocols()); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed call 8 returned 100% -: 610: } -: 611: } -: 612: 1607: 613: if(resuming) branch 0 taken 26% (fallthrough) branch 1 taken 74% -: 614: { 419: 615: this->session_resume(pending_state, have_session_ticket_key, session_info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 616: } -: 617: else // new session -: 618: { 1188: 619: this->session_create(pending_state, have_session_ticket_key); call 0 returned 100% branch 1 taken 93% (fallthrough) branch 2 taken 7% (throw) -: 620: } -: 621: } -: 622: function _ZN5Botan3TLS6Server23process_certificate_msgERNS0_22Server_Handshake_StateERKSt6vectorIhSaIhEE called 368 returned 98% blocks executed 75% 368: 623:void Server::process_certificate_msg(Server_Handshake_State& pending_state, -: 624: const std::vector& contents) -: 625: { 368: 626: pending_state.client_certs(new Certificate(contents, policy())); call 0 returned 100% call 1 returned 100% branch 2 taken 99% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% call 5 returned 100% -: 627: -: 628: // CERTIFICATE_REQUIRED would make more sense but BoGo expects handshake failure alert 363: 629: if(pending_state.client_certs()->empty() && policy().require_client_certificate_authentication()) branch 0 taken 35% (fallthrough) branch 1 taken 65% call 2 returned 100% branch 3 taken 2% (fallthrough) branch 4 taken 98% 9: 630: throw TLS_Exception(Alert::HANDSHAKE_FAILURE, "Policy requires client send a certificate, but it did not"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 631: 360: 632: pending_state.set_expected_next(CLIENT_KEX); call 0 returned 100% 360: 633: } -: 634: function _ZN5Botan3TLS6Server31process_client_key_exchange_msgERNS0_22Server_Handshake_StateERKSt6vectorIhSaIhEE called 1079 returned 100% blocks executed 100% 1079: 635:void Server::process_client_key_exchange_msg(Server_Handshake_State& pending_state, -: 636: const std::vector& contents) -: 637: { 1079: 638: if(pending_state.received_handshake_msg(CERTIFICATE) && !pending_state.client_certs()->empty()) call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% branch 3 taken 65% (fallthrough) branch 4 taken 35% 235: 639: pending_state.set_expected_next(CERTIFICATE_VERIFY); call 0 returned 100% -: 640: else 844: 641: pending_state.set_expected_next(HANDSHAKE_CCS); call 0 returned 100% -: 642: 1077: 643: pending_state.client_kex(new Client_Key_Exchange(contents, pending_state, call 0 returned 100% 1079: 644: pending_state.server_rsa_kex_key(), 1079: 645: m_creds, policy(), rng())); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% -: 646: 1077: 647: pending_state.compute_session_keys(); call 0 returned 100% 1077: 648: } -: 649: function _ZN5Botan3TLS6Server30process_change_cipher_spec_msgERNS0_22Server_Handshake_StateE called 1388 returned 100% blocks executed 100% 1388: 650:void Server::process_change_cipher_spec_msg(Server_Handshake_State& pending_state) -: 651: { 1388: 652: pending_state.set_expected_next(FINISHED); call 0 returned 100% 1388: 653: change_cipher_spec_reader(SERVER); call 0 returned 100% 1388: 654: } -: 655: function _ZN5Botan3TLS6Server30process_certificate_verify_msgERNS0_22Server_Handshake_StateENS0_14Handshake_TypeERKSt6vectorIhSaIhEE called 232 returned 57% blocks executed 63% 232: 656:void Server::process_certificate_verify_msg(Server_Handshake_State& pending_state, -: 657: Handshake_Type type, -: 658: const std::vector& contents) -: 659: { 232: 660: pending_state.client_verify(new Certificate_Verify(contents, pending_state.version())); call 0 returned 100% call 1 returned 100% branch 2 taken 99% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% call 5 returned 100% -: 661: 230: 662: const std::vector& client_certs = 230: 663: pending_state.client_certs()->cert_chain(); call 0 returned 99% -: 664: 230: 665: const bool sig_valid = 230: 666: pending_state.client_verify()->verify(client_certs[0], pending_state, policy()); call 0 returned 99% -: 667: 228: 668: pending_state.hash().update(pending_state.handshake_io().format(contents, type)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 never executed -: 669: -: 670: /* -: 671: * Using DECRYPT_ERROR looks weird here, but per RFC 4346 is for -: 672: * "A handshake cryptographic operation failed, including being -: 673: * unable to correctly verify a signature, ..." -: 674: */ 228: 675: if(!sig_valid) branch 0 taken 7% (fallthrough) branch 1 taken 93% 48: 676: throw TLS_Exception(Alert::DECRYPT_ERROR, "Client cert verify failed"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 677: 212: 678: try -: 679: { 292: 680: const std::string sni_hostname = pending_state.client_hello()->sni_hostname(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 424: 681: auto trusted_CAs = m_creds.trusted_certificate_authorities("tls-server", sni_hostname); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 2% (fallthrough) branch 7 taken 98% -: 682: 292: 683: callbacks().tls_verify_cert_chain(client_certs, call 0 returned 100% branch 1 taken 62% (fallthrough) branch 2 taken 38% (throw) call 3 returned 100% branch 4 taken 2% (fallthrough) branch 5 taken 98% call 6 returned 100% branch 7 taken 0% (fallthrough) branch 8 taken 100% -: 684: {}, // ocsp -: 685: trusted_CAs, -: 686: Usage_Type::TLS_CLIENT_AUTH, -: 687: sni_hostname, 212: 688: policy()); call 0 returned 100% branch 1 taken 62% (fallthrough) branch 2 taken 38% (throw) -: 689: } 160: 690: catch(std::exception& e) call 0 returned 100% call 1 returned 100% -: 691: { 240: 692: throw TLS_Exception(Alert::BAD_CERTIFICATE, e.what()); call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 100% (fallthrough) branch 6 taken 0% call 7 returned 100% call 8 never executed -: 693: } -: 694: 132: 695: pending_state.set_expected_next(HANDSHAKE_CCS); call 0 returned 100% 132: 696: } -: 697: function _ZN5Botan3TLS6Server20process_finished_msgERNS0_22Server_Handshake_StateENS0_14Handshake_TypeERKSt6vectorIhSaIhEE called 1377 returned 100% blocks executed 48% 1377: 698:void Server::process_finished_msg(Server_Handshake_State& pending_state, -: 699: Handshake_Type type, -: 700: const std::vector& contents) -: 701: { 1377: 702: pending_state.set_expected_next(HANDSHAKE_NONE); call 0 returned 100% -: 703: 1377: 704: pending_state.client_finished(new Finished(contents)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed -: 705: 1377: 706: if(!pending_state.client_finished()->verify(pending_state, CLIENT)) call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% 3: 707: throw TLS_Exception(Alert::DECRYPT_ERROR, 9: 708: "Finished message didn't verify"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 709: 1374: 710: if(!pending_state.server_finished()) branch 0 taken 70% (fallthrough) branch 1 taken 30% -: 711: { -: 712: // already sent finished if resuming, so this is a new session -: 713: 1914: 714: pending_state.hash().update(pending_state.handshake_io().format(contents, type)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% call 3 never executed -: 715: 957: 716: Session session_info( -: 717: pending_state.server_hello()->session_id(), 957: 718: pending_state.session_keys().master_secret(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 719: pending_state.server_hello()->version(), 957: 720: pending_state.server_hello()->ciphersuite(), -: 721: SERVER, 1914: 722: pending_state.server_hello()->supports_extended_master_secret(), 957: 723: pending_state.server_hello()->supports_encrypt_then_mac(), call 0 returned 100% 1914: 724: get_peer_cert_chain(pending_state), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 1914: 725: std::vector(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2145: 726: Server_Information(pending_state.client_hello()->sni_hostname()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 24% (fallthrough) branch 7 taken 76% branch 8 taken 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed 1914: 727: pending_state.srp_identifier(), 2871: 728: pending_state.server_hello()->srtp_profile()); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% -: 729: 957: 730: if(save_session(session_info)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 731: { 957: 732: if(pending_state.server_hello()->supports_session_ticket()) call 0 returned 100% branch 1 taken 91% (fallthrough) branch 2 taken 9% -: 733: { 868: 734: try -: 735: { 2604: 736: const SymmetricKey ticket_key = m_creds.psk("tls-server", "session-ticket", ""); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) branch 12 taken 0% (fallthrough) branch 13 taken 100% branch 14 taken 0% (fallthrough) branch 15 taken 100% -: 737: 868: 738: pending_state.new_session_ticket( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 868: 739: new New_Session_Ticket(pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 868: 740: pending_state.hash(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1736: 741: session_info.encrypt(ticket_key, rng()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed 868: 742: policy().session_ticket_lifetime())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed -: 743: } =====: 744: catch(...) {} call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed -: 745: } -: 746: else 89: 747: session_manager().save(session_info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 748: } -: 749: 957: 750: if(!pending_state.new_session_ticket() && branch 0 taken 9% (fallthrough) branch 1 taken 91% 89: 751: pending_state.server_hello()->supports_session_ticket()) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 752: { #####: 753: pending_state.new_session_ticket( call 0 never executed branch 1 never executed branch 2 never executed #####: 754: new New_Session_Ticket(pending_state.handshake_io(), pending_state.hash())); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed -: 755: } -: 756: 1914: 757: pending_state.handshake_io().send(Change_Cipher_Spec()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 758: 957: 759: change_cipher_spec_writer(SERVER); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 760: 957: 761: pending_state.server_finished(new Finished(pending_state.handshake_io(), pending_state, SERVER)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed -: 762: } -: 763: 1374: 764: activate_session(); call 0 returned 100% 1374: 765: } -: 766: -: 767:/* -: 768:* Process a handshake message -: 769:*/ function _ZN5Botan3TLS6Server21process_handshake_msgEPKNS0_15Handshake_StateERS2_NS0_14Handshake_TypeERKSt6vectorIhSaIhEEb called 6656 returned 96% blocks executed 51% 6656: 770:void Server::process_handshake_msg(const Handshake_State* active_state, -: 771: Handshake_State& state_base, -: 772: Handshake_Type type, -: 773: const std::vector& contents, -: 774: bool epoch0_restart) -: 775: { 6656*: 776: Server_Handshake_State& state = dynamic_cast(state_base); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 never executed 6656: 777: state.confirm_transition_to(type); call 0 returned 100% -: 778: -: 779: /* -: 780: * The change cipher spec message isn't technically a handshake -: 781: * message so it's not included in the hash. The finished and -: 782: * certificate verify messages are verified based on the current -: 783: * state of the hash *before* this message so we delay adding them -: 784: * to the hash computation until we've processed them below. -: 785: */ 6635: 786: if(type != HANDSHAKE_CCS && type != FINISHED && type != CERTIFICATE_VERIFY) branch 0 taken 58% branch 1 taken 42% branch 2 taken 94% (fallthrough) branch 3 taken 6% -: 787: { 7276: 788: state.hash().update(state.handshake_io().format(contents, type)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 never executed -: 789: } -: 790: 6635: 791: switch(type) branch 0 taken 33% branch 1 taken 6% branch 2 taken 16% branch 3 taken 3% branch 4 taken 21% branch 5 taken 21% branch 6 taken 0% -: 792: { 2191: 793: case CLIENT_HELLO: 2191: 794: return this->process_client_hello_msg(active_state, state, contents, epoch0_restart); call 0 returned 95% -: 795: 368: 796: case CERTIFICATE: 368: 797: return this->process_certificate_msg(state, contents); call 0 returned 98% -: 798: 1079: 799: case CLIENT_KEX: 1079: 800: return this->process_client_key_exchange_msg(state, contents); call 0 returned 100% -: 801: 232: 802: case CERTIFICATE_VERIFY: 232: 803: return this->process_certificate_verify_msg(state, type, contents); call 0 returned 57% -: 804: 1388: 805: case HANDSHAKE_CCS: 1388: 806: return this->process_change_cipher_spec_msg(state); call 0 returned 100% -: 807: 1377: 808: case FINISHED: 1377: 809: return this->process_finished_msg(state, type, contents); call 0 returned 100% -: 810: #####: 811: default: #####: 812: throw Unexpected_Message("Unknown handshake message received"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 813: } -: 814: } -: 815: function _ZN5Botan3TLS6Server14session_resumeERNS0_22Server_Handshake_StateEbRNS0_7SessionE called 419 returned 100% blocks executed 47% 419: 816:void Server::session_resume(Server_Handshake_State& pending_state, -: 817: bool have_session_ticket_key, -: 818: Session& session_info) -: 819: { -: 820: // Only offer a resuming client a new ticket if they didn't send one this time, -: 821: // ie, resumed via server-side resumption. TODO: also send one if expiring soon? -: 822: 419: 823: const bool offer_new_session_ticket = 814: 824: (pending_state.client_hello()->supports_session_ticket() && call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 1% (fallthrough) branch 4 taken 99% 419: 825: pending_state.client_hello()->session_ticket().empty() && branch 0 taken 94% (fallthrough) branch 1 taken 6% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 1% (fallthrough) branch 6 taken 99% branch 7 taken 75% (fallthrough) branch 8 taken 25% call 9 never executed 419: 826: have_session_ticket_key); branch 0 taken 94% (fallthrough) branch 1 taken 6% branch 2 taken 99% (fallthrough) branch 3 taken 1% -: 827: 419: 828: pending_state.server_hello(new Server_Hello( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 419: 829: pending_state.handshake_io(), call 0 returned 100% 419: 830: pending_state.hash(), call 0 returned 100% 419: 831: policy(), call 0 returned 100% 419: 832: callbacks(), call 0 returned 100% 419: 833: rng(), call 0 returned 100% 419: 834: secure_renegotiation_data_for_server_hello(), call 0 returned 100% call 1 never executed 419: 835: *pending_state.client_hello(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 836: session_info, -: 837: offer_new_session_ticket, 419: 838: m_next_protocol)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 839: 419: 840: secure_renegotiation_check(pending_state.server_hello()); call 0 returned 100% -: 841: 419: 842: pending_state.mark_as_resumption(); 419: 843: pending_state.compute_session_keys(session_info.master_secret()); call 0 returned 100% 419: 844: pending_state.set_resume_certs(session_info.peer_certs()); call 0 returned 100% -: 845: 419: 846: if(!save_session(session_info)) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 847: { #####: 848: session_manager().remove_entry(session_info.session_id()); call 0 never executed -: 849: #####: 850: if(pending_state.server_hello()->supports_session_ticket()) // send an empty ticket call 0 never executed branch 1 never executed branch 2 never executed -: 851: { #####: 852: pending_state.new_session_ticket( call 0 never executed #####: 853: new New_Session_Ticket(pending_state.handshake_io(), call 0 never executed #####: 854: pending_state.hash())); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 855: } -: 856: } -: 857: 419: 858: if(pending_state.server_hello()->supports_session_ticket() && !pending_state.new_session_ticket()) call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 859: { 1: 860: try -: 861: { 3: 862: const SymmetricKey ticket_key = m_creds.psk("tls-server", "session-ticket", ""); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) branch 12 taken 0% (fallthrough) branch 13 taken 100% branch 14 taken 0% (fallthrough) branch 15 taken 100% -: 863: 1: 864: pending_state.new_session_ticket( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 865: new New_Session_Ticket(pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 866: pending_state.hash(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 867: session_info.encrypt(ticket_key, rng()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed 1: 868: policy().session_ticket_lifetime())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed -: 869: } =====: 870: catch(...) {} call 0 never executed call 1 never executed -: 871: 1: 872: if(!pending_state.new_session_ticket()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 873: { #####: 874: pending_state.new_session_ticket( call 0 never executed #####: 875: new New_Session_Ticket(pending_state.handshake_io(), pending_state.hash())); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 876: } -: 877: } -: 878: 838: 879: pending_state.handshake_io().send(Change_Cipher_Spec()); call 0 returned 100% call 1 returned 100% -: 880: 419: 881: change_cipher_spec_writer(SERVER); call 0 returned 100% -: 882: 419: 883: pending_state.server_finished(new Finished(pending_state.handshake_io(), pending_state, SERVER)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed 419: 884: pending_state.set_expected_next(HANDSHAKE_CCS); call 0 returned 100% 419: 885: } -: 886: function _ZN5Botan3TLS6Server14session_createERNS0_22Server_Handshake_StateEb called 1188 returned 93% blocks executed 57% 1188: 887:void Server::session_create(Server_Handshake_State& pending_state, -: 888: bool have_session_ticket_key) -: 889: { 1188: 890: std::map> cert_chains; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 891: 2376: 892: const std::string sni_hostname = pending_state.client_hello()->sni_hostname(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 893: 2375: 894: cert_chains = get_server_certs(sni_hostname, m_creds); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% -: 895: 1187: 896: if(sni_hostname != "" && cert_chains.empty()) call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% branch 3 taken 1% (fallthrough) branch 4 taken 99% -: 897: { 24: 898: cert_chains = get_server_certs("", m_creds); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 0% (fallthrough) branch 8 taken 100% -: 899: -: 900: /* -: 901: * Only send the unrecognized_name alert if we couldn't -: 902: * find any certs for the requested name but did find at -: 903: * least one cert to use in general. That avoids sending an -: 904: * unrecognized_name when a server is configured for purely -: 905: * anonymous/PSK operation. -: 906: */ 12: 907: if(!cert_chains.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 908: send_warning_alert(Alert::UNRECOGNIZED_NAME); call 0 never executed branch 1 never executed branch 2 never executed -: 909: } -: 910: 2329: 911: const uint16_t ciphersuite = choose_ciphersuite(policy(), pending_state.version(), -: 912: m_creds, cert_chains, 1187: 913: *pending_state.client_hello()); call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% (throw) -: 914: 1142: 915: Server_Hello::Settings srv_settings( 1230: 916: make_hello_random(rng(), policy()), // new session ID call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 917: pending_state.version(), -: 918: ciphersuite, 3426: 919: have_session_ticket_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 21% (fallthrough) branch 6 taken 79% -: 920: 2284: 921: pending_state.server_hello(new Server_Hello( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 1142: 922: pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1142: 923: pending_state.hash(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1142: 924: policy(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1142: 925: callbacks(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1142: 926: rng(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1184: 927: secure_renegotiation_data_for_server_hello(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 1142: 928: *pending_state.client_hello(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 929: srv_settings, 2284: 930: m_next_protocol)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed -: 931: 1142: 932: secure_renegotiation_check(pending_state.server_hello()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 933: 1142: 934: const Ciphersuite& pending_suite = pending_state.ciphersuite(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 935: 1142: 936: Private_Key* private_key = nullptr; -: 937: 1142: 938: if(pending_suite.signature_used() || pending_suite.kex_method() == Kex_Algo::STATIC_RSA) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 19% (fallthrough) branch 4 taken 81% branch 5 taken 72% (fallthrough) branch 6 taken 28% -: 939: { 1082: 940: const std::string algo_used = 3092: 941: pending_suite.signature_used() ? pending_suite.sig_algo() : "RSA"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 86% (fallthrough) branch 4 taken 14% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% (throw) -: 942: 1082*: 943: BOTAN_ASSERT(!cert_chains[algo_used].empty(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% call 5 never executed -: 944: "Attempting to send empty certificate chain"); -: 945: 2164: 946: pending_state.server_certs(new Certificate(pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 1082: 947: pending_state.hash(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1082: 948: cert_chains[algo_used])); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed -: 949: 1082: 950: if(pending_state.client_hello()->supports_cert_status_message() && pending_state.is_a_resumption() == false) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 99% (fallthrough) branch 4 taken 1% branch 5 taken 100% (fallthrough) branch 6 taken 0% -: 951: { 1068: 952: auto csr = pending_state.client_hello()->extensions().get(); call 0 returned 100% -: 953: // csr is non-null if client_hello()->supports_cert_status_message() 1068*: 954: BOTAN_ASSERT_NOMSG(csr != nullptr); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 2096: 955: const auto resp_bytes = callbacks().tls_provide_cert_status(cert_chains[algo_used], *csr); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 96% (fallthrough) branch 5 taken 4% (throw) 1028: 956: if(resp_bytes.size() > 0) branch 0 taken 8% (fallthrough) branch 1 taken 92% -: 957: { 80: 958: pending_state.server_cert_status(new Certificate_Status( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 80: 959: pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 80: 960: pending_state.hash(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 961: resp_bytes 80: 962: )); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 963: } -: 964: } -: 965: 1042: 966: private_key = m_creds.private_key_for( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 1042: 967: pending_state.server_certs()->cert_chain()[0], call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 968: "tls-server", 1042: 969: sni_hostname); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 970: 1042: 971: if(!private_key) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 972: throw Internal_Error("No private key located for associated server cert"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 973: } -: 974: 1102: 975: if(pending_suite.kex_method() == Kex_Algo::STATIC_RSA) branch 0 taken 14% (fallthrough) branch 1 taken 86% -: 976: { 154: 977: pending_state.set_server_rsa_kex_key(private_key); -: 978: } -: 979: else -: 980: { 1894: 981: pending_state.server_kex(new Server_Key_Exchange(pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 948: 982: pending_state, policy(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 948: 983: m_creds, rng(), private_key)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 1% (throw) call 6 returned 100% -: 984: } -: 985: 2200: 986: auto trusted_CAs = m_creds.trusted_certificate_authorities("tls-server", sni_hostname); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 987: 2200: 988: std::vector client_auth_CAs; call 0 returned 100% branch 1 taken 20% (fallthrough) branch 2 taken 80% -: 989: 1321: 990: for(auto store : trusted_CAs) branch 0 taken 17% (fallthrough) branch 1 taken 83% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 991: { 221: 992: auto subjects = store->all_subjects(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 221: 993: client_auth_CAs.insert(client_auth_CAs.end(), subjects.begin(), subjects.end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 994: } -: 995: 1100: 996: const bool request_cert = branch 0 taken 80% (fallthrough) branch 1 taken 20% 1979: 997: (client_auth_CAs.empty() == false) || branch 0 taken 80% (fallthrough) branch 1 taken 20% branch 2 taken 30% (fallthrough) branch 3 taken 70% 879: 998: policy().request_client_certificate_authentication(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 999: 485: 1000: if(request_cert && pending_state.ciphersuite().signature_used()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 23% (fallthrough) branch 4 taken 77% -: 1001: { 373: 1002: pending_state.cert_req( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 373: 1003: new Certificate_Req(pending_state.handshake_io(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 373: 1004: pending_state.hash(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 373: 1005: policy(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1006: client_auth_CAs, 373: 1007: pending_state.version())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed call 7 never executed -: 1008: -: 1009: /* -: 1010: SSLv3 allowed clients to skip the Certificate message entirely -: 1011: if they wanted. In TLS v1.0 and later clients must send a -: 1012: (possibly empty) Certificate message -: 1013: */ 373: 1014: pending_state.set_expected_next(CERTIFICATE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1015: } -: 1016: else -: 1017: { 727: 1018: pending_state.set_expected_next(CLIENT_KEX); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1019: } -: 1020: 1100: 1021: pending_state.server_hello_done(new Server_Hello_Done(pending_state.handshake_io(), pending_state.hash())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed 1100: 1022: } -: 1023:} -: 1024: -: 1025:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#tests#unit_tls_policy.cpp.gcov -: 0:Source:src/tests/unit_tls_policy.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/unit_tls_policy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/unit_tls_policy.gcda -: 0:Runs:1 -: 1:/* -: 2:* TLS Policy tests -: 3:* -: 4:* (C) 2016 Juraj Somorovsky -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include "tests.h" -: 10: -: 11:#if defined(BOTAN_HAS_TLS) -: 12: #include -: 13: #include -: 14:#endif -: 15: -: 16:#if defined(BOTAN_HAS_RSA) -: 17: #include -: 18:#endif -: 19: -: 20:#if defined(BOTAN_HAS_ECDH) -: 21: #include -: 22:#endif -: 23: -: 24:#if defined(BOTAN_HAS_ECDSA) -: 25: #include -: 26:#endif -: 27: -: 28:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) -: 29: #include -: 30:#endif -: 31: -: 32:#if defined(BOTAN_HAS_DSA) -: 33: #include -: 34:#endif -: 35: -: 36:namespace Botan_Tests { -: 37: -: 38:namespace { -: 39: -: 40:#if defined(BOTAN_HAS_TLS) 1: 41:class TLS_Policy_Unit_Tests final : public Test -: 42: { -: 43: public: function _ZN11Botan_Tests12_GLOBAL__N_121TLS_Policy_Unit_Tests3runEv called 1 returned 100% blocks executed 61% 1: 44: std::vector run() override -: 45: { 1: 46: std::vector results; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 47: 2: 48: results.push_back(test_peer_key_acceptable_rsa()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 49: results.push_back(test_peer_key_acceptable_ecdh()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 50: results.push_back(test_peer_key_acceptable_ecdsa()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 51: results.push_back(test_peer_key_acceptable_dh()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 52: results.push_back(test_peer_key_acceptable_dsa()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed call 5 never executed -: 53: 1: 54: return results; -: 55: } -: 56: private: -: 57: Test::Result test_peer_key_acceptable_rsa() -: 58: { -: 59: Test::Result result("TLS Policy RSA key verification"); -: 60:#if defined(BOTAN_HAS_RSA) -: 61: std::unique_ptr rsa_key_1024(new Botan::RSA_PrivateKey(Test::rng(), 1024)); -: 62: Botan::TLS::Policy policy; -: 63: -: 64: try -: 65: { -: 66: policy.check_peer_key_acceptable(*rsa_key_1024); -: 67: result.test_failure("Incorrectly accepting 1024 bit RSA keys"); -: 68: } -: 69: catch(Botan::TLS::TLS_Exception&) -: 70: { -: 71: result.test_success("Correctly rejecting 1024 bit RSA keys"); -: 72: } -: 73: -: 74: std::unique_ptr rsa_key_2048(new Botan::RSA_PrivateKey(Test::rng(), 2048)); -: 75: policy.check_peer_key_acceptable(*rsa_key_2048); -: 76: result.test_success("Correctly accepting 2048 bit RSA keys"); -: 77:#endif -: 78: return result; -: 79: } -: 80: -: 81: Test::Result test_peer_key_acceptable_ecdh() -: 82: { -: 83: Test::Result result("TLS Policy ECDH key verification"); -: 84:#if defined(BOTAN_HAS_ECDH) -: 85: Botan::EC_Group group_192("secp192r1"); -: 86: std::unique_ptr ecdh_192(new Botan::ECDH_PrivateKey(Test::rng(), group_192)); -: 87: -: 88: Botan::TLS::Policy policy; -: 89: try -: 90: { -: 91: policy.check_peer_key_acceptable(*ecdh_192); -: 92: result.test_failure("Incorrectly accepting 192 bit EC keys"); -: 93: } -: 94: catch(Botan::TLS::TLS_Exception&) -: 95: { -: 96: result.test_success("Correctly rejecting 192 bit EC keys"); -: 97: } -: 98: -: 99: Botan::EC_Group group_256("secp256r1"); -: 100: std::unique_ptr ecdh_256(new Botan::ECDH_PrivateKey(Test::rng(), group_256)); -: 101: policy.check_peer_key_acceptable(*ecdh_256); -: 102: result.test_success("Correctly accepting 256 bit EC keys"); -: 103:#endif -: 104: return result; -: 105: } -: 106: -: 107: Test::Result test_peer_key_acceptable_ecdsa() -: 108: { -: 109: Test::Result result("TLS Policy ECDSA key verification"); -: 110:#if defined(BOTAN_HAS_ECDSA) -: 111: Botan::EC_Group group_192("secp192r1"); -: 112: std::unique_ptr ecdsa_192(new Botan::ECDSA_PrivateKey(Test::rng(), group_192)); -: 113: -: 114: Botan::TLS::Policy policy; -: 115: try -: 116: { -: 117: policy.check_peer_key_acceptable(*ecdsa_192); -: 118: result.test_failure("Incorrectly accepting 192 bit EC keys"); -: 119: } -: 120: catch(Botan::TLS::TLS_Exception&) -: 121: { -: 122: result.test_success("Correctly rejecting 192 bit EC keys"); -: 123: } -: 124: -: 125: Botan::EC_Group group_256("secp256r1"); -: 126: std::unique_ptr ecdsa_256(new Botan::ECDSA_PrivateKey(Test::rng(), group_256)); -: 127: policy.check_peer_key_acceptable(*ecdsa_256); -: 128: result.test_success("Correctly accepting 256 bit EC keys"); -: 129:#endif -: 130: return result; -: 131: } -: 132: -: 133: Test::Result test_peer_key_acceptable_dh() -: 134: { -: 135: Test::Result result("TLS Policy DH key verification"); -: 136:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) -: 137: const BigInt g("2"); -: 138: const BigInt p("58458002095536094658683755258523362961421200751439456159756164191494576279467"); -: 139: const Botan::DL_Group grp(p, g); -: 140: const Botan::BigInt x("46205663093589612668746163860870963912226379131190812163519349848291472898748"); -: 141: std::unique_ptr dhkey(new Botan::DH_PrivateKey(Test::rng(), grp, x)); -: 142: -: 143: Botan::TLS::Policy policy; -: 144: try -: 145: { -: 146: policy.check_peer_key_acceptable(*dhkey); -: 147: result.test_failure("Incorrectly accepting short bit DH keys"); -: 148: } -: 149: catch(Botan::TLS::TLS_Exception&) -: 150: { -: 151: result.test_success("Correctly rejecting short bit DH keys"); -: 152: } -: 153:#endif -: 154: return result; -: 155: } -: 156: -: 157: Test::Result test_peer_key_acceptable_dsa() -: 158: { -: 159: Test::Result result("TLS Policy DSA key verification"); -: 160:#if defined(BOTAN_HAS_DSA) -: 161: const Botan::DL_Group grp_1024("modp/ietf/1024"); -: 162: std::unique_ptr dsa_1024(new Botan::DSA_PrivateKey(Test::rng(), grp_1024)); -: 163: -: 164: Botan::TLS::Policy policy; -: 165: try -: 166: { -: 167: policy.check_peer_key_acceptable(*dsa_1024); -: 168: result.test_failure("Incorrectly accepting short bit DSA keys"); -: 169: } -: 170: catch(Botan::TLS::TLS_Exception&) -: 171: { -: 172: result.test_success("Correctly rejecting short bit DSA keys"); -: 173: } -: 174: -: 175: const Botan::DL_Group grp_2048("modp/ietf/2048"); -: 176: std::unique_ptr dsa_2048(new Botan::DSA_PrivateKey(Test::rng(), grp_2048)); -: 177: policy.check_peer_key_acceptable(*dsa_2048); -: 178: result.test_success("Correctly accepting 2048 bit DSA keys"); -: 179:#endif -: 180: return result; -: 181: } -: 182: -: 183: -: 184: }; -: 185: -: 186:BOTAN_REGISTER_TEST("tls", "tls_policy", TLS_Policy_Unit_Tests); -: 187: -: 188:#endif -: 189: -: 190:} -: 191: -: 192:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#shake.h.gcov -: 0:Source:build/include/botan/shake.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash_shake.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash_shake.gcda -: 0:Runs:2947 -: 1:/* -: 2:* SHAKE hash functions -: 3:* (C) 2010,2016 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_SHAKE_HASH_H_ -: 9:#define BOTAN_SHAKE_HASH_H_ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14: -: 15:BOTAN_FUTURE_INTERNAL_HEADER(shake.h) -: 16: -: 17:namespace Botan { -: 18: -: 19:/** -: 20:* SHAKE-128 -: 21:*/ 207: 22:class BOTAN_PUBLIC_API(2,0) SHAKE_128 final : public HashFunction call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 23: { -: 24: public: -: 25: -: 26: /** -: 27: * @param output_bits the desired output size in bits -: 28: * must be a multiple of 8 -: 29: */ -: 30: explicit SHAKE_128(size_t output_bits); -: 31: function _ZNK5Botan9SHAKE_12815hash_block_sizeEv called 426 returned 100% blocks executed 100% 426: 32: size_t hash_block_size() const override { return SHAKE_128_BITRATE / 8; } function _ZNK5Botan9SHAKE_12813output_lengthEv called 10856312 returned 100% blocks executed 100% 10855688: 33: size_t output_length() const override { return m_output_bits / 8; } call 0 returned 100% -: 34: -: 35: HashFunction* clone() const override; -: 36: std::unique_ptr copy_state() const override; -: 37: std::string name() const override; -: 38: void clear() override; -: 39: -: 40: private: -: 41: void add_data(const uint8_t input[], size_t length) override; -: 42: void final_result(uint8_t out[]) override; -: 43: -: 44: static const size_t SHAKE_128_BITRATE = 1600 - 256; -: 45: -: 46: size_t m_output_bits; -: 47: secure_vector m_S; -: 48: size_t m_S_pos; -: 49: }; -: 50: -: 51:/** -: 52:* SHAKE-256 -: 53:*/ 3: 54:class BOTAN_PUBLIC_API(2,0) SHAKE_256 final : public HashFunction call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 55: { -: 56: public: -: 57: -: 58: /** -: 59: * @param output_bits the desired output size in bits -: 60: * must be a multiple of 8 -: 61: */ -: 62: explicit SHAKE_256(size_t output_bits); -: 63: function _ZNK5Botan9SHAKE_25615hash_block_sizeEv called 8 returned 100% blocks executed 100% 8: 64: size_t hash_block_size() const override { return SHAKE_256_BITRATE / 8; } function _ZNK5Botan9SHAKE_25613output_lengthEv called 21207450 returned 100% blocks executed 100% 21206824: 65: size_t output_length() const override { return m_output_bits / 8; } call 0 returned 100% -: 66: -: 67: HashFunction* clone() const override; -: 68: std::unique_ptr copy_state() const override; -: 69: std::string name() const override; -: 70: void clear() override; -: 71: -: 72: private: -: 73: void add_data(const uint8_t input[], size_t length) override; -: 74: void final_result(uint8_t out[]) override; -: 75: -: 76: static const size_t SHAKE_256_BITRATE = 1600 - 512; -: 77: -: 78: size_t m_output_bits; -: 79: secure_vector m_S; -: 80: size_t m_S_pos; -: 81: }; -: 82: -: 83:} -: 84: -: 85:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#hash#md4#md4.cpp.gcov -: 0:Source:src/lib/hash/md4/md4.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash_md4.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash_md4.gcda -: 0:Runs:2947 -: 1:/* -: 2:* MD4 -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11: -: 12:namespace Botan { -: 13: function _ZNK5Botan3MD410copy_stateEv called 69 returned 100% blocks executed 80% 69: 14:std::unique_ptr MD4::copy_state() const -: 15: { 69: 16: return std::unique_ptr(new MD4(*this)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 17: } -: 18: -: 19:namespace { -: 20: function _ZN5Botan12_GLOBAL__N_13FF4ERjS1_S1_S1_jjjj called 2224 returned 100% blocks executed 100% 2224: 21:inline void FF4(uint32_t& A, uint32_t& B, uint32_t& C, uint32_t& D, -: 22: uint32_t M0, uint32_t M1, uint32_t M2, uint32_t M3) -: 23: -: 24: { 2224: 25: A += (D ^ (B & (C ^ D))) + M0; 2224: 26: A = rotl<3>(A); -: 27: 2224: 28: D += (C ^ (A & (B ^ C))) + M1; 2224: 29: D = rotl<7>(D); -: 30: 2224: 31: C += (B ^ (D & (A ^ B))) + M2; 2224: 32: C = rotl<11>(C); -: 33: 2224: 34: B += (A ^ (C & (D ^ A))) + M3; 2224: 35: B = rotl<19>(B); 2224: 36: } -: 37: function _ZN5Botan12_GLOBAL__N_13GG4ERjS1_S1_S1_jjjj called 2224 returned 100% blocks executed 100% 2224: 38:inline void GG4(uint32_t& A, uint32_t& B, uint32_t& C, uint32_t& D, -: 39: uint32_t M0, uint32_t M1, uint32_t M2, uint32_t M3) -: 40: -: 41: { 2224: 42: A += ((B & C) | (D & (B | C))) + M0 + 0x5A827999; 2224: 43: A = rotl<3>(A); -: 44: 2224: 45: D += ((A & B) | (C & (A | B))) + M1 + 0x5A827999; 2224: 46: D = rotl<5>(D); -: 47: 2224: 48: C += ((D & A) | (B & (D | A))) + M2 + 0x5A827999; 2224: 49: C = rotl<9>(C); -: 50: 2224: 51: B += ((C & D) | (A & (C | D))) + M3 + 0x5A827999; 2224: 52: B = rotl<13>(B); 2224: 53: } -: 54: function _ZN5Botan12_GLOBAL__N_13HH4ERjS1_S1_S1_jjjj called 2224 returned 100% blocks executed 100% 2224: 55:inline void HH4(uint32_t& A, uint32_t& B, uint32_t& C, uint32_t& D, -: 56: uint32_t M0, uint32_t M1, uint32_t M2, uint32_t M3) -: 57: -: 58: { 2224: 59: A += (B ^ C ^ D) + M0 + 0x6ED9EBA1; 2224: 60: A = rotl<3>(A); -: 61: 2224: 62: D += (A ^ B ^ C) + M1 + 0x6ED9EBA1; 2224: 63: D = rotl<9>(D); -: 64: 2224: 65: C += (A ^ B ^ D) + M2 + 0x6ED9EBA1; 2224: 66: C = rotl<11>(C); -: 67: 2224: 68: B += (A ^ C ^ D) + M3 + 0x6ED9EBA1; 2224: 69: B = rotl<15>(B); 2224: 70: } -: 71: -: 72:} -: 73: -: 74:/* -: 75:* MD4 Compression Function -: 76:*/ function _ZN5Botan3MD410compress_nEPKhm called 556 returned 100% blocks executed 100% 556: 77:void MD4::compress_n(const uint8_t input[], size_t blocks) -: 78: { 556: 79: uint32_t A = m_digest[0], B = m_digest[1], C = m_digest[2], D = m_digest[3]; -: 80: 1112: 81: for(size_t i = 0; i != blocks; ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 82: { 556: 83: uint32_t M00 = load_le(input, 0); call 0 returned 100% 556: 84: uint32_t M01 = load_le(input, 1); 556: 85: uint32_t M02 = load_le(input, 2); 556: 86: uint32_t M03 = load_le(input, 3); 556: 87: uint32_t M04 = load_le(input, 4); 556: 88: uint32_t M05 = load_le(input, 5); 556: 89: uint32_t M06 = load_le(input, 6); 556: 90: uint32_t M07 = load_le(input, 7); 556: 91: uint32_t M08 = load_le(input, 8); 556: 92: uint32_t M09 = load_le(input, 9); 556: 93: uint32_t M10 = load_le(input, 10); 556: 94: uint32_t M11 = load_le(input, 11); 556: 95: uint32_t M12 = load_le(input, 12); 556: 96: uint32_t M13 = load_le(input, 13); 556: 97: uint32_t M14 = load_le(input, 14); 556: 98: uint32_t M15 = load_le(input, 15); -: 99: 556: 100: FF4(A, B, C, D, M00, M01, M02, M03); call 0 returned 100% 556: 101: FF4(A, B, C, D, M04, M05, M06, M07); call 0 returned 100% 556: 102: FF4(A, B, C, D, M08, M09, M10, M11); call 0 returned 100% 556: 103: FF4(A, B, C, D, M12, M13, M14, M15); call 0 returned 100% -: 104: 556: 105: GG4(A, B, C, D, M00, M04, M08, M12); call 0 returned 100% 556: 106: GG4(A, B, C, D, M01, M05, M09, M13); call 0 returned 100% 556: 107: GG4(A, B, C, D, M02, M06, M10, M14); call 0 returned 100% 556: 108: GG4(A, B, C, D, M03, M07, M11, M15); call 0 returned 100% -: 109: 556: 110: HH4(A, B, C, D, M00, M08, M04, M12); call 0 returned 100% 556: 111: HH4(A, B, C, D, M02, M10, M06, M14); call 0 returned 100% 556: 112: HH4(A, B, C, D, M01, M09, M05, M13); call 0 returned 100% 556: 113: HH4(A, B, C, D, M03, M11, M07, M15); call 0 returned 100% -: 114: 556: 115: A = (m_digest[0] += A); 556: 116: B = (m_digest[1] += B); 556: 117: C = (m_digest[2] += C); 556: 118: D = (m_digest[3] += D); -: 119: 556: 120: input += hash_block_size(); -: 121: } 556: 122: } -: 123: -: 124:/* -: 125:* Copy out the digest -: 126:*/ function _ZN5Botan3MD48copy_outEPh called 460 returned 100% blocks executed 100% 460: 127:void MD4::copy_out(uint8_t output[]) -: 128: { 460: 129: copy_out_vec_le(output, output_length(), m_digest); call 0 returned 100% 460: 130: } -: 131: -: 132:/* -: 133:* Clear memory of sensitive data -: 134:*/ function _ZN5Botan3MD45clearEv called 775 returned 100% blocks executed 100% 775: 135:void MD4::clear() -: 136: { 775: 137: MDx_HashFunction::clear(); call 0 returned 100% 775: 138: m_digest[0] = 0x67452301; 775: 139: m_digest[1] = 0xEFCDAB89; 775: 140: m_digest[2] = 0x98BADCFE; 775: 141: m_digest[3] = 0x10325476; 775: 142: } -: 143: -: 144:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#regex_executor.h.gcov -: 0:Source:/usr/include/c++/9/bits/regex_executor.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcda -: 0:Runs:2947 -: 1:// class template regex -*- C++ -*- -: 2: -: 3:// Copyright (C) 2013-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/** -: 26: * @file bits/regex_executor.h -: 27: * This is an internal header file, included by other library headers. -: 28: * Do not attempt to use it directly. @headername{regex} -: 29: */ -: 30: -: 31:// FIXME convert comments to doxygen format. -: 32: -: 33:namespace std _GLIBCXX_VISIBILITY(default) -: 34:{ -: 35:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 36: -: 37:namespace __detail -: 38:{ -: 39: /** -: 40: * @addtogroup regex-detail -: 41: * @{ -: 42: */ -: 43: -: 44: /** -: 45: * @brief Takes a regex and an input string and does the matching. -: 46: * -: 47: * The %_Executor class has two modes: DFS mode and BFS mode, controlled -: 48: * by the template parameter %__dfs_mode. -: 49: */ -: 50: template -: 52: class _Executor -: 53: { -: 54: using __search_mode = integral_constant; -: 55: using __dfs = true_type; -: 56: using __bfs = false_type; -: 57: -: 58: enum class _Match_mode : unsigned char { _Exact, _Prefix }; -: 59: -: 60: public: -: 61: typedef typename iterator_traits<_BiIter>::value_type _CharT; -: 62: typedef basic_regex<_CharT, _TraitsT> _RegexT; -: 63: typedef std::vector, _Alloc> _ResultsVec; -: 64: typedef regex_constants::match_flag_type _FlagT; -: 65: typedef typename _TraitsT::char_class_type _ClassT; -: 66: typedef _NFA<_TraitsT> _NFAT; -: 67: -: 68: public: 5*: 69: _Executor(_BiIter __begin, -: 70: _BiIter __end, -: 71: _ResultsVec& __results, -: 72: const _RegexT& __re, -: 73: _FlagT __flags) -: 74: : _M_begin(__begin), -: 75: _M_end(__end), -: 76: _M_re(__re), 5*: 77: _M_nfa(*__re._M_automaton), -: 78: _M_results(__results), -: 79: _M_rep_count(_M_nfa.size()), 5*: 80: _M_states(_M_nfa._M_start(), _M_nfa.size()), 5*: 81: _M_flags((__flags & regex_constants::match_prev_avail) -: 82: ? (__flags -: 83: & ~regex_constants::match_not_bol #####: 84: & ~regex_constants::match_not_bow) 5*: 85: : __flags) 5*: 86: { } ------------------ _ZNSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb1EEC2ES2_S2_RSt6vectorIS5_S6_ERKNS3_11basic_regexIcS8_EENSt15regex_constants15match_flag_typeE: function _ZNSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb1EEC2ES2_S2_RSt6vectorIS5_S6_ERKNS3_11basic_regexIcS8_EENSt15regex_constants15match_flag_typeE called 5 returned 100% blocks executed 50% 5: 69: _Executor(_BiIter __begin, -: 70: _BiIter __end, -: 71: _ResultsVec& __results, -: 72: const _RegexT& __re, -: 73: _FlagT __flags) -: 74: : _M_begin(__begin), -: 75: _M_end(__end), -: 76: _M_re(__re), 5: 77: _M_nfa(*__re._M_automaton), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 78: _M_results(__results), -: 79: _M_rep_count(_M_nfa.size()), 5: 80: _M_states(_M_nfa._M_start(), _M_nfa.size()), 5: 81: _M_flags((__flags & regex_constants::match_prev_avail) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 82: ? (__flags -: 83: & ~regex_constants::match_not_bol #####: 84: & ~regex_constants::match_not_bow) 5: 85: : __flags) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 5: 86: { } ------------------ _ZNSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb0EEC2ES2_S2_RSt6vectorIS5_S6_ERKNS3_11basic_regexIcS8_EENSt15regex_constants15match_flag_typeE: function _ZNSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb0EEC2ES2_S2_RSt6vectorIS5_S6_ERKNS3_11basic_regexIcS8_EENSt15regex_constants15match_flag_typeE called 0 returned 0% blocks executed 0% #####: 69: _Executor(_BiIter __begin, -: 70: _BiIter __end, -: 71: _ResultsVec& __results, -: 72: const _RegexT& __re, -: 73: _FlagT __flags) -: 74: : _M_begin(__begin), -: 75: _M_end(__end), -: 76: _M_re(__re), #####: 77: _M_nfa(*__re._M_automaton), call 0 never executed branch 1 never executed branch 2 never executed -: 78: _M_results(__results), -: 79: _M_rep_count(_M_nfa.size()), #####: 80: _M_states(_M_nfa._M_start(), _M_nfa.size()), #####: 81: _M_flags((__flags & regex_constants::match_prev_avail) -: 82: ? (__flags -: 83: & ~regex_constants::match_not_bol #####: 84: & ~regex_constants::match_not_bow) #####: 85: : __flags) call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed #####: 86: { } ------------------ -: 87: -: 88: // Set matched when string exactly matches the pattern. -: 89: bool 5*: 90: _M_match() -: 91: { 5*: 92: _M_current = _M_begin; 5*: 93: return _M_main(_Match_mode::_Exact); call 0 never executed call 1 returned 100% -: 94: } -: 95: -: 96: // Set matched when some prefix of the string matches the pattern. -: 97: bool #####: 98: _M_search_from_first() -: 99: { #####: 100: _M_current = _M_begin; #####: 101: return _M_main(_Match_mode::_Prefix); branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 102: } -: 103: -: 104: bool -: 105: _M_search(); -: 106: -: 107: private: -: 108: void -: 109: _M_rep_once_more(_Match_mode __match_mode, _StateIdT); -: 110: -: 111: void -: 112: _M_handle_repeat(_Match_mode, _StateIdT); -: 113: -: 114: void -: 115: _M_handle_subexpr_begin(_Match_mode, _StateIdT); -: 116: -: 117: void -: 118: _M_handle_subexpr_end(_Match_mode, _StateIdT); -: 119: -: 120: void -: 121: _M_handle_line_begin_assertion(_Match_mode, _StateIdT); -: 122: -: 123: void -: 124: _M_handle_line_end_assertion(_Match_mode, _StateIdT); -: 125: -: 126: void -: 127: _M_handle_word_boundary(_Match_mode, _StateIdT); -: 128: -: 129: void -: 130: _M_handle_subexpr_lookahead(_Match_mode, _StateIdT); -: 131: -: 132: void -: 133: _M_handle_match(_Match_mode, _StateIdT); -: 134: -: 135: void -: 136: _M_handle_backref(_Match_mode, _StateIdT); -: 137: -: 138: void -: 139: _M_handle_accept(_Match_mode, _StateIdT); -: 140: -: 141: void -: 142: _M_handle_alternative(_Match_mode, _StateIdT); -: 143: -: 144: void -: 145: _M_dfs(_Match_mode __match_mode, _StateIdT __start); -: 146: -: 147: bool 5*: 148: _M_main(_Match_mode __match_mode) 5*: 149: { return _M_main_dispatch(__match_mode, __search_mode{}); } call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) -: 150: -: 151: bool -: 152: _M_main_dispatch(_Match_mode __match_mode, __dfs); -: 153: -: 154: bool -: 155: _M_main_dispatch(_Match_mode __match_mode, __bfs); -: 156: -: 157: bool #####: 158: _M_is_word(_CharT __ch) const -: 159: { -: 160: static const _CharT __s[2] = { 'w' }; #####: 161: return _M_re._M_automaton->_M_traits.isctype #####: 162: (__ch, _M_re._M_automaton->_M_traits.lookup_classname(__s, __s+1)); -: 163: } ------------------ _ZNKSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb1EE10_M_is_wordEc: function _ZNKSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb1EE10_M_is_wordEc called 0 returned 0% blocks executed 0% #####: 158: _M_is_word(_CharT __ch) const -: 159: { -: 160: static const _CharT __s[2] = { 'w' }; #####: 161: return _M_re._M_automaton->_M_traits.isctype call 0 never executed #####: 162: (__ch, _M_re._M_automaton->_M_traits.lookup_classname(__s, __s+1)); call 0 never executed call 1 never executed -: 163: } ------------------ _ZNKSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb0EE10_M_is_wordEc: function _ZNKSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb0EE10_M_is_wordEc called 0 returned 0% blocks executed 0% #####: 158: _M_is_word(_CharT __ch) const -: 159: { -: 160: static const _CharT __s[2] = { 'w' }; #####: 161: return _M_re._M_automaton->_M_traits.isctype call 0 never executed #####: 162: (__ch, _M_re._M_automaton->_M_traits.lookup_classname(__s, __s+1)); call 0 never executed call 1 never executed -: 163: } ------------------ -: 164: -: 165: bool 5*: 166: _M_at_begin() const -: 167: { 5*: 168: return _M_current == _M_begin 5*: 169: && !(_M_flags & (regex_constants::match_not_bol branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed -: 170: | regex_constants::match_prev_avail)); -: 171: } -: 172: -: 173: bool 10*: 174: _M_at_end() const -: 175: { 10*: 176: return _M_current == _M_end 10*: 177: && !(_M_flags & regex_constants::match_not_eol); branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed -: 178: } -: 179: -: 180: bool -: 181: _M_word_boundary() const; -: 182: -: 183: bool -: 184: _M_lookahead(_StateIdT __next); -: 185: -: 186: // Holds additional information used in BFS-mode. -: 187: template -: 188: struct _State_info; -: 189: -: 190: template -: 191: struct _State_info<__bfs, _ResultsVec> -: 192: { -: 193: explicit function _ZNSt8__detail9_ExecutorIPKcSaINSt7__cxx119sub_matchIS2_EEENS3_12regex_traitsIcEELb0EE11_State_infoISt17integral_constantIbLb0EESt6vectorIS5_S6_EEC2Elm called 0 returned 0% blocks executed 0% #####: 194: _State_info(_StateIdT __start, size_t __n) #####: 195: : _M_visited_states(new bool[__n]()), _M_start(__start) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 196: { } -: 197: #####: 198: bool _M_visited(_StateIdT __i) -: 199: { #####: 200: if (_M_visited_states[__i]) branch 0 never executed branch 1 never executed -: 201: return true; #####: 202: _M_visited_states[__i] = true; branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed -: 203: return false; -: 204: } -: 205: #####: 206: void _M_queue(_StateIdT __i, const _ResultsVec& __res) #####: 207: { _M_match_queue.emplace_back(__i, __res); } call 0 never executed call 1 never executed -: 208: -: 209: // Dummy implementations for BFS mode. -: 210: _BiIter* _M_get_sol_pos() { return nullptr; } -: 211: -: 212: // Saves states that need to be considered for the next character. -: 213: vector> _M_match_queue; -: 214: // Indicates which states are already visited. -: 215: unique_ptr _M_visited_states; -: 216: // To record current solution. -: 217: _StateIdT _M_start; -: 218: }; -: 219: -: 220: template -: 221: struct _State_info<__dfs, _ResultsVec> -: 222: { -: 223: explicit 5: 224: _State_info(_StateIdT __start, size_t) : _M_start(__start) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 225: { } -: 226: -: 227: // Dummy implementations for DFS mode. 445: 228: bool _M_visited(_StateIdT) const { return false; } branch 0 taken 23% branch 1 taken 7% branch 2 taken 13% branch 3 taken 1% branch 4 taken 2% branch 5 taken 0% branch 6 taken 0% branch 7 taken 48% branch 8 taken 0% branch 9 taken 1% branch 10 taken 4% branch 11 taken 0% -: 229: void _M_queue(_StateIdT, const _ResultsVec&) { } -: 230: #####: 231: _BiIter* _M_get_sol_pos() { return &_M_sol_pos; } branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 232: -: 233: // To record current solution. -: 234: _StateIdT _M_start; -: 235: _BiIter _M_sol_pos; -: 236: }; -: 237: -: 238: public: -: 239: _ResultsVec _M_cur_results; -: 240: _BiIter _M_current; -: 241: _BiIter _M_begin; -: 242: const _BiIter _M_end; -: 243: const _RegexT& _M_re; -: 244: const _NFAT& _M_nfa; -: 245: _ResultsVec& _M_results; -: 246: vector> _M_rep_count; -: 247: _State_info<__search_mode, _ResultsVec> _M_states; -: 248: _FlagT _M_flags; -: 249: // Do we have a solution so far? -: 250: bool _M_has_sol; -: 251: }; -: 252: -: 253: //@} regex-detail -: 254:} // namespace __detail -: 255:_GLIBCXX_END_NAMESPACE_VERSION -: 256:} // namespace std -: 257: -: 258:#include <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#ecc_p521.cpp.gcov -: 0:Source:src/fuzzer/ecc_p521.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/ecc_p521.gcno -: 0:Data:- -: 0:Runs:0 -: 1:/* -: 2:* (C) 2015,2016 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6:#include "fuzzers.h" -: 7:#include "ecc_helper.h" -: 8: function _Z4fuzzPKhm called 0 returned 0% blocks executed 0% #####: 9:void fuzz(const uint8_t in[], size_t len) -: 10: { #####: 11: if(len > 2*(521+7)/8) branch 0 never executed branch 1 never executed -: 12: return; #####: 13: static Botan::EC_Group p521("secp521r1"); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed branch 9 never executed branch 10 never executed call 11 never executed call 12 never executed branch 13 never executed branch 14 never executed call 15 never executed #####: 14: return check_ecc_math(p521, in, len); call 0 never executed -: 15: } <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#block#noekeon#noekeon_simd#noekeon_simd.cpp.gcov -: 0:Source:src/lib/block/noekeon/noekeon_simd/noekeon_simd.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/block_noekeon_simd.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/block_noekeon_simd.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Noekeon in SIMD -: 3:* (C) 2010 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10: -: 11:namespace Botan { -: 12: -: 13:/* -: 14:* Noekeon's Theta Operation -: 15:*/ -: 16:#define NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3) \ -: 17: do { \ -: 18: SIMD_4x32 T = A0 ^ A2; \ -: 19: T ^= T.rotl<8>() ^ T.rotr<8>(); \ -: 20: A1 ^= T; \ -: 21: A3 ^= T; \ -: 22: \ -: 23: A0 ^= K0; \ -: 24: A1 ^= K1; \ -: 25: A2 ^= K2; \ -: 26: A3 ^= K3; \ -: 27: \ -: 28: T = A1 ^ A3; \ -: 29: T ^= T.rotl<8>() ^ T.rotr<8>(); \ -: 30: A0 ^= T; \ -: 31: A2 ^= T; \ -: 32: } while(0) -: 33: -: 34:/* -: 35:* Noekeon's Gamma S-Box Layer -: 36:*/ -: 37:#define NOK_SIMD_GAMMA(A0, A1, A2, A3) \ -: 38: do \ -: 39: { \ -: 40: A1 ^= A3.andc(~A2); \ -: 41: A0 ^= A2 & A1; \ -: 42: \ -: 43: SIMD_4x32 T = A3; \ -: 44: A3 = A0; \ -: 45: A0 = T; \ -: 46: \ -: 47: A2 ^= A0 ^ A1 ^ A3; \ -: 48: \ -: 49: A1 ^= A3.andc(~A2); \ -: 50: A0 ^= A2 & A1; \ -: 51: } while(0) -: 52: -: 53:/* -: 54:* Noekeon Encryption -: 55:*/ function _ZNK5Botan7Noekeon14simd_encrypt_4EPKhPh called 3582 returned 100% blocks executed 100% 3582: 56:void Noekeon::simd_encrypt_4(const uint8_t in[], uint8_t out[]) const -: 57: { 3582: 58: const SIMD_4x32 K0 = SIMD_4x32::splat(m_EK[0]); call 0 returned 100% 3582: 59: const SIMD_4x32 K1 = SIMD_4x32::splat(m_EK[1]); 3582: 60: const SIMD_4x32 K2 = SIMD_4x32::splat(m_EK[2]); 3582: 61: const SIMD_4x32 K3 = SIMD_4x32::splat(m_EK[3]); -: 62: 3582: 63: SIMD_4x32 A0 = SIMD_4x32::load_be(in ); call 0 returned 100% 3582: 64: SIMD_4x32 A1 = SIMD_4x32::load_be(in + 16); call 0 returned 100% 3582: 65: SIMD_4x32 A2 = SIMD_4x32::load_be(in + 32); call 0 returned 100% 3582: 66: SIMD_4x32 A3 = SIMD_4x32::load_be(in + 48); call 0 returned 100% -: 67: 3582: 68: SIMD_4x32::transpose(A0, A1, A2, A3); call 0 returned 100% -: 69: 60894: 70: for(size_t i = 0; i != 16; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 71: { 57312: 72: A0 ^= SIMD_4x32::splat(RC[i]); call 0 returned 100% -: 73: 229248: 74: NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 75: 57312: 76: A1 = A1.rotl<1>(); call 0 returned 100% 57312: 77: A2 = A2.rotl<5>(); call 0 returned 100% 57312: 78: A3 = A3.rotl<2>(); call 0 returned 100% -: 79: 57312: 80: NOK_SIMD_GAMMA(A0, A1, A2, A3); call 0 returned 100% call 1 returned 100% call 2 returned 100% -: 81: 57312: 82: A1 = A1.rotr<1>(); call 0 returned 100% 57312: 83: A2 = A2.rotr<5>(); call 0 returned 100% 114624: 84: A3 = A3.rotr<2>(); call 0 returned 100% -: 85: } -: 86: 3582: 87: A0 ^= SIMD_4x32::splat(RC[16]); call 0 returned 100% 14328: 88: NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 89: 3582: 90: SIMD_4x32::transpose(A0, A1, A2, A3); call 0 returned 100% -: 91: 3582: 92: A0.store_be(out); call 0 returned 100% 3582: 93: A1.store_be(out + 16); call 0 returned 100% 3582: 94: A2.store_be(out + 32); call 0 returned 100% 3582: 95: A3.store_be(out + 48); call 0 returned 100% 3582: 96: } -: 97: -: 98:/* -: 99:* Noekeon Encryption -: 100:*/ function _ZNK5Botan7Noekeon14simd_decrypt_4EPKhPh called 616 returned 100% blocks executed 100% 616: 101:void Noekeon::simd_decrypt_4(const uint8_t in[], uint8_t out[]) const -: 102: { 616: 103: const SIMD_4x32 K0 = SIMD_4x32::splat(m_DK[0]); call 0 returned 100% 616: 104: const SIMD_4x32 K1 = SIMD_4x32::splat(m_DK[1]); 616: 105: const SIMD_4x32 K2 = SIMD_4x32::splat(m_DK[2]); 616: 106: const SIMD_4x32 K3 = SIMD_4x32::splat(m_DK[3]); -: 107: 616: 108: SIMD_4x32 A0 = SIMD_4x32::load_be(in ); call 0 returned 100% 616: 109: SIMD_4x32 A1 = SIMD_4x32::load_be(in + 16); call 0 returned 100% 616: 110: SIMD_4x32 A2 = SIMD_4x32::load_be(in + 32); call 0 returned 100% 616: 111: SIMD_4x32 A3 = SIMD_4x32::load_be(in + 48); call 0 returned 100% -: 112: 616: 113: SIMD_4x32::transpose(A0, A1, A2, A3); call 0 returned 100% -: 114: 10472: 115: for(size_t i = 0; i != 16; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 116: { 39424: 117: NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 118: 9856: 119: A0 ^= SIMD_4x32::splat(RC[16-i]); call 0 returned 100% -: 120: 9856: 121: A1 = A1.rotl<1>(); call 0 returned 100% 9856: 122: A2 = A2.rotl<5>(); call 0 returned 100% 9856: 123: A3 = A3.rotl<2>(); call 0 returned 100% -: 124: 9856: 125: NOK_SIMD_GAMMA(A0, A1, A2, A3); call 0 returned 100% call 1 returned 100% call 2 returned 100% -: 126: 9856: 127: A1 = A1.rotr<1>(); call 0 returned 100% 9856: 128: A2 = A2.rotr<5>(); call 0 returned 100% 19712: 129: A3 = A3.rotr<2>(); call 0 returned 100% -: 130: } -: 131: 2464: 132: NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% 616: 133: A0 ^= SIMD_4x32::splat(RC[0]); call 0 returned 100% -: 134: 616: 135: SIMD_4x32::transpose(A0, A1, A2, A3); call 0 returned 100% -: 136: 616: 137: A0.store_be(out); call 0 returned 100% 616: 138: A1.store_be(out + 16); call 0 returned 100% 616: 139: A2.store_be(out + 32); call 0 returned 100% 616: 140: A3.store_be(out + 48); call 0 returned 100% 616: 141: } -: 142: -: 143:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#executor_op.hpp.gcov -: 0:Source:/usr/include/boost/asio/detail/executor_op.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// detail/executor_op.hpp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_DETAIL_EXECUTOR_OP_HPP -: 12:#define BOOST_ASIO_DETAIL_EXECUTOR_OP_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22:#include -: 23: -: 24:#include -: 25: -: 26:namespace boost { -: 27:namespace asio { -: 28:namespace detail { -: 29: -: 30:template #####: 32:class executor_op : public Operation -: 33:{ -: 34:public: function _ZN5boost4asio6detail11executor_opINS0_8executor8functionESaIvENS1_19scheduler_operationEE3ptr5resetEv called 0 returned 0% blocks executed 0% #####: 35: BOOST_ASIO_DEFINE_HANDLER_ALLOCATOR_PTR(executor_op); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed call 11 never executed call 12 never executed branch 13 never executed branch 14 never executed call 15 never executed call 16 never executed branch 17 never executed branch 18 never executed call 19 never executed call 20 never executed -: 36: -: 37: template #####: 38: executor_op(BOOST_ASIO_MOVE_ARG(H) h, const Alloc& allocator) -: 39: : Operation(&executor_op::do_complete), -: 40: handler_(BOOST_ASIO_MOVE_CAST(H)(h)), #####: 41: allocator_(allocator) call 0 never executed call 1 never executed call 2 never executed -: 42: { -: 43: } -: 44: function _ZN5boost4asio6detail11executor_opINS0_8executor8functionESaIvENS1_19scheduler_operationEE11do_completeEPvPS6_RKNS_6system10error_codeEm called 0 returned 0% blocks executed 0% #####: 45: static void do_complete(void* owner, Operation* base, -: 46: const boost::system::error_code& /*ec*/, -: 47: std::size_t /*bytes_transferred*/) -: 48: { -: 49: // Take ownership of the handler object. #####: 50: executor_op* o(static_cast(base)); call 0 never executed -: 51: Alloc allocator(o->allocator_); #####: 52: ptr p = { detail::addressof(allocator), o, o }; -: 53: -: 54: BOOST_ASIO_HANDLER_COMPLETION((*o)); -: 55: -: 56: // Make a copy of the handler so that the memory can be deallocated before -: 57: // the upcall is made. Even if we're not about to make an upcall, a -: 58: // sub-object of the handler may be the true owner of the memory associated -: 59: // with the handler. Consequently, a local copy of the handler is required -: 60: // to ensure that any owning sub-object remains valid until after we have -: 61: // deallocated the memory here. #####: 62: Handler handler(BOOST_ASIO_MOVE_CAST(Handler)(o->handler_)); call 0 never executed call 1 never executed #####: 63: p.reset(); call 0 never executed -: 64: -: 65: // Make the upcall if required. #####: 66: if (owner) branch 0 never executed branch 1 never executed -: 67: { #####: 68: fenced_block b(fenced_block::half); -: 69: BOOST_ASIO_HANDLER_INVOCATION_BEGIN(()); #####: 70: boost_asio_handler_invoke_helpers::invoke(handler, handler); branch 0 never executed branch 1 never executed -: 71: BOOST_ASIO_HANDLER_INVOCATION_END; -: 72: } #####: 73: } -: 74: -: 75:private: -: 76: Handler handler_; -: 77: Alloc allocator_; -: 78:}; -: 79: -: 80:} // namespace detail -: 81:} // namespace asio -: 82:} // namespace boost -: 83: -: 84:#include -: 85: -: 86:#endif // BOOST_ASIO_DETAIL_EXECUTOR_OP_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#unique_lock.h.gcov -: 0:Source:/usr/include/c++/9/bits/unique_lock.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_thread_utils_thread_pool.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_thread_utils_thread_pool.gcda -: 0:Runs:2947 -: 1:// std::unique_lock implementation -*- C++ -*- -: 2: -: 3:// Copyright (C) 2008-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/** @file bits/unique_lock.h -: 26: * This is an internal header file, included by other library headers. -: 27: * Do not attempt to use it directly. @headername{mutex} -: 28: */ -: 29: -: 30:#ifndef _GLIBCXX_UNIQUE_LOCK_H -: 31:#define _GLIBCXX_UNIQUE_LOCK_H 1 -: 32: -: 33:#pragma GCC system_header -: 34: -: 35:#if __cplusplus < 201103L -: 36:# include -: 37:#else -: 38: -: 39:#include -: 40:#include // for std::swap -: 41: -: 42:namespace std _GLIBCXX_VISIBILITY(default) -: 43:{ -: 44:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 45: -: 46: /** -: 47: * @ingroup mutexes -: 48: * @{ -: 49: */ -: 50: -: 51: /** @brief A movable scoped lock type. -: 52: * -: 53: * A unique_lock controls mutex ownership within a scope. Ownership of the -: 54: * mutex can be delayed until after construction and can be transferred -: 55: * to another unique_lock by move construction or move assignment. If a -: 56: * mutex lock is owned when the destructor runs ownership will be released. -: 57: */ -: 58: template -: 59: class unique_lock -: 60: { -: 61: public: -: 62: typedef _Mutex mutex_type; -: 63: -: 64: unique_lock() noexcept -: 65: : _M_device(0), _M_owns(false) -: 66: { } -: 67: 5404: 68: explicit unique_lock(mutex_type& __m) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 10600: 69: : _M_device(std::__addressof(__m)), _M_owns(false) -: 70: { 10600: 71: lock(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% 10600: 72: _M_owns = true; branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 3% (fallthrough) branch 3 taken 97% -: 73: } -: 74: -: 75: unique_lock(mutex_type& __m, defer_lock_t) noexcept -: 76: : _M_device(std::__addressof(__m)), _M_owns(false) -: 77: { } -: 78: -: 79: unique_lock(mutex_type& __m, try_to_lock_t) -: 80: : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) -: 81: { } -: 82: -: 83: unique_lock(mutex_type& __m, adopt_lock_t) noexcept -: 84: : _M_device(std::__addressof(__m)), _M_owns(true) -: 85: { -: 86: // XXX calling thread owns mutex -: 87: } -: 88: -: 89: template -: 90: unique_lock(mutex_type& __m, -: 91: const chrono::time_point<_Clock, _Duration>& __atime) -: 92: : _M_device(std::__addressof(__m)), -: 93: _M_owns(_M_device->try_lock_until(__atime)) -: 94: { } -: 95: -: 96: template -: 97: unique_lock(mutex_type& __m, -: 98: const chrono::duration<_Rep, _Period>& __rtime) -: 99: : _M_device(std::__addressof(__m)), -: 100: _M_owns(_M_device->try_lock_for(__rtime)) -: 101: { } -: 102: 10600*: 103: ~unique_lock() -: 104: { 10598*: 105: if (_M_owns) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 never executed branch 3 never executed branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 never executed branch 7 never executed branch 8 taken 100% (fallthrough) branch 9 taken 0% branch 10 never executed branch 11 never executed branch 12 taken 100% (fallthrough) branch 13 taken 0% 10600*: 106: unlock(); call 0 returned 100% call 1 never executed call 2 returned 100% call 3 never executed call 4 returned 100% call 5 never executed call 6 returned 100% call 7 returned 100% -: 107: } -: 108: -: 109: unique_lock(const unique_lock&) = delete; -: 110: unique_lock& operator=(const unique_lock&) = delete; -: 111: -: 112: unique_lock(unique_lock&& __u) noexcept -: 113: : _M_device(__u._M_device), _M_owns(__u._M_owns) -: 114: { -: 115: __u._M_device = 0; -: 116: __u._M_owns = false; -: 117: } -: 118: -: 119: unique_lock& operator=(unique_lock&& __u) noexcept -: 120: { -: 121: if(_M_owns) -: 122: unlock(); -: 123: -: 124: unique_lock(std::move(__u)).swap(*this); -: 125: -: 126: __u._M_device = 0; -: 127: __u._M_owns = false; -: 128: -: 129: return *this; -: 130: } -: 131: -: 132: void -: 133: lock() -: 134: { -: 135: if (!_M_device) -: 136: __throw_system_error(int(errc::operation_not_permitted)); -: 137: else if (_M_owns) -: 138: __throw_system_error(int(errc::resource_deadlock_would_occur)); -: 139: else -: 140: { -: 141: _M_device->lock(); -: 142: _M_owns = true; -: 143: } -: 144: } -: 145: -: 146: bool -: 147: try_lock() -: 148: { -: 149: if (!_M_device) -: 150: __throw_system_error(int(errc::operation_not_permitted)); -: 151: else if (_M_owns) -: 152: __throw_system_error(int(errc::resource_deadlock_would_occur)); -: 153: else -: 154: { -: 155: _M_owns = _M_device->try_lock(); -: 156: return _M_owns; -: 157: } -: 158: } -: 159: -: 160: template -: 161: bool -: 162: try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) -: 163: { -: 164: if (!_M_device) -: 165: __throw_system_error(int(errc::operation_not_permitted)); -: 166: else if (_M_owns) -: 167: __throw_system_error(int(errc::resource_deadlock_would_occur)); -: 168: else -: 169: { -: 170: _M_owns = _M_device->try_lock_until(__atime); -: 171: return _M_owns; -: 172: } -: 173: } -: 174: -: 175: template -: 176: bool -: 177: try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) -: 178: { -: 179: if (!_M_device) -: 180: __throw_system_error(int(errc::operation_not_permitted)); -: 181: else if (_M_owns) -: 182: __throw_system_error(int(errc::resource_deadlock_would_occur)); -: 183: else -: 184: { -: 185: _M_owns = _M_device->try_lock_for(__rtime); -: 186: return _M_owns; -: 187: } -: 188: } -: 189: -: 190: void -: 191: unlock() -: 192: { -: 193: if (!_M_owns) -: 194: __throw_system_error(int(errc::operation_not_permitted)); -: 195: else if (_M_device) -: 196: { -: 197: _M_device->unlock(); -: 198: _M_owns = false; -: 199: } -: 200: } -: 201: -: 202: void -: 203: swap(unique_lock& __u) noexcept -: 204: { -: 205: std::swap(_M_device, __u._M_device); -: 206: std::swap(_M_owns, __u._M_owns); -: 207: } -: 208: -: 209: mutex_type* -: 210: release() noexcept -: 211: { -: 212: mutex_type* __ret = _M_device; -: 213: _M_device = 0; -: 214: _M_owns = false; -: 215: return __ret; -: 216: } -: 217: -: 218: bool -: 219: owns_lock() const noexcept -: 220: { return _M_owns; } -: 221: -: 222: explicit operator bool() const noexcept -: 223: { return owns_lock(); } -: 224: -: 225: mutex_type* -: 226: mutex() const noexcept -: 227: { return _M_device; } -: 228: -: 229: private: -: 230: mutex_type* _M_device; -: 231: bool _M_owns; -: 232: }; -: 233: -: 234: /// Swap overload for unique_lock objects. -: 235: template -: 236: inline void -: 237: swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept -: 238: { __x.swap(__y); } -: 239: -: 240: // @} group mutexes -: 241:_GLIBCXX_END_NAMESPACE_VERSION -: 242:} // namespace -: 243: -: 244:#endif // C++11 -: 245:#endif // _GLIBCXX_UNIQUE_LOCK_H <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#stl_uninitialized.h.gcov -: 0:Source:/usr/include/c++/9/bits/stl_uninitialized.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcda -: 0:Runs:2947 -: 1:// Raw memory manipulators -*- C++ -*- -: 2: -: 3:// Copyright (C) 2001-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/* -: 26: * -: 27: * Copyright (c) 1994 -: 28: * Hewlett-Packard Company -: 29: * -: 30: * Permission to use, copy, modify, distribute and sell this software -: 31: * and its documentation for any purpose is hereby granted without fee, -: 32: * provided that the above copyright notice appear in all copies and -: 33: * that both that copyright notice and this permission notice appear -: 34: * in supporting documentation. Hewlett-Packard Company makes no -: 35: * representations about the suitability of this software for any -: 36: * purpose. It is provided "as is" without express or implied warranty. -: 37: * -: 38: * -: 39: * Copyright (c) 1996,1997 -: 40: * Silicon Graphics Computer Systems, Inc. -: 41: * -: 42: * Permission to use, copy, modify, distribute and sell this software -: 43: * and its documentation for any purpose is hereby granted without fee, -: 44: * provided that the above copyright notice appear in all copies and -: 45: * that both that copyright notice and this permission notice appear -: 46: * in supporting documentation. Silicon Graphics makes no -: 47: * representations about the suitability of this software for any -: 48: * purpose. It is provided "as is" without express or implied warranty. -: 49: */ -: 50: -: 51:/** @file bits/stl_uninitialized.h -: 52: * This is an internal header file, included by other library headers. -: 53: * Do not attempt to use it directly. @headername{memory} -: 54: */ -: 55: -: 56:#ifndef _STL_UNINITIALIZED_H -: 57:#define _STL_UNINITIALIZED_H 1 -: 58: -: 59:#if __cplusplus > 201402L -: 60:#include -: 61:#endif -: 62: -: 63:#if __cplusplus >= 201103L -: 64:#include -: 65:#endif -: 66: -: 67:namespace std _GLIBCXX_VISIBILITY(default) -: 68:{ -: 69:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 70: -: 71: template -: 72: struct __uninitialized_copy -: 73: { -: 74: template -: 75: static _ForwardIterator -: 76: __uninit_copy(_InputIterator __first, _InputIterator __last, -: 77: _ForwardIterator __result) -: 78: { -: 79: _ForwardIterator __cur = __result; -: 80: __try -: 81: { -: 82: for (; __first != __last; ++__first, (void)++__cur) -: 83: std::_Construct(std::__addressof(*__cur), *__first); -: 84: return __cur; -: 85: } -: 86: __catch(...) -: 87: { -: 88: std::_Destroy(__result, __cur); -: 89: __throw_exception_again; -: 90: } -: 91: } -: 92: }; -: 93: -: 94: template<> -: 95: struct __uninitialized_copy -: 96: { -: 97: template -: 98: static _ForwardIterator -: 99: __uninit_copy(_InputIterator __first, _InputIterator __last, -: 100: _ForwardIterator __result) -: 101: { return std::copy(__first, __last, __result); } -: 102: }; -: 103: -: 104: /** -: 105: * @brief Copies the range [first,last) into result. -: 106: * @param __first An input iterator. -: 107: * @param __last An input iterator. -: 108: * @param __result An output iterator. -: 109: * @return __result + (__first - __last) -: 110: * -: 111: * Like copy(), but does not require an initialized output range. -: 112: */ -: 113: template -: 114: inline _ForwardIterator -: 115: uninitialized_copy(_InputIterator __first, _InputIterator __last, -: 116: _ForwardIterator __result) -: 117: { -: 118: typedef typename iterator_traits<_InputIterator>::value_type -: 119: _ValueType1; -: 120: typedef typename iterator_traits<_ForwardIterator>::value_type -: 121: _ValueType2; -: 122:#if __cplusplus < 201103L -: 123: const bool __assignable = true; -: 124:#else -: 125: // Trivial types can have deleted copy constructor, but the std::copy -: 126: // optimization that uses memmove would happily "copy" them anyway. -: 127: static_assert(is_constructible<_ValueType2, decltype(*__first)>::value, -: 128: "result type must be constructible from value type of input range"); -: 129: -: 130: typedef typename iterator_traits<_InputIterator>::reference _RefType1; -: 131: typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; -: 132: // Trivial types can have deleted assignment, so using std::copy -: 133: // would be ill-formed. Require assignability before using std::copy: -: 134: const bool __assignable = is_assignable<_RefType2, _RefType1>::value; -: 135:#endif -: 136: -: 137: return std::__uninitialized_copy<__is_trivial(_ValueType1) -: 138: && __is_trivial(_ValueType2) -: 139: && __assignable>:: -: 140: __uninit_copy(__first, __last, __result); -: 141: } -: 142: -: 143: -: 144: template -: 145: struct __uninitialized_fill -: 146: { -: 147: template -: 148: static void -: 149: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, -: 150: const _Tp& __x) -: 151: { -: 152: _ForwardIterator __cur = __first; -: 153: __try -: 154: { -: 155: for (; __cur != __last; ++__cur) -: 156: std::_Construct(std::__addressof(*__cur), __x); -: 157: } -: 158: __catch(...) -: 159: { -: 160: std::_Destroy(__first, __cur); -: 161: __throw_exception_again; -: 162: } -: 163: } -: 164: }; -: 165: -: 166: template<> -: 167: struct __uninitialized_fill -: 168: { -: 169: template -: 170: static void -: 171: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, -: 172: const _Tp& __x) -: 173: { std::fill(__first, __last, __x); } -: 174: }; -: 175: -: 176: /** -: 177: * @brief Copies the value x into the range [first,last). -: 178: * @param __first An input iterator. -: 179: * @param __last An input iterator. -: 180: * @param __x The source value. -: 181: * @return Nothing. -: 182: * -: 183: * Like fill(), but does not require an initialized output range. -: 184: */ -: 185: template -: 186: inline void -: 187: uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, -: 188: const _Tp& __x) -: 189: { -: 190: typedef typename iterator_traits<_ForwardIterator>::value_type -: 191: _ValueType; -: 192:#if __cplusplus < 201103L -: 193: const bool __assignable = true; -: 194:#else -: 195: // Trivial types can have deleted copy constructor, but the std::fill -: 196: // optimization that uses memmove would happily "copy" them anyway. -: 197: static_assert(is_constructible<_ValueType, const _Tp&>::value, -: 198: "result type must be constructible from input type"); -: 199: -: 200: // Trivial types can have deleted assignment, so using std::fill -: 201: // would be ill-formed. Require assignability before using std::fill: -: 202: const bool __assignable = is_copy_assignable<_ValueType>::value; -: 203:#endif -: 204: -: 205: std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: -: 206: __uninit_fill(__first, __last, __x); -: 207: } -: 208: -: 209: -: 210: template -: 211: struct __uninitialized_fill_n -: 212: { -: 213: template -: 214: static _ForwardIterator -: 215: __uninit_fill_n(_ForwardIterator __first, _Size __n, -: 216: const _Tp& __x) -: 217: { -: 218: _ForwardIterator __cur = __first; -: 219: __try -: 220: { -: 221: for (; __n > 0; --__n, (void) ++__cur) -: 222: std::_Construct(std::__addressof(*__cur), __x); -: 223: return __cur; -: 224: } -: 225: __catch(...) -: 226: { -: 227: std::_Destroy(__first, __cur); -: 228: __throw_exception_again; -: 229: } -: 230: } -: 231: }; -: 232: -: 233: template<> -: 234: struct __uninitialized_fill_n -: 235: { -: 236: template -: 237: static _ForwardIterator -: 238: __uninit_fill_n(_ForwardIterator __first, _Size __n, -: 239: const _Tp& __x) -: 240: { return std::fill_n(__first, __n, __x); } -: 241: }; -: 242: -: 243: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 244: // DR 1339. uninitialized_fill_n should return the end of its range -: 245: /** -: 246: * @brief Copies the value x into the range [first,first+n). -: 247: * @param __first An input iterator. -: 248: * @param __n The number of copies to make. -: 249: * @param __x The source value. -: 250: * @return Nothing. -: 251: * -: 252: * Like fill_n(), but does not require an initialized output range. -: 253: */ -: 254: template -: 255: inline _ForwardIterator -: 256: uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) -: 257: { -: 258: typedef typename iterator_traits<_ForwardIterator>::value_type -: 259: _ValueType; -: 260:#if __cplusplus < 201103L -: 261: const bool __assignable = true; -: 262:#else -: 263: // Trivial types can have deleted copy constructor, but the std::fill -: 264: // optimization that uses memmove would happily "copy" them anyway. -: 265: static_assert(is_constructible<_ValueType, const _Tp&>::value, -: 266: "result type must be constructible from input type"); -: 267: -: 268: // Trivial types can have deleted assignment, so using std::fill -: 269: // would be ill-formed. Require assignability before using std::fill: -: 270: const bool __assignable = is_copy_assignable<_ValueType>::value; -: 271:#endif -: 272: return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: -: 273: __uninit_fill_n(__first, __n, __x); -: 274: } -: 275: -: 276: // Extensions: versions of uninitialized_copy, uninitialized_fill, -: 277: // and uninitialized_fill_n that take an allocator parameter. -: 278: // We dispatch back to the standard versions when we're given the -: 279: // default allocator. For nondefault allocators we do not use -: 280: // any of the POD optimizations. -: 281: -: 282: template -: 284: _ForwardIterator #####: 285: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, -: 286: _ForwardIterator __result, _Allocator& __alloc) -: 287: { 30*: 288: _ForwardIterator __cur = __result; -: 289: __try -: 290: { -: 291: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 806*: 292: for (; __first != __last; ++__first, (void)++__cur) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 taken 96% (fallthrough) branch 5 taken 4% 776*: 293: __traits::construct(__alloc, std::__addressof(*__cur), *__first); -: 294: return __cur; -: 295: } -: 296: __catch(...) -: 297: { -: 298: std::_Destroy(__result, __cur, __alloc); -: 299: __throw_exception_again; -: 300: } -: 301: } -: 302: -: 303: template -: 304: inline _ForwardIterator -: 305: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, -: 306: _ForwardIterator __result, allocator<_Tp>&) -: 307: { return std::uninitialized_copy(__first, __last, __result); } -: 308: -: 309: template -: 311: inline _ForwardIterator -: 312: __uninitialized_move_a(_InputIterator __first, _InputIterator __last, -: 313: _ForwardIterator __result, _Allocator& __alloc) -: 314: { -: 315: return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first), -: 316: _GLIBCXX_MAKE_MOVE_ITERATOR(__last), -: 317: __result, __alloc); -: 318: } -: 319: -: 320: template -: 322: inline _ForwardIterator -: 323: __uninitialized_move_if_noexcept_a(_InputIterator __first, -: 324: _InputIterator __last, -: 325: _ForwardIterator __result, -: 326: _Allocator& __alloc) -: 327: { -: 328: return std::__uninitialized_copy_a -: 329: (_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first), -: 330: _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc); -: 331: } -: 332: -: 333: template -: 334: void -: 335: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, -: 336: const _Tp& __x, _Allocator& __alloc) -: 337: { -: 338: _ForwardIterator __cur = __first; -: 339: __try -: 340: { -: 341: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; -: 342: for (; __cur != __last; ++__cur) -: 343: __traits::construct(__alloc, std::__addressof(*__cur), __x); -: 344: } -: 345: __catch(...) -: 346: { -: 347: std::_Destroy(__first, __cur, __alloc); -: 348: __throw_exception_again; -: 349: } -: 350: } -: 351: -: 352: template -: 353: inline void -: 354: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, -: 355: const _Tp& __x, allocator<_Tp2>&) -: 356: { std::uninitialized_fill(__first, __last, __x); } -: 357: -: 358: template -: 360: _ForwardIterator -: 361: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, -: 362: const _Tp& __x, _Allocator& __alloc) -: 363: { -: 364: _ForwardIterator __cur = __first; -: 365: __try -: 366: { -: 367: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; -: 368: for (; __n > 0; --__n, (void) ++__cur) -: 369: __traits::construct(__alloc, std::__addressof(*__cur), __x); -: 370: return __cur; -: 371: } -: 372: __catch(...) -: 373: { -: 374: std::_Destroy(__first, __cur, __alloc); -: 375: __throw_exception_again; -: 376: } -: 377: } -: 378: -: 379: template -: 381: inline _ForwardIterator -: 382: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, -: 383: const _Tp& __x, allocator<_Tp2>&) -: 384: { return std::uninitialized_fill_n(__first, __n, __x); } -: 385: -: 386: -: 387: // Extensions: __uninitialized_copy_move, __uninitialized_move_copy, -: 388: // __uninitialized_fill_move, __uninitialized_move_fill. -: 389: // All of these algorithms take a user-supplied allocator, which is used -: 390: // for construction and destruction. -: 391: -: 392: // __uninitialized_copy_move -: 393: // Copies [first1, last1) into [result, result + (last1 - first1)), and -: 394: // move [first2, last2) into -: 395: // [result, result + (last1 - first1) + (last2 - first2)). -: 396: template -: 398: inline _ForwardIterator -: 399: __uninitialized_copy_move(_InputIterator1 __first1, -: 400: _InputIterator1 __last1, -: 401: _InputIterator2 __first2, -: 402: _InputIterator2 __last2, -: 403: _ForwardIterator __result, -: 404: _Allocator& __alloc) -: 405: { -: 406: _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, -: 407: __result, -: 408: __alloc); -: 409: __try -: 410: { -: 411: return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); -: 412: } -: 413: __catch(...) -: 414: { -: 415: std::_Destroy(__result, __mid, __alloc); -: 416: __throw_exception_again; -: 417: } -: 418: } -: 419: -: 420: // __uninitialized_move_copy -: 421: // Moves [first1, last1) into [result, result + (last1 - first1)), and -: 422: // copies [first2, last2) into -: 423: // [result, result + (last1 - first1) + (last2 - first2)). -: 424: template -: 426: inline _ForwardIterator -: 427: __uninitialized_move_copy(_InputIterator1 __first1, -: 428: _InputIterator1 __last1, -: 429: _InputIterator2 __first2, -: 430: _InputIterator2 __last2, -: 431: _ForwardIterator __result, -: 432: _Allocator& __alloc) -: 433: { -: 434: _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, -: 435: __result, -: 436: __alloc); -: 437: __try -: 438: { -: 439: return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); -: 440: } -: 441: __catch(...) -: 442: { -: 443: std::_Destroy(__result, __mid, __alloc); -: 444: __throw_exception_again; -: 445: } -: 446: } -: 447: -: 448: // __uninitialized_fill_move -: 449: // Fills [result, mid) with x, and moves [first, last) into -: 450: // [mid, mid + (last - first)). -: 451: template -: 453: inline _ForwardIterator -: 454: __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, -: 455: const _Tp& __x, _InputIterator __first, -: 456: _InputIterator __last, _Allocator& __alloc) -: 457: { -: 458: std::__uninitialized_fill_a(__result, __mid, __x, __alloc); -: 459: __try -: 460: { -: 461: return std::__uninitialized_move_a(__first, __last, __mid, __alloc); -: 462: } -: 463: __catch(...) -: 464: { -: 465: std::_Destroy(__result, __mid, __alloc); -: 466: __throw_exception_again; -: 467: } -: 468: } -: 469: -: 470: // __uninitialized_move_fill -: 471: // Moves [first1, last1) into [first2, first2 + (last1 - first1)), and -: 472: // fills [first2 + (last1 - first1), last2) with x. -: 473: template -: 475: inline void -: 476: __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, -: 477: _ForwardIterator __first2, -: 478: _ForwardIterator __last2, const _Tp& __x, -: 479: _Allocator& __alloc) -: 480: { -: 481: _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, -: 482: __first2, -: 483: __alloc); -: 484: __try -: 485: { -: 486: std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); -: 487: } -: 488: __catch(...) -: 489: { -: 490: std::_Destroy(__first2, __mid2, __alloc); -: 491: __throw_exception_again; -: 492: } -: 493: } -: 494: -: 495:#if __cplusplus >= 201103L -: 496: // Extensions: __uninitialized_default, __uninitialized_default_n, -: 497: // __uninitialized_default_a, __uninitialized_default_n_a. -: 498: -: 499: template -: 500: struct __uninitialized_default_1 -: 501: { -: 502: template -: 503: static void -: 504: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) -: 505: { -: 506: _ForwardIterator __cur = __first; -: 507: __try -: 508: { -: 509: for (; __cur != __last; ++__cur) -: 510: std::_Construct(std::__addressof(*__cur)); -: 511: } -: 512: __catch(...) -: 513: { -: 514: std::_Destroy(__first, __cur); -: 515: __throw_exception_again; -: 516: } -: 517: } -: 518: }; -: 519: -: 520: template<> -: 521: struct __uninitialized_default_1 -: 522: { -: 523: template -: 524: static void -: 525: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) -: 526: { -: 527: typedef typename iterator_traits<_ForwardIterator>::value_type -: 528: _ValueType; -: 529: -: 530: std::fill(__first, __last, _ValueType()); -: 531: } -: 532: }; -: 533: -: 534: template -: 535: struct __uninitialized_default_n_1 -: 536: { -: 537: template -: 538: static _ForwardIterator -: 539: __uninit_default_n(_ForwardIterator __first, _Size __n) -: 540: { -: 541: _ForwardIterator __cur = __first; -: 542: __try -: 543: { -: 544: for (; __n > 0; --__n, (void) ++__cur) -: 545: std::_Construct(std::__addressof(*__cur)); -: 546: return __cur; -: 547: } -: 548: __catch(...) -: 549: { -: 550: std::_Destroy(__first, __cur); -: 551: __throw_exception_again; -: 552: } -: 553: } -: 554: }; -: 555: -: 556: template<> -: 557: struct __uninitialized_default_n_1 -: 558: { -: 559: template -: 560: static _ForwardIterator -: 561: __uninit_default_n(_ForwardIterator __first, _Size __n) -: 562: { -: 563: typedef typename iterator_traits<_ForwardIterator>::value_type -: 564: _ValueType; -: 565: -: 566: return std::fill_n(__first, __n, _ValueType()); -: 567: } -: 568: }; -: 569: -: 570: // __uninitialized_default -: 571: // Fills [first, last) with std::distance(first, last) default -: 572: // constructed value_types(s). -: 573: template -: 574: inline void -: 575: __uninitialized_default(_ForwardIterator __first, -: 576: _ForwardIterator __last) -: 577: { -: 578: typedef typename iterator_traits<_ForwardIterator>::value_type -: 579: _ValueType; -: 580: // trivial types can have deleted assignment -: 581: const bool __assignable = is_copy_assignable<_ValueType>::value; -: 582: -: 583: std::__uninitialized_default_1<__is_trivial(_ValueType) -: 584: && __assignable>:: -: 585: __uninit_default(__first, __last); -: 586: } -: 587: -: 588: // __uninitialized_default_n -: 589: // Fills [first, first + n) with n default constructed value_type(s). -: 590: template -: 591: inline _ForwardIterator -: 592: __uninitialized_default_n(_ForwardIterator __first, _Size __n) -: 593: { -: 594: typedef typename iterator_traits<_ForwardIterator>::value_type -: 595: _ValueType; -: 596: // trivial types can have deleted assignment -: 597: const bool __assignable = is_copy_assignable<_ValueType>::value; -: 598: -: 599: return __uninitialized_default_n_1<__is_trivial(_ValueType) -: 600: && __assignable>:: -: 601: __uninit_default_n(__first, __n); -: 602: } -: 603: -: 604: -: 605: // __uninitialized_default_a -: 606: // Fills [first, last) with std::distance(first, last) default -: 607: // constructed value_types(s), constructed with the allocator alloc. -: 608: template -: 609: void -: 610: __uninitialized_default_a(_ForwardIterator __first, -: 611: _ForwardIterator __last, -: 612: _Allocator& __alloc) -: 613: { -: 614: _ForwardIterator __cur = __first; -: 615: __try -: 616: { -: 617: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; -: 618: for (; __cur != __last; ++__cur) -: 619: __traits::construct(__alloc, std::__addressof(*__cur)); -: 620: } -: 621: __catch(...) -: 622: { -: 623: std::_Destroy(__first, __cur, __alloc); -: 624: __throw_exception_again; -: 625: } -: 626: } -: 627: -: 628: template -: 629: inline void -: 630: __uninitialized_default_a(_ForwardIterator __first, -: 631: _ForwardIterator __last, -: 632: allocator<_Tp>&) -: 633: { std::__uninitialized_default(__first, __last); } -: 634: -: 635: -: 636: // __uninitialized_default_n_a -: 637: // Fills [first, first + n) with n default constructed value_types(s), -: 638: // constructed with the allocator alloc. -: 639: template -: 640: _ForwardIterator -: 641: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, -: 642: _Allocator& __alloc) -: 643: { -: 644: _ForwardIterator __cur = __first; -: 645: __try -: 646: { -: 647: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; -: 648: for (; __n > 0; --__n, (void) ++__cur) -: 649: __traits::construct(__alloc, std::__addressof(*__cur)); -: 650: return __cur; -: 651: } -: 652: __catch(...) -: 653: { -: 654: std::_Destroy(__first, __cur, __alloc); -: 655: __throw_exception_again; -: 656: } -: 657: } -: 658: -: 659: template -: 660: inline _ForwardIterator -: 661: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, -: 662: allocator<_Tp>&) -: 663: { return std::__uninitialized_default_n(__first, __n); } -: 664: -: 665: template -: 666: struct __uninitialized_default_novalue_1 -: 667: { -: 668: template -: 669: static void -: 670: __uninit_default_novalue(_ForwardIterator __first, -: 671: _ForwardIterator __last) -: 672: { -: 673: _ForwardIterator __cur = __first; -: 674: __try -: 675: { -: 676: for (; __cur != __last; ++__cur) -: 677: std::_Construct_novalue(std::__addressof(*__cur)); -: 678: } -: 679: __catch(...) -: 680: { -: 681: std::_Destroy(__first, __cur); -: 682: __throw_exception_again; -: 683: } -: 684: } -: 685: }; -: 686: -: 687: template<> -: 688: struct __uninitialized_default_novalue_1 -: 689: { -: 690: template -: 691: static void -: 692: __uninit_default_novalue(_ForwardIterator __first, -: 693: _ForwardIterator __last) -: 694: { -: 695: } -: 696: }; -: 697: -: 698: template -: 699: struct __uninitialized_default_novalue_n_1 -: 700: { -: 701: template -: 702: static _ForwardIterator -: 703: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) -: 704: { -: 705: _ForwardIterator __cur = __first; -: 706: __try -: 707: { -: 708: for (; __n > 0; --__n, (void) ++__cur) -: 709: std::_Construct_novalue(std::__addressof(*__cur)); -: 710: return __cur; -: 711: } -: 712: __catch(...) -: 713: { -: 714: std::_Destroy(__first, __cur); -: 715: __throw_exception_again; -: 716: } -: 717: } -: 718: }; -: 719: -: 720: template<> -: 721: struct __uninitialized_default_novalue_n_1 -: 722: { -: 723: template -: 724: static _ForwardIterator -: 725: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) -: 726: { return std::next(__first, __n); } -: 727: }; -: 728: -: 729: // __uninitialized_default_novalue -: 730: // Fills [first, last) with std::distance(first, last) default-initialized -: 731: // value_types(s). -: 732: template -: 733: inline void -: 734: __uninitialized_default_novalue(_ForwardIterator __first, -: 735: _ForwardIterator __last) -: 736: { -: 737: typedef typename iterator_traits<_ForwardIterator>::value_type -: 738: _ValueType; -: 739: -: 740: std::__uninitialized_default_novalue_1< -: 741: is_trivially_default_constructible<_ValueType>::value>:: -: 742: __uninit_default_novalue(__first, __last); -: 743: } -: 744: -: 745: // __uninitialized_default_n -: 746: // Fills [first, first + n) with n default-initialized value_type(s). -: 747: template -: 748: inline _ForwardIterator -: 749: __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) -: 750: { -: 751: typedef typename iterator_traits<_ForwardIterator>::value_type -: 752: _ValueType; -: 753: -: 754: return __uninitialized_default_novalue_n_1< -: 755: is_trivially_default_constructible<_ValueType>::value>:: -: 756: __uninit_default_novalue_n(__first, __n); -: 757: } -: 758: -: 759: template -: 761: _ForwardIterator -: 762: __uninitialized_copy_n(_InputIterator __first, _Size __n, -: 763: _ForwardIterator __result, input_iterator_tag) -: 764: { -: 765: _ForwardIterator __cur = __result; -: 766: __try -: 767: { -: 768: for (; __n > 0; --__n, (void) ++__first, ++__cur) -: 769: std::_Construct(std::__addressof(*__cur), *__first); -: 770: return __cur; -: 771: } -: 772: __catch(...) -: 773: { -: 774: std::_Destroy(__result, __cur); -: 775: __throw_exception_again; -: 776: } -: 777: } -: 778: -: 779: template -: 781: inline _ForwardIterator -: 782: __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, -: 783: _ForwardIterator __result, -: 784: random_access_iterator_tag) -: 785: { return std::uninitialized_copy(__first, __first + __n, __result); } -: 786: -: 787: template -: 789: pair<_InputIterator, _ForwardIterator> -: 790: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, -: 791: _ForwardIterator __result, input_iterator_tag) -: 792: { -: 793: _ForwardIterator __cur = __result; -: 794: __try -: 795: { -: 796: for (; __n > 0; --__n, (void) ++__first, ++__cur) -: 797: std::_Construct(std::__addressof(*__cur), *__first); -: 798: return {__first, __cur}; -: 799: } -: 800: __catch(...) -: 801: { -: 802: std::_Destroy(__result, __cur); -: 803: __throw_exception_again; -: 804: } -: 805: } -: 806: -: 807: template -: 809: inline pair<_RandomAccessIterator, _ForwardIterator> -: 810: __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, -: 811: _ForwardIterator __result, -: 812: random_access_iterator_tag) -: 813: { -: 814: auto __second_res = uninitialized_copy(__first, __first + __n, __result); -: 815: auto __first_res = std::next(__first, __n); -: 816: return {__first_res, __second_res}; -: 817: } -: 818: -: 819: /** -: 820: * @brief Copies the range [first,first+n) into result. -: 821: * @param __first An input iterator. -: 822: * @param __n The number of elements to copy. -: 823: * @param __result An output iterator. -: 824: * @return __result + __n -: 825: * -: 826: * Like copy_n(), but does not require an initialized output range. -: 827: */ -: 828: template -: 829: inline _ForwardIterator -: 830: uninitialized_copy_n(_InputIterator __first, _Size __n, -: 831: _ForwardIterator __result) -: 832: { return std::__uninitialized_copy_n(__first, __n, __result, -: 833: std::__iterator_category(__first)); } -: 834: -: 835: template -: 836: inline pair<_InputIterator, _ForwardIterator> -: 837: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, -: 838: _ForwardIterator __result) -: 839: { -: 840: return -: 841: std::__uninitialized_copy_n_pair(__first, __n, __result, -: 842: std::__iterator_category(__first)); -: 843: } -: 844: -: 845:#endif -: 846: -: 847:#if __cplusplus >= 201703L -: 848:# define __cpp_lib_raw_memory_algorithms 201606L -: 849: -: 850: template -: 851: inline void -: 852: uninitialized_default_construct(_ForwardIterator __first, -: 853: _ForwardIterator __last) -: 854: { -: 855: __uninitialized_default_novalue(__first, __last); -: 856: } -: 857: -: 858: template -: 859: inline _ForwardIterator -: 860: uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) -: 861: { -: 862: return __uninitialized_default_novalue_n(__first, __count); -: 863: } -: 864: -: 865: template -: 866: inline void -: 867: uninitialized_value_construct(_ForwardIterator __first, -: 868: _ForwardIterator __last) -: 869: { -: 870: return __uninitialized_default(__first, __last); -: 871: } -: 872: -: 873: template -: 874: inline _ForwardIterator -: 875: uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) -: 876: { -: 877: return __uninitialized_default_n(__first, __count); -: 878: } -: 879: -: 880: template -: 881: inline _ForwardIterator -: 882: uninitialized_move(_InputIterator __first, _InputIterator __last, -: 883: _ForwardIterator __result) -: 884: { -: 885: return std::uninitialized_copy -: 886: (_GLIBCXX_MAKE_MOVE_ITERATOR(__first), -: 887: _GLIBCXX_MAKE_MOVE_ITERATOR(__last), __result); -: 888: } -: 889: -: 890: template -: 891: inline pair<_InputIterator, _ForwardIterator> -: 892: uninitialized_move_n(_InputIterator __first, _Size __count, -: 893: _ForwardIterator __result) -: 894: { -: 895: auto __res = std::__uninitialized_copy_n_pair -: 896: (_GLIBCXX_MAKE_MOVE_ITERATOR(__first), -: 897: __count, __result); -: 898: return {__res.first.base(), __res.second}; -: 899: } -: 900:#endif // C++17 -: 901: -: 902:#if __cplusplus >= 201103L -: 903: template -: 904: inline void -: 905: __relocate_object_a(_Tp* __dest, _Up* __orig, _Allocator& __alloc) -: 906: noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, -: 907: __dest, std::move(*__orig))) -: 908: && noexcept(std::allocator_traits<_Allocator>::destroy( -: 909: __alloc, std::__addressof(*__orig)))) -: 910: { -: 911: typedef std::allocator_traits<_Allocator> __traits; -: 912: __traits::construct(__alloc, __dest, std::move(*__orig)); -: 913: __traits::destroy(__alloc, std::__addressof(*__orig)); -: 914: } -: 915: -: 916: // This class may be specialized for specific types. -: 917: // Also known as is_trivially_relocatable. -: 918: template -: 919: struct __is_bitwise_relocatable -: 920: : is_trivial<_Tp> { }; -: 921: -: 922: template -: 923: inline __enable_if_t::value, _Tp*> -: 924: __relocate_a_1(_Tp* __first, _Tp* __last, -: 925: _Tp* __result, allocator<_Up>&) noexcept -: 926: { -: 927: ptrdiff_t __count = __last - __first; -: 928: if (__count > 0) -: 929: __builtin_memmove(__result, __first, __count * sizeof(_Tp)); -: 930: return __result + __count; -: 931: } -: 932: -: 933: template -: 935: inline _ForwardIterator -: 936: __relocate_a_1(_InputIterator __first, _InputIterator __last, -: 937: _ForwardIterator __result, _Allocator& __alloc) -: 938: noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), -: 939: std::addressof(*__first), -: 940: __alloc))) -: 941: { -: 942: typedef typename iterator_traits<_InputIterator>::value_type -: 943: _ValueType; -: 944: typedef typename iterator_traits<_ForwardIterator>::value_type -: 945: _ValueType2; -: 946: static_assert(std::is_same<_ValueType, _ValueType2>::value, -: 947: "relocation is only possible for values of the same type"); -: 948: _ForwardIterator __cur = __result; -: 949: for (; __first != __last; ++__first, (void)++__cur) -: 950: std::__relocate_object_a(std::__addressof(*__cur), -: 951: std::__addressof(*__first), __alloc); -: 952: return __cur; -: 953: } -: 954: -: 955: template -: 957: inline _ForwardIterator -: 958: __relocate_a(_InputIterator __first, _InputIterator __last, -: 959: _ForwardIterator __result, _Allocator& __alloc) -: 960: noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), -: 961: std::__niter_base(__last), -: 962: std::__niter_base(__result), __alloc))) -: 963: { -: 964: return __relocate_a_1(std::__niter_base(__first), -: 965: std::__niter_base(__last), -: 966: std::__niter_base(__result), __alloc); -: 967: } -: 968:#endif -: 969: -: 970:_GLIBCXX_END_NAMESPACE_VERSION -: 971:} // namespace -: 972: -: 973:#endif /* _STL_UNINITIALIZED_H */ <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#x509#x509_obj.cpp.gcov -: 0:Source:src/lib/x509/x509_obj.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/x509_obj.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/x509_obj.gcda -: 0:Runs:2947 -: 1:/* -: 2:* X.509 SIGNED Object -: 3:* (C) 1999-2007,2020 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16: -: 17:namespace Botan { -: 18: -: 19:namespace { 398: 20:struct Pss_params -: 21: { -: 22: AlgorithmIdentifier hash_algo; -: 23: AlgorithmIdentifier mask_gen_algo; -: 24: AlgorithmIdentifier mask_gen_hash; // redundant: decoded mask_gen_algo.parameters -: 25: size_t salt_len; -: 26: size_t trailer_field; -: 27: }; -: 28: function _ZN5Botan12_GLOBAL__N_117decode_pss_paramsERKSt6vectorIhSaIhEE called 398 returned 100% blocks executed 47% 398: 29:Pss_params decode_pss_params(const std::vector& encoded_pss_params) -: 30: { 796: 31: const AlgorithmIdentifier default_hash("SHA-160", AlgorithmIdentifier::USE_NULL_PARAM); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed 796: 32: const AlgorithmIdentifier default_mgf("MGF1", default_hash.BER_encode()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% call 11 never executed call 12 never executed -: 33: 398: 34: Pss_params pss_parameter; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 398: 35: BER_Decoder(encoded_pss_params) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 796: 36: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 398: 37: .decode_optional(pss_parameter.hash_algo, ASN1_Tag(0), PRIVATE, default_hash) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 398: 38: .decode_optional(pss_parameter.mask_gen_algo, ASN1_Tag(1), PRIVATE, default_mgf) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 398: 39: .decode_optional(pss_parameter.salt_len, ASN1_Tag(2), PRIVATE, size_t(20)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 796: 40: .decode_optional(pss_parameter.trailer_field, ASN1_Tag(3), PRIVATE, size_t(1)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 398: 41: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 42: 398: 43: BER_Decoder(pss_parameter.mask_gen_algo.get_parameters()).decode(pss_parameter.mask_gen_hash); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed call 8 never executed -: 44: 796: 45: return pss_parameter; call 0 returned 100% -: 46: } -: 47:} -: 48: -: 49:/* -: 50:* Read a PEM or BER X.509 object -: 51:*/ function _ZN5Botan11X509_Object9load_dataERNS_10DataSourceE called 20977 returned 57% blocks executed 64% 20977: 52:void X509_Object::load_data(DataSource& in) -: 53: { 20977: 54: try { 46065: 55: if(ASN1::maybe_BER(in) && !PEM_Code::matches(in)) call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% (throw) branch 3 taken 80% (fallthrough) branch 4 taken 20% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% (throw) branch 11 taken 1% (fallthrough) branch 12 taken 100% branch 13 taken 80% (fallthrough) branch 14 taken 20% branch 15 taken 80% (fallthrough) branch 16 taken 20% branch 17 taken 15% (fallthrough) branch 18 taken 85% -: 56: { 32872: 57: BER_Decoder dec(in); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% 16436: 58: decode_from(dec); call 0 returned 100% branch 1 taken 56% (fallthrough) branch 2 taken 44% (throw) -: 59: } -: 60: else -: 61: { 8270: 62: std::string got_label; call 0 returned 100% branch 1 taken 70% (fallthrough) branch 2 taken 30% (throw) 9933: 63: DataSource_Memory ber(PEM_Code::decode(in, got_label)); call 0 returned 100% branch 1 taken 70% (fallthrough) branch 2 taken 30% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 1% branch 5 taken 1% (fallthrough) branch 6 taken 100% branch 7 taken 2% (fallthrough) branch 8 taken 98% -: 64: 2910: 65: if(got_label != PEM_label()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 1% (fallthrough) branch 4 taken 100% branch 5 taken 2% (fallthrough) branch 6 taken 98% -: 66: { 72: 67: bool is_alternate = false; 142: 68: for(std::string alt_label : alternate_PEM_labels()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 51% (fallthrough) branch 4 taken 49% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 never executed -: 69: { 72: 70: if(got_label == alt_label) branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 71: { 2: 72: is_alternate = true; 74: 73: break; branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% -: 74: } -: 75: } -: 76: 72: 77: if(!is_alternate) branch 0 taken 97% (fallthrough) branch 1 taken 3% 140: 78: throw Decoding_Error("Unexpected PEM label for " + PEM_label() + " of " + got_label); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% (throw) call 13 returned 100% branch 14 taken 100% (fallthrough) branch 15 taken 0% (throw) branch 16 taken 0% (fallthrough) branch 17 taken 100% branch 18 taken 0% (fallthrough) branch 19 taken 100% branch 20 taken 0% (fallthrough) branch 21 taken 100% call 22 returned 100% branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed call 29 never executed -: 79: } -: 80: 5658: 81: BER_Decoder dec(ber); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 100% 2829: 82: decode_from(dec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 83: } -: 84: } 15388: 85: catch(Decoding_Error& e) call 0 returned 100% call 1 returned 100% -: 86: { 15388: 87: throw Decoding_Error(PEM_label() + " decoding", e); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) branch 10 taken 0% (fallthrough) branch 11 taken 100% call 12 returned 100% branch 13 never executed branch 14 never executed call 15 never executed -: 88: } 11947: 89: } -: 90: -: 91: function _ZNK5Botan11X509_Object11encode_intoERNS_11DER_EncoderE called 14453 returned 100% blocks executed 100% 14453: 92:void X509_Object::encode_into(DER_Encoder& to) const -: 93: { 14453: 94: to.start_cons(SEQUENCE) call 0 returned 100% 14453: 95: .start_cons(SEQUENCE) call 0 returned 100% call 1 returned 100% 14453: 96: .raw_bytes(signed_body()) call 0 returned 100% 14453: 97: .end_cons() call 0 returned 100% call 1 returned 100% 14453: 98: .encode(signature_algorithm()) call 0 returned 100% call 1 returned 100% 14453: 99: .encode(signature(), BIT_STRING) call 0 returned 100% 14453: 100: .end_cons(); call 0 returned 100% 14453: 101: } -: 102: -: 103:/* -: 104:* Read a BER encoded X.509 object -: 105:*/ function _ZN5Botan11X509_Object11decode_fromERNS_11BER_DecoderE called 19267 returned 62% blocks executed 100% 19267: 106:void X509_Object::decode_from(BER_Decoder& from) -: 107: { 19267: 108: from.start_cons(SEQUENCE) call 0 returned 97% 37247: 109: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 90% (fallthrough) branch 2 taken 10% (throw) call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% 16900: 110: .raw_bytes(m_tbs_bits) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 16900: 111: .end_cons() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 16900: 112: .decode(m_sig_algo) call 0 returned 100% branch 1 taken 91% (fallthrough) branch 2 taken 9% (throw) 15364: 113: .decode(m_sig, BIT_STRING) call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) 15277: 114: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 115: 15267: 116: force_decode(); call 0 returned 78% 11949: 117: } -: 118: -: 119:/* -: 120:* Return a PEM encoded X.509 object -: 121:*/ function _ZNK5Botan11X509_Object10PEM_encodeB5cxx11Ev called 145 returned 100% blocks executed 61% 145: 122:std::string X509_Object::PEM_encode() const -: 123: { 441: 124: return PEM_Code::encode(BER_encode(), PEM_label()); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 taken 4% (fallthrough) branch 7 taken 96% branch 8 never executed branch 9 never executed -: 125: } -: 126: -: 127:/* -: 128:* Return the TBS data -: 129:*/ function _ZNK5Botan11X509_Object8tbs_dataEv called 7671 returned 100% blocks executed 100% 7671: 130:std::vector X509_Object::tbs_data() const -: 131: { 7671: 132: return ASN1::put_in_sequence(m_tbs_bits); call 0 returned 100% -: 133: } -: 134: -: 135:/* -: 136:* Return the hash used in generating the signature -: 137:*/ function _ZNK5Botan11X509_Object23hash_used_for_signatureB5cxx11Ev called 2280 returned 100% blocks executed 34% 2280: 138:std::string X509_Object::hash_used_for_signature() const -: 139: { 2280: 140: const OID& oid = m_sig_algo.get_oid(); call 0 returned 100% 4560: 141: const std::vector sig_info = split_on(oid.to_formatted_string(), '/'); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% -: 142: 2280*: 143: if(sig_info.size() == 1 && sig_info[0] == "Ed25519") branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed branch 3 never executed branch 4 never executed #####: 144: return "SHA-512"; call 0 never executed branch 1 never executed branch 2 never executed 2280: 145: else if(sig_info.size() != 2) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 146: throw Internal_Error("Invalid name format found for " + oid.to_string()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed call 12 never executed branch 13 never executed branch 14 never executed call 15 never executed -: 147: 2280: 148: if(sig_info[1] == "EMSA4") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 149: { 202: 150: const OID hash_oid = decode_pss_params(signature_algorithm().get_parameters()).hash_algo.get_oid(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed 101: 151: return hash_oid.to_formatted_string(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 152: } -: 153: else -: 154: { 2179: 155: const std::vector pad_and_hash = 2179: 156: parse_algorithm_name(sig_info[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 157: 2179: 158: if(pad_and_hash.size() != 2) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 159: { #####: 160: throw Internal_Error("Invalid name format " + sig_info[1]); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 161: } -: 162: 4358: 163: return pad_and_hash[1]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 164: } -: 165: } -: 166: -: 167:/* -: 168:* Check the signature on an object -: 169:*/ function _ZNK5Botan11X509_Object15check_signatureEPKNS_10Public_KeyE called 980 returned 100% blocks executed 14% 980: 170:bool X509_Object::check_signature(const Public_Key* pub_key) const -: 171: { 980: 172: if(!pub_key) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 173: throw Invalid_Argument("No key provided for " + PEM_label() + " signature check"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed branch 8 never executed branch 9 never executed call 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed call 22 never executed 980: 174: std::unique_ptr key(pub_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 980: 175: return check_signature(*key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 176: } -: 177: function _ZNK5Botan11X509_Object15check_signatureERKNS_10Public_KeyE called 1004 returned 100% blocks executed 100% 1004: 178:bool X509_Object::check_signature(const Public_Key& pub_key) const -: 179: { 1004: 180: const Certificate_Status_Code code = verify_signature(pub_key); call 0 returned 100% 1004: 181: return (code == Certificate_Status_Code::VERIFIED); -: 182: } -: 183: function _ZNK5Botan11X509_Object16verify_signatureERKNS_10Public_KeyE called 7685 returned 100% blocks executed 58% 7685: 184:Certificate_Status_Code X509_Object::verify_signature(const Public_Key& pub_key) const -: 185: { 7685: 186: const std::vector sig_info = 7685: 187: split_on(m_sig_algo.get_oid().to_formatted_string(), '/'); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) -: 188: 15370: 189: if(sig_info.size() < 1 || sig_info.size() > 2 || sig_info[0] != pub_key.algo_name()) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) branch 7 taken 1% (fallthrough) branch 8 taken 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 1% call 13 never executed -: 190: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 191: 15357: 192: const std::string pub_key_algo = sig_info[0]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 15344: 193: std::string padding; branch 0 taken 100% (fallthrough) branch 1 taken 1% branch 2 taken 1% (fallthrough) branch 3 taken 100% 7672: 194: if(sig_info.size() == 2) branch 0 taken 100% (fallthrough) branch 1 taken 1% 7661: 195: padding = sig_info[1]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 14: 196: else if(pub_key_algo == "Ed25519" || pub_key_algo == "XMSS") call 0 returned 100% branch 1 taken 27% (fallthrough) branch 2 taken 73% branch 3 taken 100% (fallthrough) branch 4 taken 0% 11: 197: padding = "Pure"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 198: else -: 199: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 200: 7672: 201: const Signature_Format format = pub_key.default_x509_signature_format(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 202: 7672: 203: if(padding == "EMSA4") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 204: { -: 205: // "MUST contain RSASSA-PSS-params" 297: 206: if(signature_algorithm().get_parameters().empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 207: { 1: 208: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 209: } -: 210: 297: 211: Pss_params pss_parameter = decode_pss_params(signature_algorithm().get_parameters()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 212: -: 213: // hash_algo must be SHA1, SHA2-224, SHA2-256, SHA2-384 or SHA2-512 593: 214: const std::string hash_algo = pss_parameter.hash_algo.get_oid().to_formatted_string(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 297: 215: if(hash_algo != "SHA-160" && call 0 returned 100% 285: 216: hash_algo != "SHA-224" && branch 0 taken 99% (fallthrough) branch 1 taken 1% 281: 217: hash_algo != "SHA-256" && branch 0 taken 6% (fallthrough) branch 1 taken 94% 313: 218: hash_algo != "SHA-384" && branch 0 taken 96% (fallthrough) branch 1 taken 4% branch 2 taken 44% (fallthrough) branch 3 taken 56% 7: 219: hash_algo != "SHA-512") branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 220: { 1: 221: return Certificate_Status_Code::UNTRUSTED_HASH; call 0 returned 100% -: 222: } -: 223: 593: 224: const std::string mgf_algo = pss_parameter.mask_gen_algo.get_oid().to_formatted_string(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 297: 225: if(mgf_algo != "MGF1") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 226: { 1: 227: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 228: } -: 229: -: 230: // For MGF1, it is strongly RECOMMENDED that the underlying hash function be the same as the one identified by hashAlgorithm -: 231: // Must be SHA1, SHA2-224, SHA2-256, SHA2-384 or SHA2-512 297: 232: if(pss_parameter.mask_gen_hash.get_oid() != pss_parameter.hash_algo.get_oid()) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 233: { -: 234: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 235: } -: 236: 296: 237: if(pss_parameter.trailer_field != 1) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 238: { -: 239: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 240: } -: 241: 888: 242: padding += "(" + hash_algo + "," + mgf_algo + "," + std::to_string(pss_parameter.salt_len) + ")"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) call 18 returned 100% branch 19 taken 100% (fallthrough) branch 20 taken 0% (throw) branch 21 taken 100% (fallthrough) branch 22 taken 0% branch 23 taken 0% (fallthrough) branch 24 taken 100% branch 25 taken 0% (fallthrough) branch 26 taken 100% branch 27 taken 0% (fallthrough) branch 28 taken 100% branch 29 taken 0% (fallthrough) branch 30 taken 100% branch 31 taken 0% (fallthrough) branch 32 taken 100% branch 33 taken 0% (fallthrough) branch 34 taken 100% branch 35 taken 0% (fallthrough) branch 36 taken 100% branch 37 never executed branch 38 never executed branch 39 never executed branch 40 never executed branch 41 never executed branch 42 never executed branch 43 never executed branch 44 never executed branch 45 never executed branch 46 never executed branch 47 never executed branch 48 never executed branch 49 never executed branch 50 never executed -: 243: } -: 244: else -: 245: { -: 246: /* -: 247: * For all other signature types the signature parameters should -: 248: * be either NULL or empty. In theory there is some distinction between -: 249: * these but in practice they seem to be used somewhat interchangeably. -: 250: * -: 251: * The various RFCs all have prescriptions of what is allowed: -: 252: * RSA - NULL (RFC 3279) -: 253: * DSA - empty (RFC 3279) -: 254: * ECDSA - empty (RFC 3279) -: 255: * GOST - empty (RFC 4491) -: 256: * Ed25519 - empty (RFC 8410) -: 257: * XMSS - empty (draft-vangeest-x509-hash-sigs) -: 258: * -: 259: * But in practice we find RSA with empty and ECDSA will NULL all -: 260: * over the place so it's not really possible to enforce. For Ed25519 -: 261: * and XMSS because they are new we attempt to enforce. -: 262: */ 14742: 263: if(pub_key_algo == "Ed25519" || pub_key_algo == "XMSS") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% branch 3 taken 100% (fallthrough) branch 4 taken 1% -: 264: { 11: 265: if(!signature_algorithm().parameters_are_empty()) branch 0 taken 100% branch 1 taken 0% -: 266: { -: 267: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 268: } -: 269: } -: 270: else -: 271: { 15036: 272: if(!signature_algorithm().parameters_are_null_or_empty()) branch 0 taken 85% branch 1 taken 15% branch 2 taken 4% (fallthrough) branch 3 taken 96% -: 273: { -: 274: return Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS; -: 275: } -: 276: } -: 277: } -: 278: 7671: 279: try -: 280: { 15341: 281: PK_Verifier verifier(pub_key, padding, format); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% 15342: 282: const bool valid = verifier.verify_message(tbs_data(), signature()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% call 5 returned 100% -: 283: 7670: 284: if(valid) branch 0 taken 9% (fallthrough) branch 1 taken 91% -: 285: return Certificate_Status_Code::VERIFIED; -: 286: else 701: 287: return Certificate_Status_Code::SIGNATURE_ERROR; -: 288: } =====: 289: catch(Algorithm_Not_Found&) call 0 never executed -: 290: { =====: 291: return Certificate_Status_Code::SIGNATURE_ALGO_UNKNOWN; call 0 never executed branch 1 never executed branch 2 never executed -: 292: } 1: 293: catch(...) call 0 returned 100% -: 294: { -: 295: // This shouldn't happen, fallback to generic signature error 1: 296: return Certificate_Status_Code::SIGNATURE_ERROR; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 297: } -: 298: } -: 299: -: 300:/* -: 301:* Apply the X.509 SIGNED macro -: 302:*/ function _ZN5Botan11X509_Object11make_signedEPNS_9PK_SignerERNS_21RandomNumberGeneratorERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE called 366 returned 100% blocks executed 59% 366: 303:std::vector X509_Object::make_signed(PK_Signer* signer, -: 304: RandomNumberGenerator& rng, -: 305: const AlgorithmIdentifier& algo, -: 306: const secure_vector& tbs_bits) -: 307: { 366: 308: const std::vector signature = signer->sign_message(tbs_bits, rng); call 0 returned 100% -: 309: 366: 310: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 732: 311: DER_Encoder(output) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed branch 5 never executed branch 6 never executed 366: 312: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 366: 313: .raw_bytes(tbs_bits) 366: 314: .encode(algo) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 366: 315: .encode(signature, BIT_STRING) 366: 316: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 317: 732: 318: return output; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 319: } -: 320: -: 321:namespace { -: 322: function _ZN5Botan12_GLOBAL__N_115choose_sig_algoERNS_19AlgorithmIdentifierERKNS_11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_ called 304 returned 99% blocks executed 41% 304: 323:std::string choose_sig_algo(AlgorithmIdentifier& sig_algo, -: 324: const Private_Key& key, -: 325: const std::string& hash_fn, -: 326: const std::string& user_specified) -: 327: { 606: 328: const std::string algo_name = key.algo_name(); call 0 returned 100% 608: 329: std::string padding; call 0 returned 100% branch 1 taken 12% (fallthrough) branch 2 taken 88% -: 330: -: 331: // check algo_name and set default 304: 332: if(algo_name == "RSA") call 0 returned 100% branch 1 taken 25% (fallthrough) branch 2 taken 75% -: 333: { -: 334: // set to EMSA3 for compatibility reasons, originally it was the only option 75: 335: padding = "EMSA3(" + hash_fn + ")"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 0% (fallthrough) branch 8 taken 100% branch 9 taken 0% (fallthrough) branch 10 taken 100% -: 336: } 229: 337: else if(algo_name == "DSA" || call 0 returned 100% 186: 338: algo_name == "ECDSA" || branch 0 taken 70% (fallthrough) branch 1 taken 30% 131: 339: algo_name == "ECGDSA" || branch 0 taken 72% (fallthrough) branch 1 taken 28% 94: 340: algo_name == "ECKCDSA" || branch 0 taken 61% (fallthrough) branch 1 taken 39% 57: 341: algo_name == "GOST-34.10" || branch 0 taken 100% (fallthrough) branch 1 taken 0% 286: 342: algo_name == "GOST-34.10-2012-256" || branch 0 taken 81% (fallthrough) branch 1 taken 19% branch 2 taken 35% (fallthrough) branch 3 taken 65% 20: 343: algo_name == "GOST-34.10-2012-512") branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 344: { 211: 345: padding = "EMSA1(" + hash_fn + ")"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 0% (fallthrough) branch 8 taken 100% branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 0% (fallthrough) branch 12 taken 100% -: 346: } 20: 347: else if(algo_name == "Ed25519") call 0 returned 100% branch 1 taken 100% branch 2 taken 0% -: 348: { 20: 349: padding = "Pure"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 350: } #####: 351: else if(algo_name == "XMSS") call 0 never executed branch 1 never executed branch 2 never executed -: 352: { #####: 353: if(user_specified.empty() == true) branch 0 never executed branch 1 never executed -: 354: { #####: 355: throw Invalid_Argument("XMSS requires padding scheme"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 356: } #####: 357: padding = user_specified; call 0 never executed branch 1 never executed branch 2 never executed #####: 358: sig_algo = AlgorithmIdentifier(OID::from_string("XMSS"), AlgorithmIdentifier::USE_EMPTY_PARAM); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed call 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed 302*: 359: return padding; branch 0 never executed branch 1 never executed branch 2 taken 1% (fallthrough) branch 3 taken 99% -: 360: } -: 361: else -: 362: { #####: 363: throw Invalid_Argument("Unknown X.509 signing key type: " + algo_name); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 364: } -: 365: 304: 366: if(user_specified.empty() == false) branch 0 taken 56% (fallthrough) branch 1 taken 44% -: 367: { 169: 368: padding = user_specified; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 369: } -: 370: 304: 371: if(padding != "Pure") call 0 returned 100% branch 1 taken 93% (fallthrough) branch 2 taken 7% -: 372: { -: 373: // try to construct an EMSA object from the padding options or default 284: 374: std::unique_ptr emsa; call 0 returned 100% 284: 375: try -: 376: { 284: 377: emsa.reset(get_emsa(padding)); call 0 returned 100% branch 1 taken 57% (fallthrough) branch 2 taken 43% (throw) -: 378: } -: 379: /* -: 380: * get_emsa will throw if opts contains {"padding",} but -: 381: * does not specify a hash function. -: 382: * Omitting it is valid since it needs to be identical to hash_fn. -: 383: * If it still throws, something happened that we cannot repair here, -: 384: * e.g. the algorithm/padding combination is not supported. -: 385: */ 122: 386: catch(...) call 0 returned 100% -: 387: { 123: 388: emsa.reset(get_emsa(padding + "(" + hash_fn + ")")); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) branch 12 taken 1% (fallthrough) branch 13 taken 99% branch 14 taken 0% (fallthrough) branch 15 taken 100% branch 16 taken 0% (fallthrough) branch 17 taken 100% call 18 returned 100% branch 19 taken 100% (fallthrough) branch 20 taken 0% (throw) branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed call 25 never executed -: 389: } -: 390: 284: 391: if(!emsa) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 392: { #####: 393: throw Invalid_Argument("Could not parse padding scheme " + padding); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 394: } -: 395: 284: 396: sig_algo = emsa->config_for_x509(key, hash_fn); call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% call 4 returned 100% 282: 397: return emsa->name(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 398: } -: 399: else -: 400: { 40: 401: sig_algo = AlgorithmIdentifier(OID::from_string("Ed25519"), AlgorithmIdentifier::USE_EMPTY_PARAM); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 taken 0% (fallthrough) branch 14 taken 100% branch 15 never executed branch 16 never executed 20: 402: return "Pure"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 403: } -: 404: } -: 405: -: 406:} -: 407: -: 408:/* -: 409:* Choose a signing format for the key -: 410:*/ function _ZN5Botan11X509_Object17choose_sig_formatERNS_19AlgorithmIdentifierERKNS_11Private_KeyERNS_21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESF_ called 304 returned 99% blocks executed 48% 304: 411:std::unique_ptr X509_Object::choose_sig_format(AlgorithmIdentifier& sig_algo, -: 412: const Private_Key& key, -: 413: RandomNumberGenerator& rng, -: 414: const std::string& hash_fn, -: 415: const std::string& padding_algo) -: 416: { 304: 417: const Signature_Format format = key.default_x509_signature_format(); call 0 returned 100% -: 418: 304: 419: const std::string emsa = choose_sig_algo(sig_algo, key, hash_fn, padding_algo); call 0 returned 99% -: 420: 323: 421: return std::unique_ptr(new PK_Signer(key, rng, emsa, format)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 7% (fallthrough) branch 12 taken 93% call 13 never executed -: 422: } -: 423: -: 424:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#entropy#rdseed#rdseed.cpp.gcov -: 0:Source:src/lib/entropy/rdseed/rdseed.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/entropy_rdseed.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/entropy_rdseed.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Entropy Source Using Intel's rdseed instruction -: 3:* (C) 2015 Daniel Neus -: 4:* (C) 2015,2019 Jack Lloyd -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11: -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:namespace { -: 17: -: 18:BOTAN_FUNC_ISA("rdseed") function _ZN5Botan12_GLOBAL__N_111read_rdseedERSt6vectorIjNS_16secure_allocatorIjEEE called 0 returned 0% blocks executed 0% #####: 19:bool read_rdseed(secure_vector& seed) -: 20: { -: 21: /* -: 22: * RDSEED is not guaranteed to generate an output within any specific number -: 23: * of attempts. However in testing on a Skylake system, with all hyperthreads -: 24: * occupied in tight RDSEED loops, RDSEED will still usually succeed in under -: 25: * 150 attempts. The maximum ever seen was 230 attempts until success. When -: 26: * idle, RDSEED usually succeeds in 1 or 2 attempts. -: 27: * -: 28: * We set an upper bound of 512 attempts, because it is possible that due -: 29: * to firmware issue RDSEED is simply broken and never succeeds. We do not -: 30: * want to loop forever in that case. If we exceed that limit, then we assume -: 31: * the hardware is actually just broken, and stop the poll. -: 32: */ #####: 33: const size_t RDSEED_RETRIES = 512; -: 34: #####: 35: for(size_t i = 0; i != RDSEED_RETRIES; ++i) branch 0 never executed branch 1 never executed -: 36: { #####: 37: uint32_t r = 0; #####: 38: int cf = 0; -: 39: -: 40:#if defined(BOTAN_USE_GCC_INLINE_ASM) #####: 41: asm("rdseed %0; adcl $0,%1" : #####: 42: "=r" (r), "=r" (cf) : "0" (r), "1" (cf) : "cc"); -: 43:#else -: 44: cf = _rdseed32_step(&r); -: 45:#endif -: 46: #####: 47: if(1 == cf) branch 0 never executed branch 1 never executed -: 48: { #####: 49: seed.push_back(r); call 0 never executed #####: 50: return true; -: 51: } -: 52: -: 53: // Intel suggests pausing if RDSEED fails. #####: 54: _mm_pause(); call 0 never executed -: 55: } -: 56: -: 57: return false; // failed to produce an output after many attempts -: 58: } -: 59: -: 60:} -: 61: function _ZN5Botan12Intel_Rdseed4pollERNS_21RandomNumberGeneratorE called 5 returned 100% blocks executed 21% 5: 62:size_t Intel_Rdseed::poll(RandomNumberGenerator& rng) -: 63: { 5: 64: const size_t RDSEED_BYTES = 1024; 5: 65: static_assert(RDSEED_BYTES % 4 == 0, "Bad RDSEED configuration"); -: 66: 5: 67: if(CPUID::has_rdseed()) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 68: { #####: 69: secure_vector seed; call 0 never executed branch 1 never executed branch 2 never executed #####: 70: seed.reserve(RDSEED_BYTES / 4); call 0 never executed branch 1 never executed branch 2 never executed -: 71: #####: 72: for(size_t p = 0; p != RDSEED_BYTES / 4; ++p) branch 0 never executed branch 1 never executed -: 73: { -: 74: /* -: 75: If at any point we exceed our retry count, we stop the entire seed -: 76: gathering process. This situation will only occur in situations of -: 77: extremely high RDSEED utilization. If RDSEED is currently so highly -: 78: contended, then the rest of the poll is likely to also face contention and -: 79: it is better to quit now rather than (presumably) face very high retry -: 80: times for the rest of the poll. -: 81: */ #####: 82: if(!read_rdseed(seed)) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 83: break; -: 84: } -: 85: #####: 86: if(seed.size() > 0) branch 0 never executed branch 1 never executed -: 87: { #####: 88: rng.add_entropy(reinterpret_cast(seed.data()), #####: 89: seed.size() * sizeof(uint32_t)); call 0 never executed branch 1 never executed branch 2 never executed -: 90: } -: 91: } -: 92: -: 93: // RDSEED is used but not trusted 5: 94: return 0; -: 95: } -: 96: -: 97:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#siphash.h.gcov -: 0:Source:build/include/botan/siphash.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/mac.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/mac.gcda -: 0:Runs:2947 -: 1:/* -: 2:* SipHash -: 3:* (C) 2014,2015 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_SIPHASH_H_ -: 9:#define BOTAN_SIPHASH_H_ -: 10: -: 11:#include -: 12: -: 13:BOTAN_FUTURE_INTERNAL_HEADER(siphash.h) -: 14: -: 15:namespace Botan { -: 16: -: 17:class BOTAN_PUBLIC_API(2,0) SipHash final : public MessageAuthenticationCode -: 18: { -: 19: public: 119: 20: SipHash(size_t c = 2, size_t d = 4) : m_C(c), m_D(d) {} -: 21: -: 22: void clear() override; -: 23: std::string name() const override; -: 24: -: 25: MessageAuthenticationCode* clone() const override; -: 26: function _ZNK5Botan7SipHash13output_lengthEv called 0 returned 0% blocks executed 0% #####: 27: size_t output_length() const override { return 8; } -: 28: -: 29: Key_Length_Specification key_spec() const override -: 30: { -: 31: return Key_Length_Specification(16); -: 32: } -: 33: private: -: 34: void add_data(const uint8_t[], size_t) override; -: 35: void final_result(uint8_t[]) override; -: 36: void key_schedule(const uint8_t[], size_t) override; -: 37: -: 38: const size_t m_C, m_D; -: 39: secure_vector m_V; -: 40: uint64_t m_mbuf = 0; -: 41: size_t m_mbuf_pos = 0; -: 42: uint8_t m_words = 0; -: 43: }; -: 44: -: 45:} -: 46: -: 47:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#x86_64-linux-gnu#c++#9#bits#ctype_inline.h.gcov -: 0:Source:/usr/include/x86_64-linux-gnu/c++/9/bits/ctype_inline.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcda -: 0:Runs:2947 -: 1:// Locale support -*- C++ -*- -: 2: -: 3:// Copyright (C) 2000-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/** @file bits/ctype_inline.h -: 26: * This is an internal header file, included by other library headers. -: 27: * Do not attempt to use it directly. @headername{locale} -: 28: */ -: 29: -: 30:// -: 31:// ISO C++ 14882: 22.1 Locales -: 32:// -: 33: -: 34:// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) -: 35:// functions go in ctype.cc -: 36: -: 37:namespace std _GLIBCXX_VISIBILITY(default) -: 38:{ -: 39:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 40: -: 41: bool 7765*: 42: ctype:: -: 43: is(mask __m, char __c) const 7765*: 44: { return _M_table[static_cast(__c)] & __m; } call 0 never executed call 1 never executed call 2 never executed call 3 never executed branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 taken 0% (fallthrough) branch 19 taken 100% branch 20 never executed branch 21 never executed -: 45: -: 46: const char* -: 47: ctype:: -: 48: is(const char* __low, const char* __high, mask* __vec) const -: 49: { -: 50: while (__low < __high) -: 51: *__vec++ = _M_table[static_cast(*__low++)]; -: 52: return __high; -: 53: } -: 54: -: 55: const char* -: 56: ctype:: -: 57: scan_is(mask __m, const char* __low, const char* __high) const -: 58: { -: 59: while (__low < __high -: 60: && !(_M_table[static_cast(*__low)] & __m)) -: 61: ++__low; -: 62: return __low; -: 63: } -: 64: -: 65: const char* -: 66: ctype:: -: 67: scan_not(mask __m, const char* __low, const char* __high) const -: 68: { -: 69: while (__low < __high -: 70: && (_M_table[static_cast(*__low)] & __m) != 0) -: 71: ++__low; -: 72: return __low; -: 73: } -: 74: -: 75:_GLIBCXX_END_NAMESPACE_VERSION -: 76:} // namespace <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#ip#basic_resolver_entry.hpp.gcov -: 0:Source:/usr/include/boost/asio/ip/basic_resolver_entry.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// ip/basic_resolver_entry.hpp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP -: 12:#define BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21: -: 22:#include -: 23: -: 24:namespace boost { -: 25:namespace asio { -: 26:namespace ip { -: 27: -: 28:/// An entry produced by a resolver. -: 29:/** -: 30: * The boost::asio::ip::basic_resolver_entry class template describes an entry -: 31: * as returned by a resolver. -: 32: * -: 33: * @par Thread Safety -: 34: * @e Distinct @e objects: Safe.@n -: 35: * @e Shared @e objects: Unsafe. -: 36: */ -: 37:template -: 38:class basic_resolver_entry -: 39:{ -: 40:public: -: 41: /// The protocol type associated with the endpoint entry. -: 42: typedef InternetProtocol protocol_type; -: 43: -: 44: /// The endpoint type associated with the endpoint entry. -: 45: typedef typename InternetProtocol::endpoint endpoint_type; -: 46: -: 47: /// Default constructor. -: 48: basic_resolver_entry() -: 49: { -: 50: } -: 51: -: 52: /// Construct with specified endpoint, host name and service name. function _ZN5boost4asio2ip20basic_resolver_entryINS1_3udpEEC2ERKNS1_14basic_endpointIS3_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESG_ called 9 returned 100% blocks executed 62% 9: 53: basic_resolver_entry(const endpoint_type& ep, -: 54: BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service) -: 55: : endpoint_(ep), -: 56: host_name_(static_cast(host)), 9: 57: service_name_(static_cast(service)) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 never executed branch 5 never executed -: 58: { 9: 59: } -: 60: -: 61: /// Get the endpoint associated with the entry. -: 62: endpoint_type endpoint() const -: 63: { -: 64: return endpoint_; -: 65: } -: 66: -: 67: /// Convert to the endpoint associated with the entry. 6: 68: operator endpoint_type() const -: 69: { 6: 70: return endpoint_; call 0 returned 100% -: 71: } -: 72: -: 73: /// Get the host name associated with the entry. -: 74: std::string host_name() const -: 75: { -: 76: return host_name_; -: 77: } -: 78: -: 79: /// Get the host name associated with the entry. -: 80: template -: 81: std::basic_string, Allocator> host_name( -: 82: const Allocator& alloc = Allocator()) const -: 83: { -: 84: return std::basic_string, Allocator>( -: 85: host_name_.c_str(), alloc); -: 86: } -: 87: -: 88: /// Get the service name associated with the entry. -: 89: std::string service_name() const -: 90: { -: 91: return service_name_; -: 92: } -: 93: -: 94: /// Get the service name associated with the entry. -: 95: template -: 96: std::basic_string, Allocator> service_name( -: 97: const Allocator& alloc = Allocator()) const -: 98: { -: 99: return std::basic_string, Allocator>( -: 100: service_name_.c_str(), alloc); -: 101: } -: 102: -: 103:private: -: 104: endpoint_type endpoint_; -: 105: std::string host_name_; -: 106: std::string service_name_; -: 107:}; -: 108: -: 109:} // namespace ip -: 110:} // namespace asio -: 111:} // namespace boost -: 112: -: 113:#include -: 114: -: 115:#endif // BOOST_ASIO_IP_BASIC_RESOLVER_ENTRY_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#xmss#xmss_publickey.cpp.gcov -: 0:Source:src/lib/pubkey/xmss/xmss_publickey.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_xmss_publickey.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_xmss_publickey.gcda -: 0:Runs:2947 -: 1:/* -: 2: * XMSS Public Key -: 3: * An XMSS: Extended Hash-Based Siganture public key. -: 4: * The XMSS public key does not support the X509 standard. Instead the -: 5: * raw format described in [1] is used. -: 6: * -: 7: * [1] XMSS: Extended Hash-Based Signatures, -: 8: * Request for Comments: 8391 -: 9: * Release: May 2018. -: 10: * https://datatracker.ietf.org/doc/rfc8391/ -: 11: * -: 12: * (C) 2016,2017 Matthias Gierlings -: 13: * -: 14: * Botan is released under the Simplified BSD License (see license.txt) -: 15: **/ -: 16: -: 17:#include -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22: -: 23:namespace Botan { -: 24: -: 25:namespace { -: 26: -: 27:// fall back to raw decoding for previous versions, which did not encode an OCTET STRING function _ZN5Botan12_GLOBAL__N_115extract_raw_keyERKSt6vectorIhSaIhEE called 415 returned 100% blocks executed 67% 415: 28:std::vector extract_raw_key(const std::vector& key_bits) -: 29: { 415: 30: std::vector raw_key; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 415: 31: try -: 32: { 1214: 33: BER_Decoder(key_bits).decode(raw_key, OCTET_STRING); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% branch 5 taken 0% (fallthrough) branch 6 taken 100% -: 34: } 768: 35: catch(Decoding_Error&) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 36: { 384: 37: raw_key = key_bits; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 38: } 415: 39: return raw_key; -: 40: } -: 41: -: 42:} -: 43: 3*: 44:XMSS_PublicKey::XMSS_PublicKey(XMSS_Parameters::xmss_algorithm_t xmss_oid, #####: 45: RandomNumberGenerator& rng) -: 46: : m_xmss_params(xmss_oid), m_wots_params(m_xmss_params.ots_oid()), -: 47: m_root(m_xmss_params.element_size()), 3*: 48: m_public_seed(rng.random_vec(m_xmss_params.element_size())) 3*: 49: {} ------------------ _ZN5Botan14XMSS_PublicKeyC1ENS_15XMSS_Parameters16xmss_algorithm_tERNS_21RandomNumberGeneratorE: function _ZN5Botan14XMSS_PublicKeyC1ENS_15XMSS_Parameters16xmss_algorithm_tERNS_21RandomNumberGeneratorE called 0 returned 0% blocks executed 0% #####: 44:XMSS_PublicKey::XMSS_PublicKey(XMSS_Parameters::xmss_algorithm_t xmss_oid, #####: 45: RandomNumberGenerator& rng) -: 46: : m_xmss_params(xmss_oid), m_wots_params(m_xmss_params.ots_oid()), -: 47: m_root(m_xmss_params.element_size()), #####: 48: m_public_seed(rng.random_vec(m_xmss_params.element_size())) call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed call 14 never executed call 15 never executed branch 16 never executed branch 17 never executed #####: 49: {} ------------------ _ZN5Botan14XMSS_PublicKeyC2ENS_15XMSS_Parameters16xmss_algorithm_tERNS_21RandomNumberGeneratorE: function _ZN5Botan14XMSS_PublicKeyC2ENS_15XMSS_Parameters16xmss_algorithm_tERNS_21RandomNumberGeneratorE called 3 returned 100% blocks executed 35% 3: 44:XMSS_PublicKey::XMSS_PublicKey(XMSS_Parameters::xmss_algorithm_t xmss_oid, -: 45: RandomNumberGenerator& rng) -: 46: : m_xmss_params(xmss_oid), m_wots_params(m_xmss_params.ots_oid()), -: 47: m_root(m_xmss_params.element_size()), 3: 48: m_public_seed(rng.random_vec(m_xmss_params.element_size())) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) branch 12 never executed branch 13 never executed call 14 never executed call 15 never executed branch 16 never executed branch 17 never executed 3: 49: {} ------------------ -: 50: 415: 51:XMSS_PublicKey::XMSS_PublicKey(const std::vector& key_bits) -: 52: : m_raw_key(extract_raw_key(key_bits)), 415: 53: m_xmss_params(XMSS_PublicKey::deserialize_xmss_oid(m_raw_key)), 415: 54: m_wots_params(m_xmss_params.ots_oid()) -: 55: { 415: 56: if(m_raw_key.size() < XMSS_PublicKey::size()) -: 57: { #####: 58: throw Decoding_Error("Invalid XMSS public key size detected"); -: 59: } -: 60: -: 61: // extract & copy root from raw key 415: 62: m_root.clear(); 415: 63: m_root.reserve(m_xmss_params.element_size()); 415: 64: auto begin = m_raw_key.begin() + sizeof(uint32_t); 415: 65: auto end = begin + m_xmss_params.element_size(); 415: 66: std::copy(begin, end, std::back_inserter(m_root)); -: 67: -: 68: // extract & copy public seed from raw key 415: 69: begin = end; 415: 70: end = begin + m_xmss_params.element_size(); 415: 71: m_public_seed.clear(); 415: 72: m_public_seed.reserve(m_xmss_params.element_size()); 20287: 73: std::copy(begin, end, std::back_inserter(m_public_seed)); 415: 74: } ------------------ _ZN5Botan14XMSS_PublicKeyC1ERKSt6vectorIhSaIhEE: function _ZN5Botan14XMSS_PublicKeyC1ERKSt6vectorIhSaIhEE called 393 returned 100% blocks executed 38% 393: 51:XMSS_PublicKey::XMSS_PublicKey(const std::vector& key_bits) -: 52: : m_raw_key(extract_raw_key(key_bits)), 393: 53: m_xmss_params(XMSS_PublicKey::deserialize_xmss_oid(m_raw_key)), 393: 54: m_wots_params(m_xmss_params.ots_oid()) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) branch 10 taken 0% (fallthrough) branch 11 taken 100% branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed call 16 never executed call 17 never executed branch 18 never executed branch 19 never executed -: 55: { 393: 56: if(m_raw_key.size() < XMSS_PublicKey::size()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 57: { #####: 58: throw Decoding_Error("Invalid XMSS public key size detected"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 59: } -: 60: -: 61: // extract & copy root from raw key 393: 62: m_root.clear(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 393: 63: m_root.reserve(m_xmss_params.element_size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 393: 64: auto begin = m_raw_key.begin() + sizeof(uint32_t); 393: 65: auto end = begin + m_xmss_params.element_size(); 393: 66: std::copy(begin, end, std::back_inserter(m_root)); -: 67: -: 68: // extract & copy public seed from raw key 393: 69: begin = end; 393: 70: end = begin + m_xmss_params.element_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 393: 71: m_public_seed.clear(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 393: 72: m_public_seed.reserve(m_xmss_params.element_size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 19241: 73: std::copy(begin, end, std::back_inserter(m_public_seed)); branch 0 taken 98% (fallthrough) branch 1 taken 2% 393: 74: } ------------------ _ZN5Botan14XMSS_PublicKeyC2ERKSt6vectorIhSaIhEE: function _ZN5Botan14XMSS_PublicKeyC2ERKSt6vectorIhSaIhEE called 22 returned 100% blocks executed 38% 22: 51:XMSS_PublicKey::XMSS_PublicKey(const std::vector& key_bits) -: 52: : m_raw_key(extract_raw_key(key_bits)), 22: 53: m_xmss_params(XMSS_PublicKey::deserialize_xmss_oid(m_raw_key)), 22: 54: m_wots_params(m_xmss_params.ots_oid()) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) branch 10 taken 0% (fallthrough) branch 11 taken 100% branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed call 16 never executed call 17 never executed branch 18 never executed branch 19 never executed -: 55: { 22: 56: if(m_raw_key.size() < XMSS_PublicKey::size()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 57: { #####: 58: throw Decoding_Error("Invalid XMSS public key size detected"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 59: } -: 60: -: 61: // extract & copy root from raw key 22: 62: m_root.clear(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 22: 63: m_root.reserve(m_xmss_params.element_size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 22: 64: auto begin = m_raw_key.begin() + sizeof(uint32_t); 22: 65: auto end = begin + m_xmss_params.element_size(); 22: 66: std::copy(begin, end, std::back_inserter(m_root)); -: 67: -: 68: // extract & copy public seed from raw key 22: 69: begin = end; 22: 70: end = begin + m_xmss_params.element_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 22: 71: m_public_seed.clear(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 22: 72: m_public_seed.reserve(m_xmss_params.element_size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1046: 73: std::copy(begin, end, std::back_inserter(m_public_seed)); branch 0 taken 98% (fallthrough) branch 1 taken 2% 22: 74: } ------------------ -: 75: -: 76:XMSS_Parameters::xmss_algorithm_t function _ZN5Botan14XMSS_PublicKey20deserialize_xmss_oidERKSt6vectorIhSaIhEE called 415 returned 100% blocks executed 32% 415: 77:XMSS_PublicKey::deserialize_xmss_oid(const std::vector& raw_key) -: 78: { 415: 79: if(raw_key.size() < 4) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 80: { #####: 81: throw Decoding_Error("XMSS signature OID missing."); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 82: } -: 83: -: 84: // extract and convert algorithm id to enum type -: 85: uint32_t raw_id = 0; 2075: 86: for(size_t i = 0; i < 4; i++) branch 0 taken 80% (fallthrough) branch 1 taken 20% 1660: 87: { raw_id = ((raw_id << 8) | raw_key[i]); } -: 88: 415: 89: return static_cast(raw_id); -: 90: } -: 91: -: 92:std::unique_ptr function _ZNK5Botan14XMSS_PublicKey22create_verification_opERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ called 1542 returned 25% blocks executed 57% 1542: 93:XMSS_PublicKey::create_verification_op(const std::string&, -: 94: const std::string& provider) const -: 95: { 1542: 96: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 75% (fallthrough) branch 2 taken 25% branch 3 taken 1% (fallthrough) branch 4 taken 99% -: 97: { 390: 98: return std::unique_ptr( 390: 99: new XMSS_Verification_Operation(*this)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 100: } 2304: 101: throw Provider_Not_Found(algo_name(), provider); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 0% call 8 never executed -: 102: } -: 103: function _ZNK5Botan14XMSS_PublicKey14raw_public_keyEv called 35 returned 100% blocks executed 79% 35: 104:std::vector XMSS_PublicKey::raw_public_key() const -: 105: { 35: 106: std::vector result -: 107: { 35: 108: static_cast(m_xmss_params.oid() >> 24), call 0 returned 100% 35: 109: static_cast(m_xmss_params.oid() >> 16), 35: 110: static_cast(m_xmss_params.oid() >> 8), 35: 111: static_cast(m_xmss_params.oid()) 35: 112: }; call 0 returned 100% -: 113: 35: 114: std::copy(m_root.begin(), m_root.end(), std::back_inserter(result)); 35: 115: std::copy(m_public_seed.begin(), -: 116: m_public_seed.end(), 35: 117: std::back_inserter(result)); -: 118: 35: 119: return result; -: 120: } -: 121: function _ZNK5Botan14XMSS_PublicKey15public_key_bitsEv called 19 returned 100% blocks executed 50% 19: 122:std::vector XMSS_PublicKey::public_key_bits() const -: 123: { 19: 124: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 57: 125: DER_Encoder(output).encode(raw_public_key(), OCTET_STRING); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% call 8 returned 100% call 9 never executed branch 10 never executed branch 11 never executed 19: 126: return output; -: 127: } -: 128: -: 129:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#hash#mdx_hash#mdx_hash.cpp.gcov -: 0:Source:src/lib/hash/mdx_hash/mdx_hash.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash_mdx_hash.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash_mdx_hash.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Merkle-Damgard Hash Function -: 3:* (C) 1999-2008,2018 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12: -: 13:namespace Botan { -: 14: -: 15:/* -: 16:* MDx_HashFunction Constructor -: 17:*/ function _ZN5Botan16MDx_HashFunctionC2Embbh called 623450 returned 100% blocks executed 24% 623450: 18:MDx_HashFunction::MDx_HashFunction(size_t block_len, -: 19: bool byte_big_endian, -: 20: bool bit_big_endian, 623450: 21: uint8_t cnt_size) : -: 22: m_pad_char(bit_big_endian == true ? 0x80 : 0x01), -: 23: m_counter_size(cnt_size), 623450: 24: m_block_bits(ceil_log2(block_len)), -: 25: m_count_big_endian(byte_big_endian), -: 26: m_count(0), -: 27: m_buffer(block_len), 1248900: 28: m_position(0) branch 0 taken 1% (fallthrough) branch 1 taken 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% call 4 returned 100% branch 5 never executed branch 6 never executed -: 29: { 623450*: 30: if(!is_power_of_2(block_len)) branch 0 taken 100% (fallthrough) branch 1 taken 0% #####: 31: throw Invalid_Argument("MDx_HashFunction block length must be a power of 2"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed 623450: 32: if(m_block_bits < 3 || m_block_bits > 16) branch 0 taken 0% branch 1 taken 100% #####: 33: throw Invalid_Argument("MDx_HashFunction block size too large or too small"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed 623450: 34: if(m_counter_size < 8 || m_counter_size > block_len) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 35: throw Invalid_State("MDx_HashFunction invalid counter length"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed 623450: 36: } -: 37: -: 38:/* -: 39:* Clear memory of sensitive data -: 40:*/ function _ZN5Botan16MDx_HashFunction5clearEv called 1290300 returned 100% blocks executed 100% 1290300: 41:void MDx_HashFunction::clear() -: 42: { 1290300: 43: zeroise(m_buffer); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1290300: 44: m_count = m_position = 0; 1290300: 45: } -: 46: -: 47:/* -: 48:* Update the hash -: 49:*/ function _ZN5Botan16MDx_HashFunction8add_dataEPKhm called 22961435 returned 100% blocks executed 100% 22961435: 50:void MDx_HashFunction::add_data(const uint8_t input[], size_t length) -: 51: { 22961435: 52: const size_t block_len = static_cast(1) << m_block_bits; -: 53: 22961435: 54: m_count += length; -: 55: 22961435: 56: if(m_position) branch 0 taken 5% (fallthrough) branch 1 taken 95% -: 57: { 1057220: 58: buffer_insert(m_buffer, m_position, input, length); call 0 returned 100% -: 59: 1057220: 60: if(m_position + length >= block_len) branch 0 taken 39% (fallthrough) branch 1 taken 61% -: 61: { 416563: 62: compress_n(m_buffer.data(), 1); call 0 returned 100% 416563: 63: input += (block_len - m_position); 416563: 64: length -= (block_len - m_position); 416563: 65: m_position = 0; -: 66: } -: 67: } -: 68: -: 69: // Just in case the compiler can't figure out block_len is a power of 2 22961435: 70: const size_t full_blocks = length >> m_block_bits; 22961435: 71: const size_t remaining = length & (block_len - 1); -: 72: 22961435: 73: if(full_blocks > 0) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 74: { 21040875: 75: compress_n(input, full_blocks); call 0 returned 100% -: 76: } -: 77: 22961435: 78: buffer_insert(m_buffer, m_position, input + full_blocks * block_len, remaining); call 0 returned 100% 22961435: 79: m_position += remaining; 22961435: 80: } -: 81: -: 82:/* -: 83:* Finalize a hash -: 84:*/ function _ZN5Botan16MDx_HashFunction12final_resultEPh called 658701 returned 100% blocks executed 100% 658701: 85:void MDx_HashFunction::final_result(uint8_t output[]) -: 86: { 658701: 87: const size_t block_len = static_cast(1) << m_block_bits; -: 88: 658701: 89: clear_mem(&m_buffer[m_position], block_len - m_position); branch 0 taken 100% (fallthrough) branch 1 taken 0% 658701: 90: m_buffer[m_position] = m_pad_char; branch 0 taken 16% (fallthrough) branch 1 taken 84% -: 91: 658701: 92: if(m_position >= block_len - m_counter_size) branch 0 taken 16% (fallthrough) branch 1 taken 84% -: 93: { 103139: 94: compress_n(m_buffer.data(), 1); call 0 returned 100% 103139: 95: zeroise(m_buffer); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 96: } -: 97: 658701: 98: write_count(&m_buffer[block_len - m_counter_size]); call 0 returned 100% -: 99: 658701: 100: compress_n(m_buffer.data(), 1); call 0 returned 100% 658701: 101: copy_out(output); call 0 returned 100% 658701: 102: clear(); call 0 returned 100% 658701: 103: } -: 104: -: 105:/* -: 106:* Write the count bits to the buffer -: 107:*/ function _ZN5Botan16MDx_HashFunction11write_countEPh called 658701 returned 100% blocks executed 78% 658701: 108:void MDx_HashFunction::write_count(uint8_t out[]) -: 109: { 658701*: 110: BOTAN_ASSERT_NOMSG(m_counter_size <= output_length()); call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% call 3 never executed 658701*: 111: BOTAN_ASSERT_NOMSG(m_counter_size >= 8); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 112: 658701: 113: const uint64_t bit_count = m_count * 8; -: 114: 658701: 115: if(m_count_big_endian) branch 0 taken 99% (fallthrough) branch 1 taken 1% 652407: 116: store_be(bit_count, out + m_counter_size - 8); -: 117: else 6294: 118: store_le(bit_count, out + m_counter_size - 8); 658701: 119: } -: 120: -: 121:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#tls#tls_session.cpp.gcov -: 0:Source:src/lib/tls/tls_session.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/tls_session.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/tls_session.gcda -: 0:Runs:2947 -: 1:/* -: 2:* TLS Session State -: 3:* (C) 2011-2012,2015,2019 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17: -: 18:namespace Botan { -: 19: -: 20:namespace TLS { -: 21: function _ZN5Botan3TLS7SessionC2ERKSt6vectorIhSaIhEERKS2_IhNS_16secure_allocatorIhEEENS0_16Protocol_VersionEtNS0_15Connection_SideEbbRKS2_INS_16X509_CertificateESaISE_EES6_RKNS0_18Server_InformationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEt called 2509 returned 100% blocks executed 40% 2509: 22:Session::Session(const std::vector& session_identifier, -: 23: const secure_vector& master_secret, -: 24: Protocol_Version version, -: 25: uint16_t ciphersuite, -: 26: Connection_Side side, -: 27: bool extended_master_secret, -: 28: bool encrypt_then_mac, -: 29: const std::vector& certs, -: 30: const std::vector& ticket, -: 31: const Server_Information& server_info, -: 32: const std::string& srp_identifier, 2509: 33: uint16_t srtp_profile) : 2509: 34: m_start_time(std::chrono::system_clock::now()), call 0 returned 100% -: 35: m_identifier(session_identifier), -: 36: m_session_ticket(ticket), -: 37: m_master_secret(master_secret), -: 38: m_version(version), -: 39: m_ciphersuite(ciphersuite), -: 40: m_connection_side(side), -: 41: m_srtp_profile(srtp_profile), -: 42: m_extended_master_secret(extended_master_secret), -: 43: m_encrypt_then_mac(encrypt_then_mac), -: 44: m_peer_certs(certs), -: 45: m_server_info(server_info), 2509: 46: m_srp_identifier(srp_identifier) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% (throw) call 13 returned 100% branch 14 taken 100% (fallthrough) branch 15 taken 0% (throw) call 16 never executed call 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed -: 47: { 2509: 48: } -: 49: function _ZN5Botan3TLS7SessionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 1 returned 100% blocks executed 29% 1: 50:Session::Session(const std::string& pem) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed -: 51: { 1: 52: secure_vector der = PEM_Code::decode_check_label(pem, "TLS SESSION"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 53: 1: 54: *this = Session(der.data(), der.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% 1: 55: } -: 56: function _ZN5Botan3TLS7SessionC2EPKhm called 1049 returned 100% blocks executed 42% 1049: 57:Session::Session(const uint8_t ber[], size_t ber_len) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed -: 58: { 1049: 59: uint8_t side_code = 0; -: 60: 2098: 61: ASN1_String server_hostname; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed 2098: 62: ASN1_String server_service; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed 1049: 63: size_t server_port; -: 64: 1049: 65: ASN1_String srp_identifier_str; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 66: 1049: 67: uint8_t major_version = 0, minor_version = 0; 2098: 68: std::vector peer_cert_bits; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 69: 1049: 70: size_t start_time = 0; 1049: 71: size_t srtp_profile = 0; 1049: 72: size_t fragment_size = 0; 1049: 73: size_t compression_method = 0; -: 74: 1049: 75: BER_Decoder(ber, ber_len) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed 2098: 76: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed call 5 never executed 1049: 77: .decode_and_check(static_cast(TLS_SESSION_PARAM_STRUCT_VERSION), branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 never executed branch 3 never executed 2098: 78: "Unknown version in serialized TLS session") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% 1049: 79: .decode_integer_type(start_time) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 80: .decode_integer_type(major_version) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 81: .decode_integer_type(minor_version) 1049: 82: .decode(m_identifier, OCTET_STRING) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 83: .decode(m_session_ticket, OCTET_STRING) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 84: .decode_integer_type(m_ciphersuite) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 1049: 85: .decode_integer_type(compression_method) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 86: .decode_integer_type(side_code) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 87: .decode_integer_type(fragment_size) 1049: 88: .decode(m_extended_master_secret) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 89: .decode(m_encrypt_then_mac) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 90: .decode(m_master_secret, OCTET_STRING) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 1049: 91: .decode(peer_cert_bits, OCTET_STRING) 1049: 92: .decode(server_hostname) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 93: .decode(server_service) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 1049: 94: .decode(server_port) 1049: 95: .decode(srp_identifier_str) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 1049: 96: .decode(srtp_profile) 1049: 97: .end_cons() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 98: .verify_end(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 99: -: 100: /* -: 101: * Compression is not supported and must be zero -: 102: */ 1049: 103: if(compression_method != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 104: { #####: 105: throw Decoding_Error("Serialized TLS session contains non-null compression method"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 106: } -: 107: -: 108: /* -: 109: Fragment size is not supported anymore, but the field is still -: 110: set in the session object. -: 111: */ 1049: 112: if(fragment_size != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 113: { #####: 114: throw Decoding_Error("Serialized TLS session used maximum fragment length which is " #####: 115: " no longer supported"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 116: } -: 117: 1049: 118: m_version = Protocol_Version(major_version, minor_version); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 119: m_start_time = std::chrono::system_clock::from_time_t(start_time); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1049: 120: m_connection_side = static_cast(side_code); 1049: 121: m_srtp_profile = static_cast(srtp_profile); -: 122: 1049: 123: m_server_info = Server_Information(server_hostname.value(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 124: server_service.value(), 2098: 125: static_cast(server_port)); call 0 returned 100% call 1 returned 100% -: 126: 1049: 127: m_srp_identifier = srp_identifier_str.value(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 128: 1049: 129: if(!peer_cert_bits.empty()) branch 0 taken 62% (fallthrough) branch 1 taken 38% -: 130: { 1292: 131: DataSource_Memory certs(peer_cert_bits.data(), peer_cert_bits.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 132: 1509: 133: while(!certs.end_of_data()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 57% (fallthrough) branch 4 taken 43% 1726: 134: m_peer_certs.push_back(X509_Certificate(certs)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed branch 5 never executed branch 6 never executed -: 135: } 1049: 136: } -: 137: function _ZNK5Botan3TLS7Session10DER_encodeEv called 2125 returned 100% blocks executed 67% 2125: 138:secure_vector Session::DER_encode() const -: 139: { 2125: 140: std::vector peer_cert_bits; 3640: 141: for(size_t i = 0; i != m_peer_certs.size(); ++i) branch 0 taken 42% (fallthrough) branch 1 taken 58% 3030: 142: peer_cert_bits += m_peer_certs[i].BER_encode(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 143: 4250: 144: return DER_Encoder() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 56% (fallthrough) branch 4 taken 44% branch 5 never executed branch 6 never executed 2125: 145: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 146: .encode(static_cast(TLS_SESSION_PARAM_STRUCT_VERSION)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 147: .encode(static_cast(std::chrono::system_clock::to_time_t(m_start_time))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 148: .encode(static_cast(m_version.major_version())) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 149: .encode(static_cast(m_version.minor_version())) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 150: .encode(m_identifier, OCTET_STRING) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 151: .encode(m_session_ticket, OCTET_STRING) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 152: .encode(static_cast(m_ciphersuite)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 153: .encode(static_cast(/*old compression method*/0)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 154: .encode(static_cast(m_connection_side)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 155: .encode(static_cast(/*old fragment size*/0)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 156: .encode(m_extended_master_secret) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 157: .encode(m_encrypt_then_mac) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 158: .encode(m_master_secret, OCTET_STRING) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 2125: 159: .encode(peer_cert_bits, OCTET_STRING) 6837: 160: .encode(ASN1_String(m_server_info.hostname(), UTF8_STRING)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 22% (fallthrough) branch 10 taken 78% call 11 returned 100% branch 12 never executed branch 13 never executed call 14 never executed 6375: 161: .encode(ASN1_String(m_server_info.service(), UTF8_STRING)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 never executed branch 13 never executed call 14 never executed 2125: 162: .encode(static_cast(m_server_info.port())) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4250: 163: .encode(ASN1_String(m_srp_identifier, UTF8_STRING)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 returned 100% call 8 never executed call 9 never executed 2125: 164: .encode(static_cast(m_srtp_profile)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2125: 165: .end_cons() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4250: 166: .get_contents(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 167: } -: 168: function _ZNK5Botan3TLS7Session10PEM_encodeB5cxx11Ev called 1 returned 100% blocks executed 47% 1: 169:std::string Session::PEM_encode() const -: 170: { 3: 171: return PEM_Code::encode(this->DER_encode(), "TLS SESSION"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed -: 172: } -: 173: function _ZNK5Botan3TLS7Session11session_ageEv called 398 returned 100% blocks executed 100% 398: 174:std::chrono::seconds Session::session_age() const -: 175: { 398: 176: return std::chrono::duration_cast( 398: 177: std::chrono::system_clock::now() - m_start_time); call 0 returned 100% -: 178: } -: 179: -: 180:namespace { -: 181: -: 182:// The output length of the HMAC must be a valid keylength for the AEAD -: 183:const char* TLS_SESSION_CRYPT_HMAC = "HMAC(SHA-512-256)"; -: 184:// SIV would be better, but we can't assume it is available -: 185:const char* TLS_SESSION_CRYPT_AEAD = "AES-256/GCM"; -: 186:const char* TLS_SESSION_CRYPT_KEY_NAME = "BOTAN TLS SESSION KEY NAME"; -: 187:const uint64_t TLS_SESSION_CRYPT_MAGIC = 0x068B5A9D396C0000; -: 188:const size_t TLS_SESSION_CRYPT_MAGIC_LEN = 8; -: 189:const size_t TLS_SESSION_CRYPT_KEY_NAME_LEN = 4; -: 190:const size_t TLS_SESSION_CRYPT_AEAD_NONCE_LEN = 12; -: 191:const size_t TLS_SESSION_CRYPT_AEAD_KEY_SEED_LEN = 16; -: 192:const size_t TLS_SESSION_CRYPT_AEAD_TAG_SIZE = 16; -: 193: -: 194:const size_t TLS_SESSION_CRYPT_HDR_LEN = -: 195: TLS_SESSION_CRYPT_MAGIC_LEN + -: 196: TLS_SESSION_CRYPT_KEY_NAME_LEN + -: 197: TLS_SESSION_CRYPT_AEAD_NONCE_LEN + -: 198: TLS_SESSION_CRYPT_AEAD_KEY_SEED_LEN; -: 199: -: 200:const size_t TLS_SESSION_CRYPT_OVERHEAD = -: 201: TLS_SESSION_CRYPT_HDR_LEN + TLS_SESSION_CRYPT_AEAD_TAG_SIZE; -: 202: -: 203:} -: 204: -: 205:std::vector function _ZNK5Botan3TLS7Session7encryptERKNS_11OctetStringERNS_21RandomNumberGeneratorE called 2121 returned 100% blocks executed 52% 2121: 206:Session::encrypt(const SymmetricKey& key, RandomNumberGenerator& rng) const -: 207: { 4242: 208: auto hmac = MessageAuthenticationCode::create_or_throw(TLS_SESSION_CRYPT_HMAC); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed 2121: 209: hmac->set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 210: -: 211: // First derive the "key name" 4242: 212: std::vector key_name(hmac->output_length()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% 4242: 213: hmac->update(TLS_SESSION_CRYPT_KEY_NAME); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 2121: 214: hmac->final(key_name.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 215: key_name.resize(TLS_SESSION_CRYPT_KEY_NAME_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 216: 4242: 217: std::vector aead_nonce; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 2121: 218: std::vector key_seed; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 219: 2121: 220: rng.random_vec(aead_nonce, TLS_SESSION_CRYPT_AEAD_NONCE_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 221: rng.random_vec(key_seed, TLS_SESSION_CRYPT_AEAD_KEY_SEED_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 222: 2121: 223: hmac->update(key_seed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4242: 224: const secure_vector aead_key = hmac->final(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 225: 4242: 226: secure_vector bits = this->DER_encode(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 227: -: 228: // create the header 2121: 229: std::vector buf; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 230: buf.reserve(TLS_SESSION_CRYPT_OVERHEAD + bits.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 231: buf.resize(TLS_SESSION_CRYPT_MAGIC_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 232: store_be(TLS_SESSION_CRYPT_MAGIC, &buf[0]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 233: buf += key_name; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 234: buf += key_seed; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 235: buf += aead_nonce; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 236: 6363: 237: std::unique_ptr aead = AEAD_Mode::create_or_throw(TLS_SESSION_CRYPT_AEAD, ENCRYPTION); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% 2121*: 238: BOTAN_ASSERT_NOMSG(aead->valid_nonce_length(TLS_SESSION_CRYPT_AEAD_NONCE_LEN)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% call 5 never executed 2121*: 239: BOTAN_ASSERT_NOMSG(aead->tag_size() == TLS_SESSION_CRYPT_AEAD_TAG_SIZE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% call 5 never executed 2121: 240: aead->set_key(aead_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 241: aead->set_associated_data_vec(buf); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 242: aead->start(aead_nonce); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2121: 243: aead->finish(bits, 0); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 244: -: 245: // append the ciphertext 2121: 246: buf += bits; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4242: 247: return buf; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 248: } -: 249: function _ZN5Botan3TLS7Session7decryptEPKhmRKNS_11OctetStringE called 1050 returned 100% blocks executed 50% 1050: 250:Session Session::decrypt(const uint8_t in[], size_t in_len, const SymmetricKey& key) -: 251: { 1050: 252: try -: 253: { 1050: 254: const size_t min_session_size = 48 + 4; // serious under-estimate 1050: 255: if(in_len < TLS_SESSION_CRYPT_OVERHEAD + min_session_size) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 256: throw Decoding_Error("Encrypted session too short to be valid"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 257: 1050: 258: const uint8_t* magic = &in[0]; 1050: 259: const uint8_t* key_name = magic + TLS_SESSION_CRYPT_MAGIC_LEN; 1050: 260: const uint8_t* key_seed = key_name + TLS_SESSION_CRYPT_KEY_NAME_LEN; 1050: 261: const uint8_t* aead_nonce = key_seed + TLS_SESSION_CRYPT_AEAD_KEY_SEED_LEN; 1050: 262: const uint8_t* ctext = aead_nonce + TLS_SESSION_CRYPT_AEAD_NONCE_LEN; 1050: 263: const size_t ctext_len = in_len - TLS_SESSION_CRYPT_HDR_LEN; // includes the tag -: 264: 1050: 265: if(load_be(magic, 0) != TLS_SESSION_CRYPT_MAGIC) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 266: throw Decoding_Error("Missing expected magic numbers"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 267: 2103: 268: auto hmac = MessageAuthenticationCode::create_or_throw(TLS_SESSION_CRYPT_HMAC); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% 1050: 269: hmac->set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 270: -: 271: // First derive and check the "key name" 2100: 272: std::vector cmp_key_name(hmac->output_length()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% 2100: 273: hmac->update(TLS_SESSION_CRYPT_KEY_NAME); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 1050: 274: hmac->final(cmp_key_name.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 275: 2100: 276: if(same_mem(cmp_key_name.data(), key_name, TLS_SESSION_CRYPT_KEY_NAME_LEN) == false) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 277: throw Decoding_Error("Wrong key name for encrypted session"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 278: 1050: 279: hmac->update(key_seed, TLS_SESSION_CRYPT_AEAD_KEY_SEED_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2100: 280: const secure_vector aead_key = hmac->final(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 281: 3150: 282: auto aead = AEAD_Mode::create_or_throw(TLS_SESSION_CRYPT_AEAD, DECRYPTION); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% 1050: 283: aead->set_key(aead_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1050: 284: aead->set_associated_data(in, TLS_SESSION_CRYPT_HDR_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1050: 285: aead->start(aead_nonce, TLS_SESSION_CRYPT_AEAD_NONCE_LEN); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2100: 286: secure_vector buf(ctext, ctext + ctext_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 100% (fallthrough) branch 6 taken 0% 1050: 287: aead->finish(buf, 0); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) 2094: 288: return Session(buf.data(), buf.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 289: } 6: 290: catch(std::exception& e) call 0 returned 100% call 1 returned 100% -: 291: { 6: 292: throw Decoding_Error("Failed to decrypt serialized TLS session: " + call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 9: 293: std::string(e.what())); call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 returned 100% call 9 never executed -: 294: } -: 295: } -: 296: -: 297:} -: 298: -: 299:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#deque.tcc.gcov -: 0:Source:/usr/include/c++/9/bits/deque.tcc -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/filters_pipe.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/filters_pipe.gcda -: 0:Runs:2947 -: 1:// Deque implementation (out of line) -*- C++ -*- -: 2: -: 3:// Copyright (C) 2001-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/* -: 26: * -: 27: * Copyright (c) 1994 -: 28: * Hewlett-Packard Company -: 29: * -: 30: * Permission to use, copy, modify, distribute and sell this software -: 31: * and its documentation for any purpose is hereby granted without fee, -: 32: * provided that the above copyright notice appear in all copies and -: 33: * that both that copyright notice and this permission notice appear -: 34: * in supporting documentation. Hewlett-Packard Company makes no -: 35: * representations about the suitability of this software for any -: 36: * purpose. It is provided "as is" without express or implied warranty. -: 37: * -: 38: * -: 39: * Copyright (c) 1997 -: 40: * Silicon Graphics Computer Systems, Inc. -: 41: * -: 42: * Permission to use, copy, modify, distribute and sell this software -: 43: * and its documentation for any purpose is hereby granted without fee, -: 44: * provided that the above copyright notice appear in all copies and -: 45: * that both that copyright notice and this permission notice appear -: 46: * in supporting documentation. Silicon Graphics makes no -: 47: * representations about the suitability of this software for any -: 48: * purpose. It is provided "as is" without express or implied warranty. -: 49: */ -: 50: -: 51:/** @file bits/deque.tcc -: 52: * This is an internal header file, included by other library headers. -: 53: * Do not attempt to use it directly. @headername{deque} -: 54: */ -: 55: -: 56:#ifndef _DEQUE_TCC -: 57:#define _DEQUE_TCC 1 -: 58: -: 59:namespace std _GLIBCXX_VISIBILITY(default) -: 60:{ -: 61:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 62:_GLIBCXX_BEGIN_NAMESPACE_CONTAINER -: 63: -: 64:#if __cplusplus >= 201103L -: 65: template -: 66: void -: 67: deque<_Tp, _Alloc>:: -: 68: _M_default_initialize() -: 69: { -: 70: _Map_pointer __cur; -: 71: __try -: 72: { -: 73: for (__cur = this->_M_impl._M_start._M_node; -: 74: __cur < this->_M_impl._M_finish._M_node; -: 75: ++__cur) -: 76: std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), -: 77: _M_get_Tp_allocator()); -: 78: std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, -: 79: this->_M_impl._M_finish._M_cur, -: 80: _M_get_Tp_allocator()); -: 81: } -: 82: __catch(...) -: 83: { -: 84: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), -: 85: _M_get_Tp_allocator()); -: 86: __throw_exception_again; -: 87: } -: 88: } -: 89:#endif -: 90: -: 91: template -: 92: deque<_Tp, _Alloc>& -: 93: deque<_Tp, _Alloc>:: -: 94: operator=(const deque& __x) -: 95: { -: 96: if (&__x != this) -: 97: { -: 98:#if __cplusplus >= 201103L -: 99: if (_Alloc_traits::_S_propagate_on_copy_assign()) -: 100: { -: 101: if (!_Alloc_traits::_S_always_equal() -: 102: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) -: 103: { -: 104: // Replacement allocator cannot free existing storage, -: 105: // so deallocate everything and take copy of __x's data. -: 106: _M_replace_map(__x, __x.get_allocator()); -: 107: std::__alloc_on_copy(_M_get_Tp_allocator(), -: 108: __x._M_get_Tp_allocator()); -: 109: return *this; -: 110: } -: 111: std::__alloc_on_copy(_M_get_Tp_allocator(), -: 112: __x._M_get_Tp_allocator()); -: 113: } -: 114:#endif -: 115: const size_type __len = size(); -: 116: if (__len >= __x.size()) -: 117: _M_erase_at_end(std::copy(__x.begin(), __x.end(), -: 118: this->_M_impl._M_start)); -: 119: else -: 120: { -: 121: const_iterator __mid = __x.begin() + difference_type(__len); -: 122: std::copy(__x.begin(), __mid, this->_M_impl._M_start); -: 123: _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), -: 124: std::random_access_iterator_tag()); -: 125: } -: 126: } -: 127: return *this; -: 128: } -: 129: -: 130:#if __cplusplus >= 201103L -: 131: template -: 132: template -: 133:#if __cplusplus > 201402L -: 134: typename deque<_Tp, _Alloc>::reference -: 135:#else -: 136: void -: 137:#endif -: 138: deque<_Tp, _Alloc>:: -: 139: emplace_front(_Args&&... __args) -: 140: { -: 141: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) -: 142: { -: 143: _Alloc_traits::construct(this->_M_impl, -: 144: this->_M_impl._M_start._M_cur - 1, -: 145: std::forward<_Args>(__args)...); -: 146: --this->_M_impl._M_start._M_cur; -: 147: } -: 148: else -: 149: _M_push_front_aux(std::forward<_Args>(__args)...); -: 150:#if __cplusplus > 201402L -: 151: return front(); -: 152:#endif -: 153: } -: 154: -: 155: template -: 156: template -: 157:#if __cplusplus > 201402L -: 158: typename deque<_Tp, _Alloc>::reference -: 159:#else -: 160: void -: 161:#endif -: 162: deque<_Tp, _Alloc>:: -: 163: emplace_back(_Args&&... __args) -: 164: { -: 165: if (this->_M_impl._M_finish._M_cur -: 166: != this->_M_impl._M_finish._M_last - 1) -: 167: { -: 168: _Alloc_traits::construct(this->_M_impl, -: 169: this->_M_impl._M_finish._M_cur, -: 170: std::forward<_Args>(__args)...); -: 171: ++this->_M_impl._M_finish._M_cur; -: 172: } -: 173: else -: 174: _M_push_back_aux(std::forward<_Args>(__args)...); -: 175:#if __cplusplus > 201402L -: 176: return back(); -: 177:#endif -: 178: } -: 179:#endif -: 180: -: 181:#if __cplusplus >= 201103L -: 182: template -: 183: template -: 184: typename deque<_Tp, _Alloc>::iterator -: 185: deque<_Tp, _Alloc>:: -: 186: emplace(const_iterator __position, _Args&&... __args) -: 187: { -: 188: if (__position._M_cur == this->_M_impl._M_start._M_cur) -: 189: { -: 190: emplace_front(std::forward<_Args>(__args)...); -: 191: return this->_M_impl._M_start; -: 192: } -: 193: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) -: 194: { -: 195: emplace_back(std::forward<_Args>(__args)...); -: 196: iterator __tmp = this->_M_impl._M_finish; -: 197: --__tmp; -: 198: return __tmp; -: 199: } -: 200: else -: 201: return _M_insert_aux(__position._M_const_cast(), -: 202: std::forward<_Args>(__args)...); -: 203: } -: 204:#endif -: 205: -: 206: template -: 207: typename deque<_Tp, _Alloc>::iterator -: 208: deque<_Tp, _Alloc>:: -: 209:#if __cplusplus >= 201103L -: 210: insert(const_iterator __position, const value_type& __x) -: 211:#else -: 212: insert(iterator __position, const value_type& __x) -: 213:#endif -: 214: { -: 215: if (__position._M_cur == this->_M_impl._M_start._M_cur) -: 216: { -: 217: push_front(__x); -: 218: return this->_M_impl._M_start; -: 219: } -: 220: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) -: 221: { -: 222: push_back(__x); -: 223: iterator __tmp = this->_M_impl._M_finish; -: 224: --__tmp; -: 225: return __tmp; -: 226: } -: 227: else -: 228: return _M_insert_aux(__position._M_const_cast(), __x); -: 229: } -: 230: -: 231: template -: 232: typename deque<_Tp, _Alloc>::iterator -: 233: deque<_Tp, _Alloc>:: -: 234: _M_erase(iterator __position) -: 235: { -: 236: iterator __next = __position; -: 237: ++__next; -: 238: const difference_type __index = __position - begin(); -: 239: if (static_cast(__index) < (size() >> 1)) -: 240: { -: 241: if (__position != begin()) -: 242: _GLIBCXX_MOVE_BACKWARD3(begin(), __position, __next); -: 243: pop_front(); -: 244: } -: 245: else -: 246: { -: 247: if (__next != end()) -: 248: _GLIBCXX_MOVE3(__next, end(), __position); -: 249: pop_back(); -: 250: } -: 251: return begin() + __index; -: 252: } -: 253: -: 254: template -: 255: typename deque<_Tp, _Alloc>::iterator -: 256: deque<_Tp, _Alloc>:: -: 257: _M_erase(iterator __first, iterator __last) -: 258: { -: 259: if (__first == __last) -: 260: return __first; -: 261: else if (__first == begin() && __last == end()) -: 262: { -: 263: clear(); -: 264: return end(); -: 265: } -: 266: else -: 267: { -: 268: const difference_type __n = __last - __first; -: 269: const difference_type __elems_before = __first - begin(); -: 270: if (static_cast(__elems_before) <= (size() - __n) / 2) -: 271: { -: 272: if (__first != begin()) -: 273: _GLIBCXX_MOVE_BACKWARD3(begin(), __first, __last); -: 274: _M_erase_at_begin(begin() + __n); -: 275: } -: 276: else -: 277: { -: 278: if (__last != end()) -: 279: _GLIBCXX_MOVE3(__last, end(), __first); -: 280: _M_erase_at_end(end() - __n); -: 281: } -: 282: return begin() + __elems_before; -: 283: } -: 284: } -: 285: -: 286: template -: 287: template -: 288: void -: 289: deque<_Tp, _Alloc>:: -: 290: _M_assign_aux(_InputIterator __first, _InputIterator __last, -: 291: std::input_iterator_tag) -: 292: { -: 293: iterator __cur = begin(); -: 294: for (; __first != __last && __cur != end(); ++__cur, (void)++__first) -: 295: *__cur = *__first; -: 296: if (__first == __last) -: 297: _M_erase_at_end(__cur); -: 298: else -: 299: _M_range_insert_aux(end(), __first, __last, -: 300: std::__iterator_category(__first)); -: 301: } -: 302: -: 303: template -: 304: void -: 305: deque<_Tp, _Alloc>:: -: 306: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) -: 307: { -: 308: if (__pos._M_cur == this->_M_impl._M_start._M_cur) -: 309: { -: 310: iterator __new_start = _M_reserve_elements_at_front(__n); -: 311: __try -: 312: { -: 313: std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, -: 314: __x, _M_get_Tp_allocator()); -: 315: this->_M_impl._M_start = __new_start; -: 316: } -: 317: __catch(...) -: 318: { -: 319: _M_destroy_nodes(__new_start._M_node, -: 320: this->_M_impl._M_start._M_node); -: 321: __throw_exception_again; -: 322: } -: 323: } -: 324: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) -: 325: { -: 326: iterator __new_finish = _M_reserve_elements_at_back(__n); -: 327: __try -: 328: { -: 329: std::__uninitialized_fill_a(this->_M_impl._M_finish, -: 330: __new_finish, __x, -: 331: _M_get_Tp_allocator()); -: 332: this->_M_impl._M_finish = __new_finish; -: 333: } -: 334: __catch(...) -: 335: { -: 336: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, -: 337: __new_finish._M_node + 1); -: 338: __throw_exception_again; -: 339: } -: 340: } -: 341: else -: 342: _M_insert_aux(__pos, __n, __x); -: 343: } -: 344: -: 345:#if __cplusplus >= 201103L -: 346: template -: 347: void -: 348: deque<_Tp, _Alloc>:: -: 349: _M_default_append(size_type __n) -: 350: { -: 351: if (__n) -: 352: { -: 353: iterator __new_finish = _M_reserve_elements_at_back(__n); -: 354: __try -: 355: { -: 356: std::__uninitialized_default_a(this->_M_impl._M_finish, -: 357: __new_finish, -: 358: _M_get_Tp_allocator()); -: 359: this->_M_impl._M_finish = __new_finish; -: 360: } -: 361: __catch(...) -: 362: { -: 363: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, -: 364: __new_finish._M_node + 1); -: 365: __throw_exception_again; -: 366: } -: 367: } -: 368: } -: 369: -: 370: template -: 371: bool -: 372: deque<_Tp, _Alloc>:: -: 373: _M_shrink_to_fit() -: 374: { -: 375: const difference_type __front_capacity -: 376: = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); -: 377: if (__front_capacity == 0) -: 378: return false; -: 379: -: 380: const difference_type __back_capacity -: 381: = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); -: 382: if (__front_capacity + __back_capacity < _S_buffer_size()) -: 383: return false; -: 384: -: 385: return std::__shrink_to_fit_aux::_S_do_it(*this); -: 386: } -: 387:#endif -: 388: -: 389: template -: 390: void -: 391: deque<_Tp, _Alloc>:: -: 392: _M_fill_initialize(const value_type& __value) -: 393: { -: 394: _Map_pointer __cur; -: 395: __try -: 396: { -: 397: for (__cur = this->_M_impl._M_start._M_node; -: 398: __cur < this->_M_impl._M_finish._M_node; -: 399: ++__cur) -: 400: std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), -: 401: __value, _M_get_Tp_allocator()); -: 402: std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, -: 403: this->_M_impl._M_finish._M_cur, -: 404: __value, _M_get_Tp_allocator()); -: 405: } -: 406: __catch(...) -: 407: { -: 408: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), -: 409: _M_get_Tp_allocator()); -: 410: __throw_exception_again; -: 411: } -: 412: } -: 413: -: 414: template -: 415: template -: 416: void -: 417: deque<_Tp, _Alloc>:: -: 418: _M_range_initialize(_InputIterator __first, _InputIterator __last, -: 419: std::input_iterator_tag) -: 420: { -: 421: this->_M_initialize_map(0); -: 422: __try -: 423: { -: 424: for (; __first != __last; ++__first) -: 425:#if __cplusplus >= 201103L -: 426: emplace_back(*__first); -: 427:#else -: 428: push_back(*__first); -: 429:#endif -: 430: } -: 431: __catch(...) -: 432: { -: 433: clear(); -: 434: __throw_exception_again; -: 435: } -: 436: } -: 437: -: 438: template -: 439: template -: 440: void -: 441: deque<_Tp, _Alloc>:: -: 442: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, -: 443: std::forward_iterator_tag) -: 444: { -: 445: const size_type __n = std::distance(__first, __last); -: 446: this->_M_initialize_map(_S_check_init_len(__n, _M_get_Tp_allocator())); -: 447: -: 448: _Map_pointer __cur_node; -: 449: __try -: 450: { -: 451: for (__cur_node = this->_M_impl._M_start._M_node; -: 452: __cur_node < this->_M_impl._M_finish._M_node; -: 453: ++__cur_node) -: 454: { -: 455: _ForwardIterator __mid = __first; -: 456: std::advance(__mid, _S_buffer_size()); -: 457: std::__uninitialized_copy_a(__first, __mid, *__cur_node, -: 458: _M_get_Tp_allocator()); -: 459: __first = __mid; -: 460: } -: 461: std::__uninitialized_copy_a(__first, __last, -: 462: this->_M_impl._M_finish._M_first, -: 463: _M_get_Tp_allocator()); -: 464: } -: 465: __catch(...) -: 466: { -: 467: std::_Destroy(this->_M_impl._M_start, -: 468: iterator(*__cur_node, __cur_node), -: 469: _M_get_Tp_allocator()); -: 470: __throw_exception_again; -: 471: } -: 472: } -: 473: -: 474: // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1. -: 475: template -: 476:#if __cplusplus >= 201103L -: 477: template -: 478: void -: 479: deque<_Tp, _Alloc>:: -: 480: _M_push_back_aux(_Args&&... __args) -: 481:#else -: 482: void -: 483: deque<_Tp, _Alloc>:: -: 484: _M_push_back_aux(const value_type& __t) -: 485:#endif -: 486: { -: 487: if (size() == max_size()) -: 488: __throw_length_error( -: 489: __N("cannot create std::deque larger than max_size()")); -: 490: -: 491: _M_reserve_map_at_back(); -: 492: *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); -: 493: __try -: 494: { -: 495:#if __cplusplus >= 201103L -: 496: _Alloc_traits::construct(this->_M_impl, -: 497: this->_M_impl._M_finish._M_cur, -: 498: std::forward<_Args>(__args)...); -: 499:#else -: 500: this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t); -: 501:#endif -: 502: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node -: 503: + 1); -: 504: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; -: 505: } -: 506: __catch(...) -: 507: { -: 508: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); -: 509: __throw_exception_again; -: 510: } -: 511: } -: 512: -: 513: // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first. -: 514: template -: 515:#if __cplusplus >= 201103L -: 516: template -: 517: void -: 518: deque<_Tp, _Alloc>:: -: 519: _M_push_front_aux(_Args&&... __args) -: 520:#else -: 521: void -: 522: deque<_Tp, _Alloc>:: -: 523: _M_push_front_aux(const value_type& __t) -: 524:#endif -: 525: { -: 526: if (size() == max_size()) -: 527: __throw_length_error( -: 528: __N("cannot create std::deque larger than max_size()")); -: 529: -: 530: _M_reserve_map_at_front(); -: 531: *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); -: 532: __try -: 533: { -: 534: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node -: 535: - 1); -: 536: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; -: 537:#if __cplusplus >= 201103L -: 538: _Alloc_traits::construct(this->_M_impl, -: 539: this->_M_impl._M_start._M_cur, -: 540: std::forward<_Args>(__args)...); -: 541:#else -: 542: this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t); -: 543:#endif -: 544: } -: 545: __catch(...) -: 546: { -: 547: ++this->_M_impl._M_start; -: 548: _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); -: 549: __throw_exception_again; -: 550: } -: 551: } -: 552: -: 553: // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first. -: 554: template -: 555: void deque<_Tp, _Alloc>:: -: 556: _M_pop_back_aux() -: 557: { -: 558: _M_deallocate_node(this->_M_impl._M_finish._M_first); -: 559: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); -: 560: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; -: 561: _Alloc_traits::destroy(_M_get_Tp_allocator(), -: 562: this->_M_impl._M_finish._M_cur); -: 563: } -: 564: -: 565: // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1. -: 566: // Note that if the deque has at least one element (a precondition for this -: 567: // member function), and if -: 568: // _M_impl._M_start._M_cur == _M_impl._M_start._M_last, -: 569: // then the deque must have at least two nodes. -: 570: template -: 571: void deque<_Tp, _Alloc>:: -: 572: _M_pop_front_aux() -: 573: { -: 574: _Alloc_traits::destroy(_M_get_Tp_allocator(), -: 575: this->_M_impl._M_start._M_cur); -: 576: _M_deallocate_node(this->_M_impl._M_start._M_first); -: 577: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); -: 578: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; -: 579: } -: 580: -: 581: template -: 582: template -: 583: void -: 584: deque<_Tp, _Alloc>:: -: 585: _M_range_insert_aux(iterator __pos, -: 586: _InputIterator __first, _InputIterator __last, -: 587: std::input_iterator_tag) -: 588: { std::copy(__first, __last, std::inserter(*this, __pos)); } -: 589: -: 590: template -: 591: template -: 592: void -: 593: deque<_Tp, _Alloc>:: -: 594: _M_range_insert_aux(iterator __pos, -: 595: _ForwardIterator __first, _ForwardIterator __last, -: 596: std::forward_iterator_tag) -: 597: { -: 598: const size_type __n = std::distance(__first, __last); -: 599: if (__pos._M_cur == this->_M_impl._M_start._M_cur) -: 600: { -: 601: iterator __new_start = _M_reserve_elements_at_front(__n); -: 602: __try -: 603: { -: 604: std::__uninitialized_copy_a(__first, __last, __new_start, -: 605: _M_get_Tp_allocator()); -: 606: this->_M_impl._M_start = __new_start; -: 607: } -: 608: __catch(...) -: 609: { -: 610: _M_destroy_nodes(__new_start._M_node, -: 611: this->_M_impl._M_start._M_node); -: 612: __throw_exception_again; -: 613: } -: 614: } -: 615: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) -: 616: { -: 617: iterator __new_finish = _M_reserve_elements_at_back(__n); -: 618: __try -: 619: { -: 620: std::__uninitialized_copy_a(__first, __last, -: 621: this->_M_impl._M_finish, -: 622: _M_get_Tp_allocator()); -: 623: this->_M_impl._M_finish = __new_finish; -: 624: } -: 625: __catch(...) -: 626: { -: 627: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, -: 628: __new_finish._M_node + 1); -: 629: __throw_exception_again; -: 630: } -: 631: } -: 632: else -: 633: _M_insert_aux(__pos, __first, __last, __n); -: 634: } -: 635: -: 636: template -: 637:#if __cplusplus >= 201103L -: 638: template -: 639: typename deque<_Tp, _Alloc>::iterator -: 640: deque<_Tp, _Alloc>:: -: 641: _M_insert_aux(iterator __pos, _Args&&... __args) -: 642: { -: 643: value_type __x_copy(std::forward<_Args>(__args)...); // XXX copy -: 644:#else -: 645: typename deque<_Tp, _Alloc>::iterator -: 646: deque<_Tp, _Alloc>:: -: 647: _M_insert_aux(iterator __pos, const value_type& __x) -: 648: { -: 649: value_type __x_copy = __x; // XXX copy -: 650:#endif -: 651: difference_type __index = __pos - this->_M_impl._M_start; -: 652: if (static_cast(__index) < size() / 2) -: 653: { -: 654: push_front(_GLIBCXX_MOVE(front())); -: 655: iterator __front1 = this->_M_impl._M_start; -: 656: ++__front1; -: 657: iterator __front2 = __front1; -: 658: ++__front2; -: 659: __pos = this->_M_impl._M_start + __index; -: 660: iterator __pos1 = __pos; -: 661: ++__pos1; -: 662: _GLIBCXX_MOVE3(__front2, __pos1, __front1); -: 663: } -: 664: else -: 665: { -: 666: push_back(_GLIBCXX_MOVE(back())); -: 667: iterator __back1 = this->_M_impl._M_finish; -: 668: --__back1; -: 669: iterator __back2 = __back1; -: 670: --__back2; -: 671: __pos = this->_M_impl._M_start + __index; -: 672: _GLIBCXX_MOVE_BACKWARD3(__pos, __back2, __back1); -: 673: } -: 674: *__pos = _GLIBCXX_MOVE(__x_copy); -: 675: return __pos; -: 676: } -: 677: -: 678: template -: 679: void -: 680: deque<_Tp, _Alloc>:: -: 681: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) -: 682: { -: 683: const difference_type __elems_before = __pos - this->_M_impl._M_start; -: 684: const size_type __length = this->size(); -: 685: value_type __x_copy = __x; -: 686: if (__elems_before < difference_type(__length / 2)) -: 687: { -: 688: iterator __new_start = _M_reserve_elements_at_front(__n); -: 689: iterator __old_start = this->_M_impl._M_start; -: 690: __pos = this->_M_impl._M_start + __elems_before; -: 691: __try -: 692: { -: 693: if (__elems_before >= difference_type(__n)) -: 694: { -: 695: iterator __start_n = (this->_M_impl._M_start -: 696: + difference_type(__n)); -: 697: std::__uninitialized_move_a(this->_M_impl._M_start, -: 698: __start_n, __new_start, -: 699: _M_get_Tp_allocator()); -: 700: this->_M_impl._M_start = __new_start; -: 701: _GLIBCXX_MOVE3(__start_n, __pos, __old_start); -: 702: std::fill(__pos - difference_type(__n), __pos, __x_copy); -: 703: } -: 704: else -: 705: { -: 706: std::__uninitialized_move_fill(this->_M_impl._M_start, -: 707: __pos, __new_start, -: 708: this->_M_impl._M_start, -: 709: __x_copy, -: 710: _M_get_Tp_allocator()); -: 711: this->_M_impl._M_start = __new_start; -: 712: std::fill(__old_start, __pos, __x_copy); -: 713: } -: 714: } -: 715: __catch(...) -: 716: { -: 717: _M_destroy_nodes(__new_start._M_node, -: 718: this->_M_impl._M_start._M_node); -: 719: __throw_exception_again; -: 720: } -: 721: } -: 722: else -: 723: { -: 724: iterator __new_finish = _M_reserve_elements_at_back(__n); -: 725: iterator __old_finish = this->_M_impl._M_finish; -: 726: const difference_type __elems_after = -: 727: difference_type(__length) - __elems_before; -: 728: __pos = this->_M_impl._M_finish - __elems_after; -: 729: __try -: 730: { -: 731: if (__elems_after > difference_type(__n)) -: 732: { -: 733: iterator __finish_n = (this->_M_impl._M_finish -: 734: - difference_type(__n)); -: 735: std::__uninitialized_move_a(__finish_n, -: 736: this->_M_impl._M_finish, -: 737: this->_M_impl._M_finish, -: 738: _M_get_Tp_allocator()); -: 739: this->_M_impl._M_finish = __new_finish; -: 740: _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish); -: 741: std::fill(__pos, __pos + difference_type(__n), __x_copy); -: 742: } -: 743: else -: 744: { -: 745: std::__uninitialized_fill_move(this->_M_impl._M_finish, -: 746: __pos + difference_type(__n), -: 747: __x_copy, __pos, -: 748: this->_M_impl._M_finish, -: 749: _M_get_Tp_allocator()); -: 750: this->_M_impl._M_finish = __new_finish; -: 751: std::fill(__pos, __old_finish, __x_copy); -: 752: } -: 753: } -: 754: __catch(...) -: 755: { -: 756: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, -: 757: __new_finish._M_node + 1); -: 758: __throw_exception_again; -: 759: } -: 760: } -: 761: } -: 762: -: 763: template -: 764: template -: 765: void -: 766: deque<_Tp, _Alloc>:: -: 767: _M_insert_aux(iterator __pos, -: 768: _ForwardIterator __first, _ForwardIterator __last, -: 769: size_type __n) -: 770: { -: 771: const difference_type __elemsbefore = __pos - this->_M_impl._M_start; -: 772: const size_type __length = size(); -: 773: if (static_cast(__elemsbefore) < __length / 2) -: 774: { -: 775: iterator __new_start = _M_reserve_elements_at_front(__n); -: 776: iterator __old_start = this->_M_impl._M_start; -: 777: __pos = this->_M_impl._M_start + __elemsbefore; -: 778: __try -: 779: { -: 780: if (__elemsbefore >= difference_type(__n)) -: 781: { -: 782: iterator __start_n = (this->_M_impl._M_start -: 783: + difference_type(__n)); -: 784: std::__uninitialized_move_a(this->_M_impl._M_start, -: 785: __start_n, __new_start, -: 786: _M_get_Tp_allocator()); -: 787: this->_M_impl._M_start = __new_start; -: 788: _GLIBCXX_MOVE3(__start_n, __pos, __old_start); -: 789: std::copy(__first, __last, __pos - difference_type(__n)); -: 790: } -: 791: else -: 792: { -: 793: _ForwardIterator __mid = __first; -: 794: std::advance(__mid, difference_type(__n) - __elemsbefore); -: 795: std::__uninitialized_move_copy(this->_M_impl._M_start, -: 796: __pos, __first, __mid, -: 797: __new_start, -: 798: _M_get_Tp_allocator()); -: 799: this->_M_impl._M_start = __new_start; -: 800: std::copy(__mid, __last, __old_start); -: 801: } -: 802: } -: 803: __catch(...) -: 804: { -: 805: _M_destroy_nodes(__new_start._M_node, -: 806: this->_M_impl._M_start._M_node); -: 807: __throw_exception_again; -: 808: } -: 809: } -: 810: else -: 811: { -: 812: iterator __new_finish = _M_reserve_elements_at_back(__n); -: 813: iterator __old_finish = this->_M_impl._M_finish; -: 814: const difference_type __elemsafter = -: 815: difference_type(__length) - __elemsbefore; -: 816: __pos = this->_M_impl._M_finish - __elemsafter; -: 817: __try -: 818: { -: 819: if (__elemsafter > difference_type(__n)) -: 820: { -: 821: iterator __finish_n = (this->_M_impl._M_finish -: 822: - difference_type(__n)); -: 823: std::__uninitialized_move_a(__finish_n, -: 824: this->_M_impl._M_finish, -: 825: this->_M_impl._M_finish, -: 826: _M_get_Tp_allocator()); -: 827: this->_M_impl._M_finish = __new_finish; -: 828: _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish); -: 829: std::copy(__first, __last, __pos); -: 830: } -: 831: else -: 832: { -: 833: _ForwardIterator __mid = __first; -: 834: std::advance(__mid, __elemsafter); -: 835: std::__uninitialized_copy_move(__mid, __last, __pos, -: 836: this->_M_impl._M_finish, -: 837: this->_M_impl._M_finish, -: 838: _M_get_Tp_allocator()); -: 839: this->_M_impl._M_finish = __new_finish; -: 840: std::copy(__first, __mid, __pos); -: 841: } -: 842: } -: 843: __catch(...) -: 844: { -: 845: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, -: 846: __new_finish._M_node + 1); -: 847: __throw_exception_again; -: 848: } -: 849: } -: 850: } -: 851: -: 852: template -: 853: void function _ZNSt5dequeISt10unique_ptrIN5Botan11SecureQueueESt14default_deleteIS2_EESaIS5_EE19_M_destroy_data_auxESt15_Deque_iteratorIS5_RS5_PS5_ESB_ called 1034 returned 100% blocks executed 34% 1034: 854: deque<_Tp, _Alloc>:: -: 855: _M_destroy_data_aux(iterator __first, iterator __last) -: 856: { 1034*: 857: for (_Map_pointer __node = __first._M_node + 1; 1034: 858: __node < __last._M_node; ++__node) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 859: std::_Destroy(*__node, *__node + _S_buffer_size(), #####: 860: _M_get_Tp_allocator()); -: 861: 1034: 862: if (__first._M_node != __last._M_node) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 863: { #####: 864: std::_Destroy(__first._M_cur, __first._M_last, #####: 865: _M_get_Tp_allocator()); #####: 866: std::_Destroy(__last._M_first, __last._M_cur, #####: 867: _M_get_Tp_allocator()); -: 868: } -: 869: else 1034: 870: std::_Destroy(__first._M_cur, __last._M_cur, 1034: 871: _M_get_Tp_allocator()); 1034: 872: } -: 873: -: 874: template -: 875: void -: 876: deque<_Tp, _Alloc>:: -: 877: _M_new_elements_at_front(size_type __new_elems) -: 878: { -: 879: if (this->max_size() - this->size() < __new_elems) -: 880: __throw_length_error(__N("deque::_M_new_elements_at_front")); -: 881: -: 882: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) -: 883: / _S_buffer_size()); -: 884: _M_reserve_map_at_front(__new_nodes); -: 885: size_type __i; -: 886: __try -: 887: { -: 888: for (__i = 1; __i <= __new_nodes; ++__i) -: 889: *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); -: 890: } -: 891: __catch(...) -: 892: { -: 893: for (size_type __j = 1; __j < __i; ++__j) -: 894: _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); -: 895: __throw_exception_again; -: 896: } -: 897: } -: 898: -: 899: template -: 900: void -: 901: deque<_Tp, _Alloc>:: -: 902: _M_new_elements_at_back(size_type __new_elems) -: 903: { -: 904: if (this->max_size() - this->size() < __new_elems) -: 905: __throw_length_error(__N("deque::_M_new_elements_at_back")); -: 906: -: 907: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) -: 908: / _S_buffer_size()); -: 909: _M_reserve_map_at_back(__new_nodes); -: 910: size_type __i; -: 911: __try -: 912: { -: 913: for (__i = 1; __i <= __new_nodes; ++__i) -: 914: *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); -: 915: } -: 916: __catch(...) -: 917: { -: 918: for (size_type __j = 1; __j < __i; ++__j) -: 919: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); -: 920: __throw_exception_again; -: 921: } -: 922: } -: 923: -: 924: template -: 925: void -: 926: deque<_Tp, _Alloc>:: -: 927: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) -: 928: { -: 929: const size_type __old_num_nodes -: 930: = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; -: 931: const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; -: 932: -: 933: _Map_pointer __new_nstart; -: 934: if (this->_M_impl._M_map_size > 2 * __new_num_nodes) -: 935: { -: 936: __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size -: 937: - __new_num_nodes) / 2 -: 938: + (__add_at_front ? __nodes_to_add : 0); -: 939: if (__new_nstart < this->_M_impl._M_start._M_node) -: 940: std::copy(this->_M_impl._M_start._M_node, -: 941: this->_M_impl._M_finish._M_node + 1, -: 942: __new_nstart); -: 943: else -: 944: std::copy_backward(this->_M_impl._M_start._M_node, -: 945: this->_M_impl._M_finish._M_node + 1, -: 946: __new_nstart + __old_num_nodes); -: 947: } -: 948: else -: 949: { -: 950: size_type __new_map_size = this->_M_impl._M_map_size -: 951: + std::max(this->_M_impl._M_map_size, -: 952: __nodes_to_add) + 2; -: 953: -: 954: _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); -: 955: __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 -: 956: + (__add_at_front ? __nodes_to_add : 0); -: 957: std::copy(this->_M_impl._M_start._M_node, -: 958: this->_M_impl._M_finish._M_node + 1, -: 959: __new_nstart); -: 960: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); -: 961: -: 962: this->_M_impl._M_map = __new_map; -: 963: this->_M_impl._M_map_size = __new_map_size; -: 964: } -: 965: -: 966: this->_M_impl._M_start._M_set_node(__new_nstart); -: 967: this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); -: 968: } -: 969: -: 970: // Overload for deque::iterators, exploiting the "segmented-iterator -: 971: // optimization". -: 972: template -: 973: void -: 974: fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, -: 975: const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) -: 976: { -: 977: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; -: 978: -: 979: for (typename _Self::_Map_pointer __node = __first._M_node + 1; -: 980: __node < __last._M_node; ++__node) -: 981: std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); -: 982: -: 983: if (__first._M_node != __last._M_node) -: 984: { -: 985: std::fill(__first._M_cur, __first._M_last, __value); -: 986: std::fill(__last._M_first, __last._M_cur, __value); -: 987: } -: 988: else -: 989: std::fill(__first._M_cur, __last._M_cur, __value); -: 990: } -: 991: -: 992: template -: 993: _Deque_iterator<_Tp, _Tp&, _Tp*> -: 994: copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, -: 995: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, -: 996: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) -: 997: { -: 998: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; -: 999: typedef typename _Self::difference_type difference_type; -: 1000: -: 1001: difference_type __len = __last - __first; -: 1002: while (__len > 0) -: 1003: { -: 1004: const difference_type __clen -: 1005: = std::min(__len, std::min(__first._M_last - __first._M_cur, -: 1006: __result._M_last - __result._M_cur)); -: 1007: std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); -: 1008: __first += __clen; -: 1009: __result += __clen; -: 1010: __len -= __clen; -: 1011: } -: 1012: return __result; -: 1013: } -: 1014: -: 1015: template -: 1016: _Deque_iterator<_Tp, _Tp&, _Tp*> -: 1017: copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, -: 1018: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, -: 1019: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) -: 1020: { -: 1021: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; -: 1022: typedef typename _Self::difference_type difference_type; -: 1023: -: 1024: difference_type __len = __last - __first; -: 1025: while (__len > 0) -: 1026: { -: 1027: difference_type __llen = __last._M_cur - __last._M_first; -: 1028: _Tp* __lend = __last._M_cur; -: 1029: -: 1030: difference_type __rlen = __result._M_cur - __result._M_first; -: 1031: _Tp* __rend = __result._M_cur; -: 1032: -: 1033: if (!__llen) -: 1034: { -: 1035: __llen = _Self::_S_buffer_size(); -: 1036: __lend = *(__last._M_node - 1) + __llen; -: 1037: } -: 1038: if (!__rlen) -: 1039: { -: 1040: __rlen = _Self::_S_buffer_size(); -: 1041: __rend = *(__result._M_node - 1) + __rlen; -: 1042: } -: 1043: -: 1044: const difference_type __clen = std::min(__len, -: 1045: std::min(__llen, __rlen)); -: 1046: std::copy_backward(__lend - __clen, __lend, __rend); -: 1047: __last -= __clen; -: 1048: __result -= __clen; -: 1049: __len -= __clen; -: 1050: } -: 1051: return __result; -: 1052: } -: 1053: -: 1054:#if __cplusplus >= 201103L -: 1055: template -: 1056: _Deque_iterator<_Tp, _Tp&, _Tp*> -: 1057: move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, -: 1058: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, -: 1059: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) -: 1060: { -: 1061: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; -: 1062: typedef typename _Self::difference_type difference_type; -: 1063: -: 1064: difference_type __len = __last - __first; -: 1065: while (__len > 0) -: 1066: { -: 1067: const difference_type __clen -: 1068: = std::min(__len, std::min(__first._M_last - __first._M_cur, -: 1069: __result._M_last - __result._M_cur)); -: 1070: std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur); -: 1071: __first += __clen; -: 1072: __result += __clen; -: 1073: __len -= __clen; -: 1074: } -: 1075: return __result; -: 1076: } -: 1077: -: 1078: template -: 1079: _Deque_iterator<_Tp, _Tp&, _Tp*> -: 1080: move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, -: 1081: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, -: 1082: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) -: 1083: { -: 1084: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; -: 1085: typedef typename _Self::difference_type difference_type; -: 1086: -: 1087: difference_type __len = __last - __first; -: 1088: while (__len > 0) -: 1089: { -: 1090: difference_type __llen = __last._M_cur - __last._M_first; -: 1091: _Tp* __lend = __last._M_cur; -: 1092: -: 1093: difference_type __rlen = __result._M_cur - __result._M_first; -: 1094: _Tp* __rend = __result._M_cur; -: 1095: -: 1096: if (!__llen) -: 1097: { -: 1098: __llen = _Self::_S_buffer_size(); -: 1099: __lend = *(__last._M_node - 1) + __llen; -: 1100: } -: 1101: if (!__rlen) -: 1102: { -: 1103: __rlen = _Self::_S_buffer_size(); -: 1104: __rend = *(__result._M_node - 1) + __rlen; -: 1105: } -: 1106: -: 1107: const difference_type __clen = std::min(__len, -: 1108: std::min(__llen, __rlen)); -: 1109: std::move_backward(__lend - __clen, __lend, __rend); -: 1110: __last -= __clen; -: 1111: __result -= __clen; -: 1112: __len -= __clen; -: 1113: } -: 1114: return __result; -: 1115: } -: 1116:#endif -: 1117: -: 1118:_GLIBCXX_END_NAMESPACE_CONTAINER -: 1119:_GLIBCXX_END_NAMESPACE_VERSION -: 1120:} // namespace std -: 1121: -: 1122:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#filters#buf_filt.cpp.gcov -: 0:Source:src/lib/filters/buf_filt.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/filters_buf_filt.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/filters_buf_filt.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Buffered Filter -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12: -: 13:namespace Botan { -: 14: -: 15:/* -: 16:* Buffered_Filter Constructor -: 17:*/ function _ZN5Botan15Buffered_FilterC2Emm called 4 returned 100% blocks executed 14% 4: 18:Buffered_Filter::Buffered_Filter(size_t b, size_t f) : 4: 19: m_main_block_mod(b), m_final_minimum(f) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 20: { 4: 21: if(m_main_block_mod == 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 22: throw Invalid_Argument("m_main_block_mod == 0"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 23: 4: 24: if(m_final_minimum > m_main_block_mod) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 25: throw Invalid_Argument("m_final_minimum > m_main_block_mod"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 26: 4: 27: m_buffer.resize(2 * m_main_block_mod); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 28: m_buffer_pos = 0; 4: 29: } -: 30: -: 31:/* -: 32:* Buffer input into blocks, trying to minimize copying -: 33:*/ function _ZN5Botan15Buffered_Filter5writeEPKhm called 49 returned 100% blocks executed 89% 49: 34:void Buffered_Filter::write(const uint8_t input[], size_t input_size) -: 35: { 49: 36: if(!input_size) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 37: return; -: 38: 49: 39: if(m_buffer_pos + input_size >= m_main_block_mod + m_final_minimum) branch 0 taken 4% (fallthrough) branch 1 taken 96% -: 40: { 2: 41: size_t to_copy = std::min(m_buffer.size() - m_buffer_pos, input_size); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 42: 2: 43: copy_mem(&m_buffer[m_buffer_pos], input, to_copy); call 0 returned 100% 2: 44: m_buffer_pos += to_copy; -: 45: 2: 46: input += to_copy; 2: 47: input_size -= to_copy; -: 48: 2: 49: size_t total_to_consume = 6: 50: round_down(std::min(m_buffer_pos, 3: 51: m_buffer_pos + input_size - m_final_minimum), branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 52: m_main_block_mod); -: 53: 2: 54: buffered_block(m_buffer.data(), total_to_consume); call 0 returned 100% -: 55: 2: 56: m_buffer_pos -= total_to_consume; -: 57: 2: 58: copy_mem(m_buffer.data(), m_buffer.data() + total_to_consume, m_buffer_pos); call 0 returned 100% -: 59: } -: 60: 49: 61: if(input_size >= m_final_minimum) branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 62: { 48: 63: size_t full_blocks = (input_size - m_final_minimum) / m_main_block_mod; 48: 64: size_t to_copy = full_blocks * m_main_block_mod; -: 65: 48: 66: if(to_copy) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 67: { #####: 68: buffered_block(input, to_copy); call 0 never executed -: 69: #####: 70: input += to_copy; #####: 71: input_size -= to_copy; -: 72: } -: 73: } -: 74: 49: 75: copy_mem(&m_buffer[m_buffer_pos], input, input_size); call 0 returned 100% 49: 76: m_buffer_pos += input_size; -: 77: } -: 78: -: 79:/* -: 80:* Finish/flush operation -: 81:*/ function _ZN5Botan15Buffered_Filter7end_msgEv called 33 returned 100% blocks executed 25% 33: 82:void Buffered_Filter::end_msg() -: 83: { 33: 84: if(m_buffer_pos < m_final_minimum) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 85: throw Invalid_State("Buffered filter end_msg without enough input"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 86: 33: 87: size_t spare_blocks = (m_buffer_pos - m_final_minimum) / m_main_block_mod; -: 88: 33: 89: if(spare_blocks) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 90: { #####: 91: size_t spare_bytes = m_main_block_mod * spare_blocks; #####: 92: buffered_block(m_buffer.data(), spare_bytes); call 0 never executed #####: 93: buffered_final(&m_buffer[spare_bytes], m_buffer_pos - spare_bytes); call 0 never executed -: 94: } -: 95: else -: 96: { 33: 97: buffered_final(m_buffer.data(), m_buffer_pos); call 0 returned 100% -: 98: } -: 99: 33: 100: m_buffer_pos = 0; 33: 101: } -: 102: -: 103:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#redc_p521.cpp.gcov -: 0:Source:src/fuzzer/redc_p521.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/redc_p521.gcno -: 0:Data:- -: 0:Runs:0 -: 1:/* -: 2:* (C) 2015,2016 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "fuzzers.h" -: 8:#include -: 9:#include -: 10: function _Z4fuzzPKhm called 0 returned 0% blocks executed 0% #####: 11:void fuzz(const uint8_t in[], size_t len) -: 12: { #####: 13: if(len > 2*(521+7)/8) branch 0 never executed branch 1 never executed #####: 14: return; -: 15: #####: 16: static const Botan::BigInt& prime = Botan::prime_p521(); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed #####: 17: static const Botan::BigInt prime_2 = prime * prime; branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed call 10 never executed #####: 18: static Botan::Modular_Reducer prime_redc(prime); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed call 10 never executed -: 19: #####: 20: Botan::BigInt input = Botan::BigInt::decode(in, len); call 0 never executed -: 21: #####: 22: if(input < prime_2) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 23: { #####: 24: const Botan::BigInt ref = prime_redc.reduce(input); call 0 never executed branch 1 never executed branch 2 never executed -: 25: #####: 26: Botan::secure_vector ws; call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 27: Botan::redc_p521(input, ws); call 0 never executed branch 1 never executed branch 2 never executed -: 28: #####: 29: FUZZER_ASSERT_EQUAL(ref, input); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed branch 9 never executed branch 10 never executed call 11 never executed branch 12 never executed branch 13 never executed call 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed call 20 never executed branch 21 never executed branch 22 never executed call 23 never executed branch 24 never executed branch 25 never executed call 26 never executed branch 27 never executed branch 28 never executed call 29 never executed -: 30: } -: 31: } <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#cfb.h.gcov -: 0:Source:build/include/botan/cfb.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/modes_cfb.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/modes_cfb.gcda -: 0:Runs:2947 -: 1:/* -: 2:* CFB mode -: 3:* (C) 1999-2007,2013 Jack Lloyd -: 4:* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#ifndef BOTAN_MODE_CFB_H_ -: 10:#define BOTAN_MODE_CFB_H_ -: 11: -: 12:#include -: 13:#include -: 14: -: 15:BOTAN_FUTURE_INTERNAL_HEADER(cfb.h) -: 16: -: 17:namespace Botan { -: 18: -: 19:/** -: 20:* CFB Mode -: 21:*/ -: 22:class BOTAN_PUBLIC_API(2,0) CFB_Mode : public Cipher_Mode -: 23: { -: 24: public: -: 25: std::string name() const override final; -: 26: -: 27: size_t update_granularity() const override final; -: 28: -: 29: size_t minimum_final_size() const override final; -: 30: -: 31: Key_Length_Specification key_spec() const override final; -: 32: -: 33: size_t output_length(size_t input_length) const override final; -: 34: -: 35: size_t default_nonce_length() const override final; -: 36: -: 37: bool valid_nonce_length(size_t n) const override final; -: 38: -: 39: void clear() override final; -: 40: -: 41: void reset() override final; -: 42: protected: -: 43: CFB_Mode(BlockCipher* cipher, size_t feedback_bits); -: 44: -: 45: void shift_register(); -: 46: 5927: 47: size_t feedback() const { return m_feedback_bytes; } branch 0 taken 1% (fallthrough) branch 1 taken 99% branch 2 taken 1% (fallthrough) branch 3 taken 99% branch 4 taken 76% (fallthrough) branch 5 taken 24% call 6 returned 100% call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) 6460: 48: const BlockCipher& cipher() const { return *m_cipher; } call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) 4694: 49: size_t block_size() const { return m_block_size; } branch 0 taken 76% (fallthrough) branch 1 taken 24% branch 2 taken 77% (fallthrough) branch 3 taken 23% -: 50: -: 51: secure_vector m_state; -: 52: secure_vector m_keystream; -: 53: size_t m_keystream_pos = 0; -: 54: -: 55: private: -: 56: void start_msg(const uint8_t nonce[], size_t nonce_len) override; -: 57: void key_schedule(const uint8_t key[], size_t length) override; -: 58: -: 59: std::unique_ptr m_cipher; -: 60: const size_t m_block_size; -: 61: const size_t m_feedback_bytes; -: 62: }; -: 63: -: 64:/** -: 65:* CFB Encryption -: 66:*/ -: 67:class BOTAN_PUBLIC_API(2,0) CFB_Encryption final : public CFB_Mode -: 68: { -: 69: public: -: 70: /** -: 71: * If feedback_bits is zero, cipher->block_size() bytes will be used. -: 72: * @param cipher block cipher to use -: 73: * @param feedback_bits number of bits fed back into the shift register, -: 74: * must be a multiple of 8 -: 75: */ -: 76: CFB_Encryption(BlockCipher* cipher, size_t feedback_bits) : -: 77: CFB_Mode(cipher, feedback_bits) {} -: 78: -: 79: size_t process(uint8_t buf[], size_t size) override; -: 80: -: 81: void finish(secure_vector& final_block, size_t offset = 0) override; -: 82: }; -: 83: -: 84:/** -: 85:* CFB Decryption -: 86:*/ -: 87:class BOTAN_PUBLIC_API(2,0) CFB_Decryption final : public CFB_Mode -: 88: { -: 89: public: -: 90: /** -: 91: * If feedback_bits is zero, cipher->block_size() bytes will be used. -: 92: * @param cipher block cipher to use -: 93: * @param feedback_bits number of bits fed back into the shift register, -: 94: * must be a multiple of 8 -: 95: */ -: 96: CFB_Decryption(BlockCipher* cipher, size_t feedback_bits) : -: 97: CFB_Mode(cipher, feedback_bits) {} -: 98: -: 99: size_t process(uint8_t buf[], size_t size) override; -: 100: -: 101: void finish(secure_vector& final_block, size_t offset = 0) override; -: 102: }; -: 103: -: 104:} -: 105: -: 106:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#socket_base.hpp.gcov -: 0:Source:/usr/include/boost/asio/socket_base.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// socket_base.hpp -: 3:// ~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_SOCKET_BASE_HPP -: 12:#define BOOST_ASIO_SOCKET_BASE_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22: -: 23:#include -: 24: -: 25:namespace boost { -: 26:namespace asio { -: 27: -: 28:/// The socket_base class is used as a base for the basic_stream_socket and -: 29:/// basic_datagram_socket class templates so that we have a common place to -: 30:/// define the shutdown_type and enum. -: 31:class socket_base -: 32:{ -: 33:public: -: 34: /// Different ways a socket may be shutdown. -: 35: enum shutdown_type -: 36: { -: 37:#if defined(GENERATING_DOCUMENTATION) -: 38: /// Shutdown the receive side of the socket. -: 39: shutdown_receive = implementation_defined, -: 40: -: 41: /// Shutdown the send side of the socket. -: 42: shutdown_send = implementation_defined, -: 43: -: 44: /// Shutdown both send and receive on the socket. -: 45: shutdown_both = implementation_defined -: 46:#else -: 47: shutdown_receive = BOOST_ASIO_OS_DEF(SHUT_RD), -: 48: shutdown_send = BOOST_ASIO_OS_DEF(SHUT_WR), -: 49: shutdown_both = BOOST_ASIO_OS_DEF(SHUT_RDWR) -: 50:#endif -: 51: }; -: 52: -: 53: /// Bitmask type for flags that can be passed to send and receive operations. -: 54: typedef int message_flags; -: 55: -: 56:#if defined(GENERATING_DOCUMENTATION) -: 57: /// Peek at incoming data without removing it from the input queue. -: 58: static const int message_peek = implementation_defined; -: 59: -: 60: /// Process out-of-band data. -: 61: static const int message_out_of_band = implementation_defined; -: 62: -: 63: /// Specify that the data should not be subject to routing. -: 64: static const int message_do_not_route = implementation_defined; -: 65: -: 66: /// Specifies that the data marks the end of a record. -: 67: static const int message_end_of_record = implementation_defined; -: 68:#else -: 69: BOOST_ASIO_STATIC_CONSTANT(int, -: 70: message_peek = BOOST_ASIO_OS_DEF(MSG_PEEK)); -: 71: BOOST_ASIO_STATIC_CONSTANT(int, -: 72: message_out_of_band = BOOST_ASIO_OS_DEF(MSG_OOB)); -: 73: BOOST_ASIO_STATIC_CONSTANT(int, -: 74: message_do_not_route = BOOST_ASIO_OS_DEF(MSG_DONTROUTE)); -: 75: BOOST_ASIO_STATIC_CONSTANT(int, -: 76: message_end_of_record = BOOST_ASIO_OS_DEF(MSG_EOR)); -: 77:#endif -: 78: -: 79: /// Wait types. -: 80: /** -: 81: * For use with basic_socket::wait() and basic_socket::async_wait(). -: 82: */ -: 83: enum wait_type -: 84: { -: 85: /// Wait for a socket to become ready to read. -: 86: wait_read, -: 87: -: 88: /// Wait for a socket to become ready to write. -: 89: wait_write, -: 90: -: 91: /// Wait for a socket to have error conditions pending. -: 92: wait_error -: 93: }; -: 94: -: 95: /// Socket option to permit sending of broadcast messages. -: 96: /** -: 97: * Implements the SOL_SOCKET/SO_BROADCAST socket option. -: 98: * -: 99: * @par Examples -: 100: * Setting the option: -: 101: * @code -: 102: * boost::asio::ip::udp::socket socket(my_context); -: 103: * ... -: 104: * boost::asio::socket_base::broadcast option(true); -: 105: * socket.set_option(option); -: 106: * @endcode -: 107: * -: 108: * @par -: 109: * Getting the current option value: -: 110: * @code -: 111: * boost::asio::ip::udp::socket socket(my_context); -: 112: * ... -: 113: * boost::asio::socket_base::broadcast option; -: 114: * socket.get_option(option); -: 115: * bool is_set = option.value(); -: 116: * @endcode -: 117: * -: 118: * @par Concepts: -: 119: * Socket_Option, Boolean_Socket_Option. -: 120: */ -: 121:#if defined(GENERATING_DOCUMENTATION) -: 122: typedef implementation_defined broadcast; -: 123:#else -: 124: typedef boost::asio::detail::socket_option::boolean< -: 125: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_BROADCAST)> -: 126: broadcast; -: 127:#endif -: 128: -: 129: /// Socket option to enable socket-level debugging. -: 130: /** -: 131: * Implements the SOL_SOCKET/SO_DEBUG socket option. -: 132: * -: 133: * @par Examples -: 134: * Setting the option: -: 135: * @code -: 136: * boost::asio::ip::tcp::socket socket(my_context); -: 137: * ... -: 138: * boost::asio::socket_base::debug option(true); -: 139: * socket.set_option(option); -: 140: * @endcode -: 141: * -: 142: * @par -: 143: * Getting the current option value: -: 144: * @code -: 145: * boost::asio::ip::tcp::socket socket(my_context); -: 146: * ... -: 147: * boost::asio::socket_base::debug option; -: 148: * socket.get_option(option); -: 149: * bool is_set = option.value(); -: 150: * @endcode -: 151: * -: 152: * @par Concepts: -: 153: * Socket_Option, Boolean_Socket_Option. -: 154: */ -: 155:#if defined(GENERATING_DOCUMENTATION) -: 156: typedef implementation_defined debug; -: 157:#else -: 158: typedef boost::asio::detail::socket_option::boolean< -: 159: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DEBUG)> debug; -: 160:#endif -: 161: -: 162: /// Socket option to prevent routing, use local interfaces only. -: 163: /** -: 164: * Implements the SOL_SOCKET/SO_DONTROUTE socket option. -: 165: * -: 166: * @par Examples -: 167: * Setting the option: -: 168: * @code -: 169: * boost::asio::ip::udp::socket socket(my_context); -: 170: * ... -: 171: * boost::asio::socket_base::do_not_route option(true); -: 172: * socket.set_option(option); -: 173: * @endcode -: 174: * -: 175: * @par -: 176: * Getting the current option value: -: 177: * @code -: 178: * boost::asio::ip::udp::socket socket(my_context); -: 179: * ... -: 180: * boost::asio::socket_base::do_not_route option; -: 181: * socket.get_option(option); -: 182: * bool is_set = option.value(); -: 183: * @endcode -: 184: * -: 185: * @par Concepts: -: 186: * Socket_Option, Boolean_Socket_Option. -: 187: */ -: 188:#if defined(GENERATING_DOCUMENTATION) -: 189: typedef implementation_defined do_not_route; -: 190:#else -: 191: typedef boost::asio::detail::socket_option::boolean< -: 192: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_DONTROUTE)> -: 193: do_not_route; -: 194:#endif -: 195: -: 196: /// Socket option to send keep-alives. -: 197: /** -: 198: * Implements the SOL_SOCKET/SO_KEEPALIVE socket option. -: 199: * -: 200: * @par Examples -: 201: * Setting the option: -: 202: * @code -: 203: * boost::asio::ip::tcp::socket socket(my_context); -: 204: * ... -: 205: * boost::asio::socket_base::keep_alive option(true); -: 206: * socket.set_option(option); -: 207: * @endcode -: 208: * -: 209: * @par -: 210: * Getting the current option value: -: 211: * @code -: 212: * boost::asio::ip::tcp::socket socket(my_context); -: 213: * ... -: 214: * boost::asio::socket_base::keep_alive option; -: 215: * socket.get_option(option); -: 216: * bool is_set = option.value(); -: 217: * @endcode -: 218: * -: 219: * @par Concepts: -: 220: * Socket_Option, Boolean_Socket_Option. -: 221: */ -: 222:#if defined(GENERATING_DOCUMENTATION) -: 223: typedef implementation_defined keep_alive; -: 224:#else -: 225: typedef boost::asio::detail::socket_option::boolean< -: 226: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_KEEPALIVE)> keep_alive; -: 227:#endif -: 228: -: 229: /// Socket option for the send buffer size of a socket. -: 230: /** -: 231: * Implements the SOL_SOCKET/SO_SNDBUF socket option. -: 232: * -: 233: * @par Examples -: 234: * Setting the option: -: 235: * @code -: 236: * boost::asio::ip::tcp::socket socket(my_context); -: 237: * ... -: 238: * boost::asio::socket_base::send_buffer_size option(8192); -: 239: * socket.set_option(option); -: 240: * @endcode -: 241: * -: 242: * @par -: 243: * Getting the current option value: -: 244: * @code -: 245: * boost::asio::ip::tcp::socket socket(my_context); -: 246: * ... -: 247: * boost::asio::socket_base::send_buffer_size option; -: 248: * socket.get_option(option); -: 249: * int size = option.value(); -: 250: * @endcode -: 251: * -: 252: * @par Concepts: -: 253: * Socket_Option, Integer_Socket_Option. -: 254: */ -: 255:#if defined(GENERATING_DOCUMENTATION) -: 256: typedef implementation_defined send_buffer_size; -: 257:#else -: 258: typedef boost::asio::detail::socket_option::integer< -: 259: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDBUF)> -: 260: send_buffer_size; -: 261:#endif -: 262: -: 263: /// Socket option for the send low watermark. -: 264: /** -: 265: * Implements the SOL_SOCKET/SO_SNDLOWAT socket option. -: 266: * -: 267: * @par Examples -: 268: * Setting the option: -: 269: * @code -: 270: * boost::asio::ip::tcp::socket socket(my_context); -: 271: * ... -: 272: * boost::asio::socket_base::send_low_watermark option(1024); -: 273: * socket.set_option(option); -: 274: * @endcode -: 275: * -: 276: * @par -: 277: * Getting the current option value: -: 278: * @code -: 279: * boost::asio::ip::tcp::socket socket(my_context); -: 280: * ... -: 281: * boost::asio::socket_base::send_low_watermark option; -: 282: * socket.get_option(option); -: 283: * int size = option.value(); -: 284: * @endcode -: 285: * -: 286: * @par Concepts: -: 287: * Socket_Option, Integer_Socket_Option. -: 288: */ -: 289:#if defined(GENERATING_DOCUMENTATION) -: 290: typedef implementation_defined send_low_watermark; -: 291:#else -: 292: typedef boost::asio::detail::socket_option::integer< -: 293: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_SNDLOWAT)> -: 294: send_low_watermark; -: 295:#endif -: 296: -: 297: /// Socket option for the receive buffer size of a socket. -: 298: /** -: 299: * Implements the SOL_SOCKET/SO_RCVBUF socket option. -: 300: * -: 301: * @par Examples -: 302: * Setting the option: -: 303: * @code -: 304: * boost::asio::ip::tcp::socket socket(my_context); -: 305: * ... -: 306: * boost::asio::socket_base::receive_buffer_size option(8192); -: 307: * socket.set_option(option); -: 308: * @endcode -: 309: * -: 310: * @par -: 311: * Getting the current option value: -: 312: * @code -: 313: * boost::asio::ip::tcp::socket socket(my_context); -: 314: * ... -: 315: * boost::asio::socket_base::receive_buffer_size option; -: 316: * socket.get_option(option); -: 317: * int size = option.value(); -: 318: * @endcode -: 319: * -: 320: * @par Concepts: -: 321: * Socket_Option, Integer_Socket_Option. -: 322: */ -: 323:#if defined(GENERATING_DOCUMENTATION) -: 324: typedef implementation_defined receive_buffer_size; -: 325:#else -: 326: typedef boost::asio::detail::socket_option::integer< -: 327: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVBUF)> -: 328: receive_buffer_size; -: 329:#endif -: 330: -: 331: /// Socket option for the receive low watermark. -: 332: /** -: 333: * Implements the SOL_SOCKET/SO_RCVLOWAT socket option. -: 334: * -: 335: * @par Examples -: 336: * Setting the option: -: 337: * @code -: 338: * boost::asio::ip::tcp::socket socket(my_context); -: 339: * ... -: 340: * boost::asio::socket_base::receive_low_watermark option(1024); -: 341: * socket.set_option(option); -: 342: * @endcode -: 343: * -: 344: * @par -: 345: * Getting the current option value: -: 346: * @code -: 347: * boost::asio::ip::tcp::socket socket(my_context); -: 348: * ... -: 349: * boost::asio::socket_base::receive_low_watermark option; -: 350: * socket.get_option(option); -: 351: * int size = option.value(); -: 352: * @endcode -: 353: * -: 354: * @par Concepts: -: 355: * Socket_Option, Integer_Socket_Option. -: 356: */ -: 357:#if defined(GENERATING_DOCUMENTATION) -: 358: typedef implementation_defined receive_low_watermark; -: 359:#else -: 360: typedef boost::asio::detail::socket_option::integer< -: 361: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_RCVLOWAT)> -: 362: receive_low_watermark; -: 363:#endif -: 364: -: 365: /// Socket option to allow the socket to be bound to an address that is -: 366: /// already in use. -: 367: /** -: 368: * Implements the SOL_SOCKET/SO_REUSEADDR socket option. -: 369: * -: 370: * @par Examples -: 371: * Setting the option: -: 372: * @code -: 373: * boost::asio::ip::tcp::acceptor acceptor(my_context); -: 374: * ... -: 375: * boost::asio::socket_base::reuse_address option(true); -: 376: * acceptor.set_option(option); -: 377: * @endcode -: 378: * -: 379: * @par -: 380: * Getting the current option value: -: 381: * @code -: 382: * boost::asio::ip::tcp::acceptor acceptor(my_context); -: 383: * ... -: 384: * boost::asio::socket_base::reuse_address option; -: 385: * acceptor.get_option(option); -: 386: * bool is_set = option.value(); -: 387: * @endcode -: 388: * -: 389: * @par Concepts: -: 390: * Socket_Option, Boolean_Socket_Option. -: 391: */ -: 392:#if defined(GENERATING_DOCUMENTATION) -: 393: typedef implementation_defined reuse_address; -: 394:#else -: 395: typedef boost::asio::detail::socket_option::boolean< -: 396: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_REUSEADDR)> -: 397: reuse_address; -: 398:#endif -: 399: -: 400: /// Socket option to specify whether the socket lingers on close if unsent -: 401: /// data is present. -: 402: /** -: 403: * Implements the SOL_SOCKET/SO_LINGER socket option. -: 404: * -: 405: * @par Examples -: 406: * Setting the option: -: 407: * @code -: 408: * boost::asio::ip::tcp::socket socket(my_context); -: 409: * ... -: 410: * boost::asio::socket_base::linger option(true, 30); -: 411: * socket.set_option(option); -: 412: * @endcode -: 413: * -: 414: * @par -: 415: * Getting the current option value: -: 416: * @code -: 417: * boost::asio::ip::tcp::socket socket(my_context); -: 418: * ... -: 419: * boost::asio::socket_base::linger option; -: 420: * socket.get_option(option); -: 421: * bool is_set = option.enabled(); -: 422: * unsigned short timeout = option.timeout(); -: 423: * @endcode -: 424: * -: 425: * @par Concepts: -: 426: * Socket_Option, Linger_Socket_Option. -: 427: */ -: 428:#if defined(GENERATING_DOCUMENTATION) -: 429: typedef implementation_defined linger; -: 430:#else -: 431: typedef boost::asio::detail::socket_option::linger< -: 432: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_LINGER)> -: 433: linger; -: 434:#endif -: 435: -: 436: /// Socket option for putting received out-of-band data inline. -: 437: /** -: 438: * Implements the SOL_SOCKET/SO_OOBINLINE socket option. -: 439: * -: 440: * @par Examples -: 441: * Setting the option: -: 442: * @code -: 443: * boost::asio::ip::tcp::socket socket(my_context); -: 444: * ... -: 445: * boost::asio::socket_base::out_of_band_inline option(true); -: 446: * socket.set_option(option); -: 447: * @endcode -: 448: * -: 449: * @par -: 450: * Getting the current option value: -: 451: * @code -: 452: * boost::asio::ip::tcp::socket socket(my_context); -: 453: * ... -: 454: * boost::asio::socket_base::out_of_band_inline option; -: 455: * socket.get_option(option); -: 456: * bool value = option.value(); -: 457: * @endcode -: 458: * -: 459: * @par Concepts: -: 460: * Socket_Option, Boolean_Socket_Option. -: 461: */ -: 462:#if defined(GENERATING_DOCUMENTATION) -: 463: typedef implementation_defined out_of_band_inline; -: 464:#else -: 465: typedef boost::asio::detail::socket_option::boolean< -: 466: BOOST_ASIO_OS_DEF(SOL_SOCKET), BOOST_ASIO_OS_DEF(SO_OOBINLINE)> -: 467: out_of_band_inline; -: 468:#endif -: 469: -: 470: /// Socket option to report aborted connections on accept. -: 471: /** -: 472: * Implements a custom socket option that determines whether or not an accept -: 473: * operation is permitted to fail with boost::asio::error::connection_aborted. -: 474: * By default the option is false. -: 475: * -: 476: * @par Examples -: 477: * Setting the option: -: 478: * @code -: 479: * boost::asio::ip::tcp::acceptor acceptor(my_context); -: 480: * ... -: 481: * boost::asio::socket_base::enable_connection_aborted option(true); -: 482: * acceptor.set_option(option); -: 483: * @endcode -: 484: * -: 485: * @par -: 486: * Getting the current option value: -: 487: * @code -: 488: * boost::asio::ip::tcp::acceptor acceptor(my_context); -: 489: * ... -: 490: * boost::asio::socket_base::enable_connection_aborted option; -: 491: * acceptor.get_option(option); -: 492: * bool is_set = option.value(); -: 493: * @endcode -: 494: * -: 495: * @par Concepts: -: 496: * Socket_Option, Boolean_Socket_Option. -: 497: */ -: 498:#if defined(GENERATING_DOCUMENTATION) -: 499: typedef implementation_defined enable_connection_aborted; -: 500:#else -: 501: typedef boost::asio::detail::socket_option::boolean< -: 502: boost::asio::detail::custom_socket_option_level, -: 503: boost::asio::detail::enable_connection_aborted_option> -: 504: enable_connection_aborted; -: 505:#endif -: 506: -: 507: /// IO control command to get the amount of data that can be read without -: 508: /// blocking. -: 509: /** -: 510: * Implements the FIONREAD IO control command. -: 511: * -: 512: * @par Example -: 513: * @code -: 514: * boost::asio::ip::tcp::socket socket(my_context); -: 515: * ... -: 516: * boost::asio::socket_base::bytes_readable command(true); -: 517: * socket.io_control(command); -: 518: * std::size_t bytes_readable = command.get(); -: 519: * @endcode -: 520: * -: 521: * @par Concepts: -: 522: * IO_Control_Command, Size_IO_Control_Command. -: 523: */ -: 524:#if defined(GENERATING_DOCUMENTATION) -: 525: typedef implementation_defined bytes_readable; -: 526:#else -: 527: typedef boost::asio::detail::io_control::bytes_readable bytes_readable; -: 528:#endif -: 529: -: 530: /// The maximum length of the queue of pending incoming connections. -: 531:#if defined(GENERATING_DOCUMENTATION) -: 532: static const int max_listen_connections = implementation_defined; -: 533:#else -: 534: BOOST_ASIO_STATIC_CONSTANT(int, max_listen_connections -: 535: = BOOST_ASIO_OS_DEF(SOMAXCONN)); -: 536:#endif -: 537: -: 538:#if !defined(BOOST_ASIO_NO_DEPRECATED) -: 539: /// (Deprecated: Use max_listen_connections.) The maximum length of the queue -: 540: /// of pending incoming connections. -: 541:#if defined(GENERATING_DOCUMENTATION) -: 542: static const int max_connections = implementation_defined; -: 543:#else -: 544: BOOST_ASIO_STATIC_CONSTANT(int, max_connections -: 545: = BOOST_ASIO_OS_DEF(SOMAXCONN)); -: 546:#endif -: 547:#endif // !defined(BOOST_ASIO_NO_DEPRECATED) -: 548: -: 549:protected: -: 550: /// Protected destructor to prevent deletion through this type. =====: 551: ~socket_base() -: 552: { -: 553: } -: 554:}; -: 555: -: 556:} // namespace asio -: 557:} // namespace boost -: 558: -: 559:#include -: 560: -: 561:#endif // BOOST_ASIO_SOCKET_BASE_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#thread_info_base.hpp.gcov -: 0:Source:/usr/include/boost/asio/detail/thread_info_base.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// detail/thread_info_base.hpp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP -: 12:#define BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21: -: 22:#include -: 23: -: 24:namespace boost { -: 25:namespace asio { -: 26:namespace detail { -: 27: -: 28:class thread_info_base -: 29: : private noncopyable -: 30:{ -: 31:public: -: 32: struct default_tag -: 33: { -: 34: enum { mem_index = 0 }; -: 35: }; -: 36: -: 37: struct awaitable_frame_tag -: 38: { -: 39: enum { mem_index = 1 }; -: 40: }; -: 41: -: 42: struct executor_function_tag -: 43: { -: 44: enum { mem_index = 2 }; -: 45: }; -: 46: 35*: 47: thread_info_base() 35*: 48: { 140*: 49: for (int i = 0; i < max_mem_index; ++i) branch 0 taken 75% (fallthrough) branch 1 taken 25% branch 2 never executed branch 3 never executed 105*: 50: reusable_memory_[i] = 0; -: 51: } -: 52: -: 53: ~thread_info_base() -: 54: { -: 55: for (int i = 0; i < max_mem_index; ++i) -: 56: if (reusable_memory_[i]) -: 57: ::operator delete(reusable_memory_[i]); -: 58: } -: 59: 36: 60: static void* allocate(thread_info_base* this_thread, std::size_t size) -: 61: { 36: 62: return allocate(default_tag(), this_thread, size); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 63: } -: 64: -: 65: static void deallocate(thread_info_base* this_thread, -: 66: void* pointer, std::size_t size) -: 67: { -: 68: deallocate(default_tag(), this_thread, pointer, size); -: 69: } -: 70: -: 71: template -: 72: static void* allocate(Purpose, thread_info_base* this_thread, -: 73: std::size_t size) -: 74: { -: 75: std::size_t chunks = (size + chunk_size - 1) / chunk_size; -: 76: -: 77: if (this_thread && this_thread->reusable_memory_[Purpose::mem_index]) -: 78: { -: 79: void* const pointer = this_thread->reusable_memory_[Purpose::mem_index]; -: 80: this_thread->reusable_memory_[Purpose::mem_index] = 0; -: 81: -: 82: unsigned char* const mem = static_cast(pointer); -: 83: if (static_cast(mem[0]) >= chunks) -: 84: { -: 85: mem[size] = mem[0]; -: 86: return pointer; -: 87: } -: 88: -: 89: ::operator delete(pointer); -: 90: } -: 91: -: 92: void* const pointer = ::operator new(chunks * chunk_size + 1); -: 93: unsigned char* const mem = static_cast(pointer); -: 94: mem[size] = (chunks <= UCHAR_MAX) ? static_cast(chunks) : 0; -: 95: return pointer; -: 96: } -: 97: -: 98: template -: 99: static void deallocate(Purpose, thread_info_base* this_thread, -: 100: void* pointer, std::size_t size) -: 101: { -: 102: if (size <= chunk_size * UCHAR_MAX) -: 103: { -: 104: if (this_thread && this_thread->reusable_memory_[Purpose::mem_index] == 0) -: 105: { -: 106: unsigned char* const mem = static_cast(pointer); -: 107: mem[0] = mem[size]; -: 108: this_thread->reusable_memory_[Purpose::mem_index] = pointer; -: 109: return; -: 110: } -: 111: } -: 112: -: 113: ::operator delete(pointer); -: 114: } -: 115: -: 116:private: -: 117: enum { chunk_size = 4 }; -: 118: enum { max_mem_index = 3 }; -: 119: void* reusable_memory_[max_mem_index]; -: 120:}; -: 121: -: 122:} // namespace detail -: 123:} // namespace asio -: 124:} // namespace boost -: 125: -: 126:#include -: 127: -: 128:#endif // BOOST_ASIO_DETAIL_THREAD_INFO_BASE_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#beast#core#detail#service_base.hpp.gcov -: 0:Source:/usr/include/boost/beast/core/detail/service_base.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcda -: 0:Runs:1 -: 1:// -: 2:// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) -: 3:// -: 4:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 5:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 6:// -: 7:// Official repository: https://github.com/boostorg/beast -: 8:// -: 9: -: 10:#ifndef BOOST_BEAST_DETAIL_SERVICE_BASE_HPP -: 11:#define BOOST_BEAST_DETAIL_SERVICE_BASE_HPP -: 12: -: 13:#include -: 14: -: 15:namespace boost { -: 16:namespace beast { -: 17:namespace detail { -: 18: -: 19:template -: 20:struct service_base : net::execution_context::service -: 21:{ -: 22: static net::execution_context::id const id; -: 23: -: 24: explicit 25: 25: service_base(net::execution_context& ctx) 25: 26: : net::execution_context::service(ctx) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 27: { -: 28: } -: 29:}; -: 30: -: 31:template -: 32:net::execution_context::id const service_base::id; -: 33: -: 34:} // detail -: 35:} // beast -: 36:} // boost -: 37: -: 38:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#cli#tls_proxy.cpp.gcov -: 0:Source:src/cli/tls_proxy.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:710 -: 1:/* -: 2:* TLS Server Proxy -: 3:* (C) 2014,2015,2019 Jack Lloyd -: 4:* (C) 2016 Matthias Gierlings -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include "cli.h" -: 10: -: 11:#if defined(BOTAN_HAS_TLS) && defined(BOTAN_HAS_BOOST_ASIO) && defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) -: 12: -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18: -: 19:#define _GLIBCXX_HAVE_GTHR_DEFAULT -: 20:#include -: 21:#include -: 22:#include -: 23: -: 24:#include -: 25:#include -: 26:#include -: 27:#include -: 28:#include -: 29: -: 30:#if defined(BOTAN_HAS_TLS_SQLITE3_SESSION_MANAGER) -: 31: #include -: 32:#endif -: 33: -: 34:#include "tls_helpers.h" -: 35: -: 36:#if BOOST_VERSION >= 107000 -: 37:#define GET_IO_SERVICE(s) (static_cast((s).get_executor().context())) -: 38:#else -: 39:#define GET_IO_SERVICE(s) ((s).get_io_service()) -: 40:#endif -: 41: -: 42:namespace Botan_CLI { -: 43: -: 44:namespace { -: 45: -: 46:using boost::asio::ip::tcp; -: 47: function _ZN9Botan_CLI12_GLOBAL__N_113log_exceptionEPKcRKSt9exception called 0 returned 0% blocks executed 0% #####: 48:void log_exception(const char* where, const std::exception& e) -: 49: { #####: 50: std::cout << where << ' ' << e.what() << std::endl; call 0 never executed call 1 never executed call 2 never executed call 3 never executed call 4 never executed #####: 51: } -: 52: function _ZN9Botan_CLI12_GLOBAL__N_19log_errorEPKcRKN5boost6system10error_codeE called 4 returned 100% blocks executed 77% 4: 53:void log_error(const char* where, const boost::system::error_code& error) -: 54: { 4: 55: std::cout << where << ' ' << error.message() << std::endl; call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 50% (fallthrough) branch 10 taken 50% 4: 56: } -: 57: 16: 58:void log_binary_message(const char* where, const uint8_t buf[], size_t buf_len) -: 59: { 16: 60: BOTAN_UNUSED(where, buf, buf_len); -: 61: //std::cout << where << ' ' << Botan::hex_encode(buf, buf_len) << std::endl; -: 62: } -: 63: 5: 64:void log_text_message(const char* where, const uint8_t buf[], size_t buf_len) -: 65: { 5: 66: BOTAN_UNUSED(where, buf, buf_len); -: 67: //const char* c = reinterpret_cast(buf); -: 68: //std::cout << where << ' ' << std::string(c, c + buf_len) << std::endl; -: 69: } -: 70: -: 71:class ServerStatus -: 72: { -: 73: public: 1: 74: ServerStatus(size_t max_clients) : m_max_clients(max_clients), m_clients_serviced(0) {} -: 75: 2: 76: bool should_exit() const -: 77: { 2: 78: if(m_max_clients == 0) -: 79: return false; -: 80: 2: 81: return clients_serviced() >= m_max_clients; -: 82: } -: 83: 2: 84: void client_serviced() { m_clients_serviced++; } -: 85: 2: 86: size_t clients_serviced() const { return m_clients_serviced.load(); } branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 87: private: -: 88: size_t m_max_clients; -: 89: std::atomic m_clients_serviced; -: 90: }; -: 91: 3: 92:class tls_proxy_session final : public std::enable_shared_from_this, call 0 returned 100% call 1 returned 100% call 2 never executed call 3 never executed -: 93: public Botan::TLS::Callbacks -: 94: { -: 95: public: -: 96: enum { readbuf_size = 17 * 1024 }; -: 97: -: 98: typedef std::shared_ptr pointer; -: 99: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session6createERN5boost4asio10io_contextERN5Botan3TLS15Session_ManagerERNS6_19Credentials_ManagerERNS7_6PolicyENS3_2ip23basic_resolver_iteratorINSE_3tcpEEE called 3 returned 100% blocks executed 67% 3: 100: static pointer create( -: 101: boost::asio::io_service& io, -: 102: Botan::TLS::Session_Manager& session_manager, -: 103: Botan::Credentials_Manager& credentials, -: 104: Botan::TLS::Policy& policy, -: 105: tcp::resolver::iterator endpoints) -: 106: { 3: 107: return pointer( call 0 returned 100% -: 108: new tls_proxy_session( -: 109: io, -: 110: session_manager, -: 111: credentials, -: 112: policy, 3: 113: endpoints) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed 9: 114: ); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 115: } -: 116: 2: 117: tcp::socket& client_socket() -: 118: { 2: 119: return m_client_socket; -: 120: } -: 121: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session5startEv called 2 returned 100% blocks executed 100% 2: 122: void start() -: 123: { 2: 124: m_c2p.resize(readbuf_size); call 0 returned 100% 2: 125: client_read(boost::system::error_code(), 0); // start read loop call 0 returned 100% call 1 returned 100% 2: 126: } -: 127: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session4stopEv called 4 returned 100% blocks executed 100% 4: 128: void stop() -: 129: { 4: 130: if(m_is_closed == false) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 131: { -: 132: /* -: 133: Don't need to talk to the server anymore -: 134: Client socket is closed during write callback -: 135: */ 2: 136: m_server_socket.close(); call 0 returned 100% 2: 137: m_tls.close(); call 0 returned 100% 2: 138: m_is_closed = true; -: 139: } 4: 140: } -: 141: -: 142: private: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_sessionC2ERN5boost4asio10io_contextERN5Botan3TLS15Session_ManagerERNS6_19Credentials_ManagerERNS7_6PolicyENS3_2ip23basic_resolver_iteratorINSE_3tcpEEE called 3 returned 100% blocks executed 34% 3: 143: tls_proxy_session( -: 144: boost::asio::io_service& io, -: 145: Botan::TLS::Session_Manager& session_manager, -: 146: Botan::Credentials_Manager& credentials, -: 147: Botan::TLS::Policy& policy, -: 148: tcp::resolver::iterator endpoints) 3: 149: : m_strand(io) -: 150: , m_server_endpoints(endpoints) -: 151: , m_client_socket(io) -: 152: , m_server_socket(io) -: 153: , m_rng(cli_make_rng()) -: 154: , m_tls(*this, -: 155: session_manager, -: 156: credentials, -: 157: policy, 12: 158: *m_rng) {} call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% (throw) call 13 returned 100% branch 14 taken 100% (fallthrough) branch 15 taken 0% (throw) call 16 returned 100% branch 17 taken 100% (fallthrough) branch 18 taken 0% (throw) branch 19 taken 0% (fallthrough) branch 20 taken 100% call 21 returned 100% branch 22 taken 100% (fallthrough) branch 23 taken 0% (throw) branch 24 never executed branch 25 never executed call 26 never executed call 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed -: 159: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session11client_readERKN5boost6system10error_codeEm called 10 returned 100% blocks executed 49% 10: 160: void client_read(const boost::system::error_code& error, -: 161: size_t bytes_transferred) -: 162: { 10: 163: if(error) branch 0 taken 20% (fallthrough) branch 1 taken 80% -: 164: { 2: 165: log_error("Read failed", error); call 0 returned 100% 2: 166: stop(); 2: 167: return; call 0 returned 100% -: 168: } -: 169: 8: 170: try -: 171: { 8: 172: if(!m_tls.is_active()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 173: { -: 174: log_binary_message("From client", &m_c2p[0], bytes_transferred); -: 175: } 8: 176: m_tls.received_data(&m_c2p[0], bytes_transferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 177: } =====: 178: catch(Botan::Exception& e) call 0 never executed call 1 never executed -: 179: { =====: 180: log_exception("TLS connection failed", e); call 0 never executed branch 1 never executed branch 2 never executed =====: 181: stop(); call 0 never executed branch 1 never executed branch 2 never executed =====: 182: return; call 0 never executed -: 183: } -: 184: 16: 185: m_client_socket.async_read_some( 8: 186: boost::asio::buffer(&m_c2p[0], m_c2p.size()), branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed 16: 187: m_strand.wrap( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 16: 188: boost::bind( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed 24: 189: &tls_proxy_session::client_read, shared_from_this(), branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 190: boost::asio::placeholders::error, -: 191: boost::asio::placeholders::bytes_transferred))); -: 192: } -: 193: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session30handle_client_write_completionERKN5boost6system10error_codeE called 13 returned 100% blocks executed 75% 13: 194: void handle_client_write_completion(const boost::system::error_code& error) -: 195: { 13: 196: if(error) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 197: { #####: 198: log_error("Client write", error); call 0 never executed #####: 199: stop(); #####: 200: return; call 0 never executed -: 201: } -: 202: 13: 203: m_p2c.clear(); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 204: 13: 205: if(m_p2c_pending.empty() && m_tls.is_closed()) branch 0 taken 69% (fallthrough) branch 1 taken 31% call 2 returned 100% branch 3 taken 22% (fallthrough) branch 4 taken 78% -: 206: { 2: 207: m_client_socket.close(); call 0 returned 100% -: 208: } 13: 209: tls_emit_data(nullptr, 0); // initiate another write if needed call 0 returned 100% -: 210: } -: 211: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session30handle_server_write_completionERKN5boost6system10error_codeE called 2 returned 100% blocks executed 62% 2: 212: void handle_server_write_completion(const boost::system::error_code& error) -: 213: { 2: 214: if(error) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 215: { #####: 216: log_error("Server write", error); call 0 never executed #####: 217: stop(); #####: 218: return; call 0 never executed -: 219: } -: 220: 2: 221: m_p2s.clear(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 2: 222: proxy_write_to_server(nullptr, 0); // initiate another write if needed call 0 returned 100% -: 223: } -: 224: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session19tls_record_receivedEmPKhm called 2 returned 100% blocks executed 100% 2: 225: void tls_record_received(uint64_t /*rec_no*/, const uint8_t buf[], size_t buf_len) override -: 226: { -: 227: // Immediately bounce message to server 2: 228: proxy_write_to_server(buf, buf_len); call 0 returned 100% 2: 229: } -: 230: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session13tls_emit_dataEPKhm called 30 returned 100% blocks executed 61% 30: 231: void tls_emit_data(const uint8_t buf[], size_t buf_len) override -: 232: { 30: 233: if(buf_len > 0) branch 0 taken 57% (fallthrough) branch 1 taken 43% -: 234: { 17: 235: m_p2c_pending.insert(m_p2c_pending.end(), buf, buf + buf_len); call 0 returned 100% -: 236: } -: 237: -: 238: // no write now active and we still have output pending 30: 239: if(m_p2c.empty() && !m_p2c_pending.empty()) branch 0 taken 73% (fallthrough) branch 1 taken 27% branch 2 taken 59% (fallthrough) branch 3 taken 41% -: 240: { 13: 241: std::swap(m_p2c_pending, m_p2c); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 242: 13: 243: log_binary_message("To Client", &m_p2c[0], m_p2c.size()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 244: 39: 245: boost::asio::async_write( 13: 246: m_client_socket, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 13: 247: boost::asio::buffer(&m_p2c[0], m_p2c.size()), branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed 26: 248: m_strand.wrap( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 26: 249: boost::bind( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed -: 250: &tls_proxy_session::handle_client_write_completion, 39: 251: shared_from_this(), branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 252: boost::asio::placeholders::error))); -: 253: } 30: 254: } -: 255: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session21proxy_write_to_serverEPKhm called 6 returned 100% blocks executed 61% 6: 256: void proxy_write_to_server(const uint8_t buf[], size_t buf_len) -: 257: { 6: 258: if(buf_len > 0) branch 0 taken 33% (fallthrough) branch 1 taken 67% -: 259: { 2: 260: m_p2s_pending.insert(m_p2s_pending.end(), buf, buf + buf_len); call 0 returned 100% -: 261: } -: 262: -: 263: // no write now active and we still have output pending 6: 264: if(m_p2s.empty() && !m_p2s_pending.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 33% (fallthrough) branch 3 taken 67% -: 265: { 2: 266: std::swap(m_p2s_pending, m_p2s); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 267: 2: 268: log_text_message("To Server", &m_p2s[0], m_p2s.size()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 269: 6: 270: boost::asio::async_write( 2: 271: m_server_socket, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 272: boost::asio::buffer(&m_p2s[0], m_p2s.size()), branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed 4: 273: m_strand.wrap( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 4: 274: boost::bind( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed -: 275: &tls_proxy_session::handle_server_write_completion, 6: 276: shared_from_this(), branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 277: boost::asio::placeholders::error))); -: 278: } 6: 279: } -: 280: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session11server_readERKN5boost6system10error_codeEm called 7 returned 100% blocks executed 50% 7: 281: void server_read(const boost::system::error_code& error, -: 282: size_t bytes_transferred) -: 283: { 7: 284: if(error) branch 0 taken 29% (fallthrough) branch 1 taken 71% -: 285: { 2: 286: log_error("Server read failed", error); call 0 returned 100% 2: 287: stop(); 2: 288: return; call 0 returned 100% -: 289: } -: 290: 5: 291: try -: 292: { 5: 293: if(bytes_transferred) branch 0 taken 60% (fallthrough) branch 1 taken 40% -: 294: { 3: 295: log_text_message("Server to client", &m_s2p[0], m_s2p.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 296: log_binary_message("Server to client", &m_s2p[0], m_s2p.size()); 3: 297: m_tls.send(&m_s2p[0], bytes_transferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 298: } -: 299: } =====: 300: catch(Botan::Exception& e) call 0 never executed call 1 never executed -: 301: { =====: 302: log_exception("TLS connection failed", e); call 0 never executed branch 1 never executed branch 2 never executed =====: 303: stop(); call 0 never executed branch 1 never executed branch 2 never executed =====: 304: return; call 0 never executed -: 305: } -: 306: 5: 307: m_s2p.resize(readbuf_size); call 0 returned 100% -: 308: 10: 309: m_server_socket.async_read_some( 5: 310: boost::asio::buffer(&m_s2p[0], m_s2p.size()), branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed 10: 311: m_strand.wrap( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% branch 5 never executed branch 6 never executed 20: 312: boost::bind(&tls_proxy_session::server_read, shared_from_this(), branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 313: boost::asio::placeholders::error, -: 314: boost::asio::placeholders::bytes_transferred))); -: 315: } -: 316: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session23tls_session_establishedERKN5Botan3TLS7SessionE called 2 returned 100% blocks executed 69% 2: 317: bool tls_session_established(const Botan::TLS::Session& session) override -: 318: { 2: 319: m_hostname = session.server_info().hostname(); call 0 returned 100% call 1 returned 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 320: function _ZZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session23tls_session_establishedERKN5Botan3TLS7SessionEENKUlN5boost6system10error_codeENS7_4asio2ip23basic_resolver_iteratorINSB_3tcpEEEE_clES9_SE_.isra.0 called 2 returned 100% blocks executed 71% 8: 321: auto onConnect = [this](boost::system::error_code ec, tcp::resolver::iterator /*endpoint*/) -: 322: { 2: 323: if(ec) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 324: { #####: 325: log_error("Server connection", ec); #####: 326: return; call 0 never executed -: 327: } 2: 328: server_read(boost::system::error_code(), 0); // start read loop call 0 returned 100% call 1 returned 100% 2: 329: proxy_write_to_server(nullptr, 0); call 0 returned 100% 2: 330: }; 2: 331: async_connect(m_server_socket, m_server_endpoints, onConnect); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) 2: 332: return true; -: 333: } -: 334: function _ZN9Botan_CLI12_GLOBAL__N_117tls_proxy_session9tls_alertEN5Botan3TLS5AlertE called 0 returned 0% blocks executed 0% #####: 335: void tls_alert(Botan::TLS::Alert alert) override -: 336: { #####: 337: if(alert.type() == Botan::TLS::Alert::CLOSE_NOTIFY) branch 0 never executed branch 1 never executed -: 338: { #####: 339: m_tls.close(); call 0 never executed #####: 340: return; -: 341: } -: 342: } -: 343: -: 344: boost::asio::io_service::strand m_strand; -: 345: -: 346: tcp::resolver::iterator m_server_endpoints; -: 347: -: 348: tcp::socket m_client_socket; -: 349: tcp::socket m_server_socket; -: 350: -: 351: std::unique_ptr m_rng; -: 352: Botan::TLS::Server m_tls; -: 353: std::string m_hostname; -: 354: -: 355: std::vector m_c2p; -: 356: std::vector m_p2c; -: 357: std::vector m_p2c_pending; -: 358: -: 359: std::vector m_s2p; -: 360: std::vector m_p2s; -: 361: std::vector m_p2s_pending; -: 362: -: 363: bool m_is_closed = false; -: 364: }; -: 365: -: 366:class tls_proxy_server final -: 367: { -: 368: public: -: 369: typedef tls_proxy_session session; -: 370: function _ZN9Botan_CLI12_GLOBAL__N_116tls_proxy_serverC2ERN5boost4asio10io_contextEtNS3_2ip23basic_resolver_iteratorINS6_3tcpEEERN5Botan19Credentials_ManagerERNSA_3TLS6PolicyERNSD_15Session_ManagerEm called 1 returned 100% blocks executed 50% 1: 371: tls_proxy_server( -: 372: boost::asio::io_service& io, unsigned short port, -: 373: tcp::resolver::iterator endpoints, -: 374: Botan::Credentials_Manager& creds, -: 375: Botan::TLS::Policy& policy, -: 376: Botan::TLS::Session_Manager& session_mgr, -: 377: size_t max_clients) 2: 378: : m_acceptor(io, tcp::endpoint(tcp::v4(), port)) -: 379: , m_server_endpoints(endpoints) -: 380: , m_creds(creds) -: 381: , m_policy(policy) -: 382: , m_session_manager(session_mgr) 1: 383: , m_status(max_clients) call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 never executed branch 6 never executed call 7 never executed -: 384: { 1: 385: session::pointer new_session = make_session(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 386: 2: 387: m_acceptor.async_accept( call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% 1: 388: new_session->client_socket(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 389: boost::bind( call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed -: 390: &tls_proxy_server::handle_accept, -: 391: this, -: 392: new_session, -: 393: boost::asio::placeholders::error)); 1: 394: } -: 395: -: 396: private: function _ZN9Botan_CLI12_GLOBAL__N_116tls_proxy_server12make_sessionEv called 3 returned 100% blocks executed 69% 3: 397: session::pointer make_session() -: 398: { 3: 399: return session::create( 6: 400: GET_IO_SERVICE(m_acceptor), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 never executed branch 4 never executed -: 401: m_session_manager, -: 402: m_creds, -: 403: m_policy, 9: 404: m_server_endpoints); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 405: } -: 406: function _ZN9Botan_CLI12_GLOBAL__N_116tls_proxy_server13handle_acceptESt10shared_ptrINS0_17tls_proxy_sessionEERKN5boost6system10error_codeE called 2 returned 100% blocks executed 72% 2: 407: void handle_accept(session::pointer new_session, -: 408: const boost::system::error_code& error) -: 409: { 2: 410: if(!error) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 411: { 2: 412: new_session->start(); call 0 returned 100% 4: 413: new_session = make_session(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 414: 2: 415: m_status.client_serviced(); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 416: 2: 417: if(m_status.should_exit() == false) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 50% (fallthrough) branch 3 taken 50% -: 418: { 2: 419: m_acceptor.async_accept( call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% 1: 420: new_session->client_socket(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 421: boost::bind( call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 never executed branch 7 never executed -: 422: &tls_proxy_server::handle_accept, -: 423: this, -: 424: new_session, -: 425: boost::asio::placeholders::error)); -: 426: } -: 427: } 2: 428: } -: 429: -: 430: tcp::acceptor m_acceptor; -: 431: tcp::resolver::iterator m_server_endpoints; -: 432: -: 433: Botan::Credentials_Manager& m_creds; -: 434: Botan::TLS::Policy& m_policy; -: 435: Botan::TLS::Session_Manager& m_session_manager; -: 436: ServerStatus m_status; -: 437: }; -: 438: -: 439:} -: 440: -: 441:class TLS_Proxy final : public Command -: 442: { -: 443: public: function _ZN9Botan_CLI9TLS_ProxyC2Ev called 2 returned 100% blocks executed 64% 2: 444: TLS_Proxy() : Command("tls_proxy listen_port target_host target_port server_cert server_key " 4: 445: "--policy=default --threads=0 --max-clients=0 --session-db= --session-db-pass=") {} call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 446: function _ZNK9Botan_CLI9TLS_Proxy5groupB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 447: std::string group() const override -: 448: { 1: 449: return "tls"; call 0 returned 100% -: 450: } -: 451: function _ZNK9Botan_CLI9TLS_Proxy11descriptionB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 452: std::string description() const override -: 453: { 1: 454: return "Proxies requests between a TLS client and a TLS server"; call 0 returned 100% -: 455: } -: 456: function _ZNK9Botan_CLI9TLS_Proxy12thread_countEv called 1 returned 100% blocks executed 60% 1: 457: size_t thread_count() const -: 458: { 1: 459: if(size_t t = get_arg_sz("threads")) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% -: 460: return t; 1: 461: if(size_t t = Botan::OS::get_cpu_available()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% 1: 462: return t; -: 463: return 2; -: 464: } -: 465: function _ZN9Botan_CLI9TLS_Proxy2goEv called 1 returned 100% blocks executed 38% 1: 466: void go() override -: 467: { 1: 468: const uint16_t listen_port = get_arg_u16("listen_port"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% call 8 never executed 1: 469: const std::string target = get_arg("target_host"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed 2: 470: const std::string target_port = get_arg("target_port"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 471: 2: 472: const std::string server_crt = get_arg("server_cert"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% 2: 473: const std::string server_key = get_arg("server_key"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 474: 1: 475: const size_t num_threads = thread_count(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 476: const size_t max_clients = get_arg_sz("max-clients"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 477: 2: 478: Basic_Credentials_Manager creds(rng(), server_crt, server_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 479: 3: 480: auto policy = load_tls_policy(get_arg("policy")); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 never executed branch 13 never executed -: 481: 2: 482: boost::asio::io_service io; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 483: 2: 484: tcp::resolver resolver(io); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 2: 485: auto server_endpoint_iterator = resolver.resolve({ target, target_port }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed -: 486: 1: 487: std::unique_ptr session_mgr; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 488: -: 489:#if defined(BOTAN_HAS_TLS_SQLITE3_SESSION_MANAGER) 3: 490: const std::string sessions_passphrase = get_passphrase_arg("Session DB passphrase", "session-db-pass"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% 2: 491: const std::string sessions_db = get_arg("session-db"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 492: 1: 493: if(!sessions_db.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 494: { #####: 495: session_mgr.reset(new Botan::TLS::Session_Manager_SQLite(sessions_passphrase, rng(), sessions_db)); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed -: 496: } -: 497:#endif 1: 498: if(!session_mgr) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 499: { 1: 500: session_mgr.reset(new Botan::TLS::Session_Manager_In_Memory(rng())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed -: 501: } -: 502: 2: 503: tls_proxy_server server(io, listen_port, server_endpoint_iterator, creds, *policy, *session_mgr, max_clients); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 0% (fallthrough) branch 6 taken 100% call 7 never executed branch 8 never executed branch 9 never executed -: 504: 2: 505: std::vector> threads; call 0 returned 100% -: 506: -: 507: // run forever... first thread is main calling io.run below 2: 508: for(size_t i = 2; i <= num_threads; ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 509: { 2: 510: threads.push_back(std::make_shared([&io]() { io.run(); })); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) branch 7 taken 0% (fallthrough) branch 8 taken 100% call 9 never executed -: 511: } -: 512: 1: 513: io.run(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 514: 2: 515: for(size_t i = 0; i < threads.size(); ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 516: { 1: 517: threads[i]->join(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 518: } 1: 519: } -: 520: }; -: 521: function _ZNK9Botan_CLIUlvE_clEv.isra.0 called 2 returned 100% blocks executed 83% 2: 522:BOTAN_REGISTER_COMMAND("tls_proxy", TLS_Proxy); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 523: -: 524:} -: 525: -: 526:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#misc#tss#tss.cpp.gcov -: 0:Source:src/lib/misc/tss/tss.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/misc_tss.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/misc_tss.gcda -: 0:Runs:2947 -: 1:/* -: 2:* RTSS (threshold secret sharing) -: 3:* (C) 2009,2018 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:namespace { -: 17: -: 18:const size_t RTSS_HEADER_SIZE = 20; -: 19: -: 20:/** -: 21:Table for GF(2^8) arithmetic (exponentials) -: 22:*/ -: 23:const uint8_t RTSS_EXP[256] = { -: 24:0x01, 0x03, 0x05, 0x0F, 0x11, 0x33, 0x55, 0xFF, 0x1A, 0x2E, 0x72, -: 25:0x96, 0xA1, 0xF8, 0x13, 0x35, 0x5F, 0xE1, 0x38, 0x48, 0xD8, 0x73, -: 26:0x95, 0xA4, 0xF7, 0x02, 0x06, 0x0A, 0x1E, 0x22, 0x66, 0xAA, 0xE5, -: 27:0x34, 0x5C, 0xE4, 0x37, 0x59, 0xEB, 0x26, 0x6A, 0xBE, 0xD9, 0x70, -: 28:0x90, 0xAB, 0xE6, 0x31, 0x53, 0xF5, 0x04, 0x0C, 0x14, 0x3C, 0x44, -: 29:0xCC, 0x4F, 0xD1, 0x68, 0xB8, 0xD3, 0x6E, 0xB2, 0xCD, 0x4C, 0xD4, -: 30:0x67, 0xA9, 0xE0, 0x3B, 0x4D, 0xD7, 0x62, 0xA6, 0xF1, 0x08, 0x18, -: 31:0x28, 0x78, 0x88, 0x83, 0x9E, 0xB9, 0xD0, 0x6B, 0xBD, 0xDC, 0x7F, -: 32:0x81, 0x98, 0xB3, 0xCE, 0x49, 0xDB, 0x76, 0x9A, 0xB5, 0xC4, 0x57, -: 33:0xF9, 0x10, 0x30, 0x50, 0xF0, 0x0B, 0x1D, 0x27, 0x69, 0xBB, 0xD6, -: 34:0x61, 0xA3, 0xFE, 0x19, 0x2B, 0x7D, 0x87, 0x92, 0xAD, 0xEC, 0x2F, -: 35:0x71, 0x93, 0xAE, 0xE9, 0x20, 0x60, 0xA0, 0xFB, 0x16, 0x3A, 0x4E, -: 36:0xD2, 0x6D, 0xB7, 0xC2, 0x5D, 0xE7, 0x32, 0x56, 0xFA, 0x15, 0x3F, -: 37:0x41, 0xC3, 0x5E, 0xE2, 0x3D, 0x47, 0xC9, 0x40, 0xC0, 0x5B, 0xED, -: 38:0x2C, 0x74, 0x9C, 0xBF, 0xDA, 0x75, 0x9F, 0xBA, 0xD5, 0x64, 0xAC, -: 39:0xEF, 0x2A, 0x7E, 0x82, 0x9D, 0xBC, 0xDF, 0x7A, 0x8E, 0x89, 0x80, -: 40:0x9B, 0xB6, 0xC1, 0x58, 0xE8, 0x23, 0x65, 0xAF, 0xEA, 0x25, 0x6F, -: 41:0xB1, 0xC8, 0x43, 0xC5, 0x54, 0xFC, 0x1F, 0x21, 0x63, 0xA5, 0xF4, -: 42:0x07, 0x09, 0x1B, 0x2D, 0x77, 0x99, 0xB0, 0xCB, 0x46, 0xCA, 0x45, -: 43:0xCF, 0x4A, 0xDE, 0x79, 0x8B, 0x86, 0x91, 0xA8, 0xE3, 0x3E, 0x42, -: 44:0xC6, 0x51, 0xF3, 0x0E, 0x12, 0x36, 0x5A, 0xEE, 0x29, 0x7B, 0x8D, -: 45:0x8C, 0x8F, 0x8A, 0x85, 0x94, 0xA7, 0xF2, 0x0D, 0x17, 0x39, 0x4B, -: 46:0xDD, 0x7C, 0x84, 0x97, 0xA2, 0xFD, 0x1C, 0x24, 0x6C, 0xB4, 0xC7, -: 47:0x52, 0xF6, 0x01 }; -: 48: -: 49:/** -: 50:Table for GF(2^8) arithmetic (logarithms) -: 51:*/ -: 52:const uint8_t RTSS_LOG[] = { -: 53:0x90, 0x00, 0x19, 0x01, 0x32, 0x02, 0x1A, 0xC6, 0x4B, 0xC7, 0x1B, -: 54:0x68, 0x33, 0xEE, 0xDF, 0x03, 0x64, 0x04, 0xE0, 0x0E, 0x34, 0x8D, -: 55:0x81, 0xEF, 0x4C, 0x71, 0x08, 0xC8, 0xF8, 0x69, 0x1C, 0xC1, 0x7D, -: 56:0xC2, 0x1D, 0xB5, 0xF9, 0xB9, 0x27, 0x6A, 0x4D, 0xE4, 0xA6, 0x72, -: 57:0x9A, 0xC9, 0x09, 0x78, 0x65, 0x2F, 0x8A, 0x05, 0x21, 0x0F, 0xE1, -: 58:0x24, 0x12, 0xF0, 0x82, 0x45, 0x35, 0x93, 0xDA, 0x8E, 0x96, 0x8F, -: 59:0xDB, 0xBD, 0x36, 0xD0, 0xCE, 0x94, 0x13, 0x5C, 0xD2, 0xF1, 0x40, -: 60:0x46, 0x83, 0x38, 0x66, 0xDD, 0xFD, 0x30, 0xBF, 0x06, 0x8B, 0x62, -: 61:0xB3, 0x25, 0xE2, 0x98, 0x22, 0x88, 0x91, 0x10, 0x7E, 0x6E, 0x48, -: 62:0xC3, 0xA3, 0xB6, 0x1E, 0x42, 0x3A, 0x6B, 0x28, 0x54, 0xFA, 0x85, -: 63:0x3D, 0xBA, 0x2B, 0x79, 0x0A, 0x15, 0x9B, 0x9F, 0x5E, 0xCA, 0x4E, -: 64:0xD4, 0xAC, 0xE5, 0xF3, 0x73, 0xA7, 0x57, 0xAF, 0x58, 0xA8, 0x50, -: 65:0xF4, 0xEA, 0xD6, 0x74, 0x4F, 0xAE, 0xE9, 0xD5, 0xE7, 0xE6, 0xAD, -: 66:0xE8, 0x2C, 0xD7, 0x75, 0x7A, 0xEB, 0x16, 0x0B, 0xF5, 0x59, 0xCB, -: 67:0x5F, 0xB0, 0x9C, 0xA9, 0x51, 0xA0, 0x7F, 0x0C, 0xF6, 0x6F, 0x17, -: 68:0xC4, 0x49, 0xEC, 0xD8, 0x43, 0x1F, 0x2D, 0xA4, 0x76, 0x7B, 0xB7, -: 69:0xCC, 0xBB, 0x3E, 0x5A, 0xFB, 0x60, 0xB1, 0x86, 0x3B, 0x52, 0xA1, -: 70:0x6C, 0xAA, 0x55, 0x29, 0x9D, 0x97, 0xB2, 0x87, 0x90, 0x61, 0xBE, -: 71:0xDC, 0xFC, 0xBC, 0x95, 0xCF, 0xCD, 0x37, 0x3F, 0x5B, 0xD1, 0x53, -: 72:0x39, 0x84, 0x3C, 0x41, 0xA2, 0x6D, 0x47, 0x14, 0x2A, 0x9E, 0x5D, -: 73:0x56, 0xF2, 0xD3, 0xAB, 0x44, 0x11, 0x92, 0xD9, 0x23, 0x20, 0x2E, -: 74:0x89, 0xB4, 0x7C, 0xB8, 0x26, 0x77, 0x99, 0xE3, 0xA5, 0x67, 0x4A, -: 75:0xED, 0xDE, 0xC5, 0x31, 0xFE, 0x18, 0x0D, 0x63, 0x8C, 0x80, 0xC0, -: 76:0xF7, 0x70, 0x07 }; -: 77: 29633: 78:uint8_t gfp_mul(uint8_t x, uint8_t y) -: 79: { 5922: 80: if(x == 0 || y == 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% branch 2 taken 99% (fallthrough) branch 3 taken 1% -: 81: return 0; 29607: 82: return RTSS_EXP[(RTSS_LOG[x] + RTSS_LOG[y]) % 255]; -: 83: } -: 84: function _ZN5Botan12_GLOBAL__N_112rtss_hash_idERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 7 returned 100% blocks executed 50% 7: 85:uint8_t rtss_hash_id(const std::string& hash_name) -: 86: { 7: 87: if(hash_name == "None") call 0 returned 100% branch 1 taken 43% (fallthrough) branch 2 taken 57% -: 88: return 0; 8: 89: else if(hash_name == "SHA-160" || hash_name == "SHA-1" || hash_name == "SHA1") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 67% (fallthrough) branch 4 taken 33% branch 5 taken 0% (fallthrough) branch 6 taken 100% 1: 90: return 1; 2: 91: else if(hash_name == "SHA-256") call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 92: return 2; -: 93: else #####: 94: throw Invalid_Argument("RTSS only supports SHA-1 and SHA-256"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 95: } -: 96: function _ZN5Botan12_GLOBAL__N_119get_rtss_hash_by_idEh called 34 returned 100% blocks executed 31% 34: 97:std::unique_ptr get_rtss_hash_by_id(uint8_t id) -: 98: { 34: 99: if(id == 0) branch 0 taken 65% (fallthrough) branch 1 taken 35% 34: 100: return std::unique_ptr(); 12: 101: if(id == 1) branch 0 taken 25% (fallthrough) branch 1 taken 75% 6: 102: return HashFunction::create_or_throw("SHA-1"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed 9: 103: else if(id == 2) branch 0 taken 100% (fallthrough) branch 1 taken 0% 18: 104: return HashFunction::create_or_throw("SHA-256"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 105: else #####: 106: throw Decoding_Error("Unknown RTSS hash identifier"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 107: } -: 108: -: 109:} -: 110: function _ZN5Botan10RTSS_ShareC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 111:RTSS_Share::RTSS_Share(const std::string& hex_input) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 112: { #####: 113: m_contents = hex_decode_locked(hex_input); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 114: } -: 115: function _ZN5Botan10RTSS_ShareC2EPKhm called 27 returned 100% blocks executed 57% 27: 116:RTSS_Share::RTSS_Share(const uint8_t bin[], size_t len) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 117: { 27: 118: m_contents.assign(bin, bin + len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 27: 119: } -: 120: function _ZNK5Botan10RTSS_Share8share_idEv called 43459 returned 100% blocks executed 13% 43459: 121:uint8_t RTSS_Share::share_id() const -: 122: { 43459: 123: if(!initialized()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 124: throw Invalid_State("RTSS_Share::share_id not initialized"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 125: 43459: 126: if(m_contents.size() < RTSS_HEADER_SIZE + 1) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 127: throw Decoding_Error("RTSS_Share::share_id invalid share data"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 128: 43459: 129: return m_contents[20]; -: 130: } -: 131: function _ZNK5Botan10RTSS_Share9to_stringB5cxx11Ev called 0 returned 0% blocks executed 0% #####: 132:std::string RTSS_Share::to_string() const -: 133: { #####: 134: return hex_encode(m_contents.data(), m_contents.size()); call 0 never executed -: 135: } -: 136: -: 137:std::vector function _ZN5Botan10RTSS_Share5splitEhhPKhtS2_RNS_21RandomNumberGeneratorE called 0 returned 0% blocks executed 0% #####: 138:RTSS_Share::split(uint8_t M, uint8_t N, -: 139: const uint8_t S[], uint16_t S_len, -: 140: const uint8_t identifier[16], -: 141: RandomNumberGenerator& rng) -: 142: { #####: 143: return RTSS_Share::split(M, N, S, S_len, #####: 144: std::vector(identifier, identifier + 16), call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 145: "SHA-256", #####: 146: rng); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed -: 147: } -: 148: -: 149:std::vector function _ZN5Botan10RTSS_Share5splitEhhPKhtRKSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_21RandomNumberGeneratorE called 7 returned 100% blocks executed 47% 7: 150:RTSS_Share::split(uint8_t M, uint8_t N, -: 151: const uint8_t S[], uint16_t S_len, -: 152: const std::vector& identifier, -: 153: const std::string& hash_fn, -: 154: RandomNumberGenerator& rng) -: 155: { 7: 156: if(M <= 1 || N <= 1 || M > N || N >= 255) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 157: throw Invalid_Argument("RTSS_Share::split: Invalid N or M"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 158: 7: 159: if(identifier.size() > 16) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 160: throw Invalid_Argument("RTSS_Share::split Invalid identifier size"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 161: 7: 162: const uint8_t hash_id = rtss_hash_id(hash_fn); call 0 returned 100% -: 163: 14: 164: std::unique_ptr hash; 7: 165: if(hash_id > 0) branch 0 taken 43% (fallthrough) branch 1 taken 57% 3: 166: hash = HashFunction::create_or_throw(hash_fn); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 167: -: 168: // secret = S || H(S) 14: 169: secure_vector secret(S, S + S_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 43% (fallthrough) branch 4 taken 57% branch 5 never executed branch 6 never executed 7: 170: if(hash) branch 0 taken 43% (fallthrough) branch 1 taken 57% 9: 171: secret += hash->process(S, S_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 172: 7: 173: if(secret.size() >= 0xFFFE) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 174: throw Encoding_Error("RTSS_Share::split secret too large for TSS format"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 175: -: 176: // +1 byte for the share ID 7: 177: const uint16_t share_len = static_cast(secret.size() + 1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 178: 14: 179: secure_vector share_header(RTSS_HEADER_SIZE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed 7: 180: copy_mem(&share_header[0], identifier.data(), identifier.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 7: 181: share_header[16] = hash_id; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 7: 182: share_header[17] = M; 7: 183: share_header[18] = get_byte(0, share_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 7: 184: share_header[19] = get_byte(1, share_len); -: 185: -: 186: // Create RTSS header in each share 7: 187: std::vector shares(N); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 188: 46: 189: for(uint8_t i = 0; i != N; ++i) branch 0 taken 15% (fallthrough) branch 1 taken 85% -: 190: { 39: 191: shares[i].m_contents.reserve(share_header.size() + share_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 39: 192: shares[i].m_contents = share_header; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 193: } -: 194: -: 195: // Choose sequential values for X starting from 1 46: 196: for(uint8_t i = 0; i != N; ++i) branch 0 taken 15% (fallthrough) branch 1 taken 85% 39: 197: shares[i].m_contents.push_back(i+1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 198: 210: 199: for(size_t i = 0; i != secret.size(); ++i) branch 0 taken 97% (fallthrough) branch 1 taken 3% -: 200: { 406: 201: std::vector coefficients(M-1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed 203: 202: rng.randomize(coefficients.data(), coefficients.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 203: 1158: 204: for(uint8_t j = 0; j != N; ++j) branch 0 taken 82% (fallthrough) branch 1 taken 18% -: 205: { 955: 206: const uint8_t X = j + 1; -: 207: 955: 208: uint8_t sum = secret[i]; 955: 209: uint8_t X_i = X; -: 210: 3044: 211: for(size_t k = 0; k != coefficients.size(); ++k) branch 0 taken 69% (fallthrough) branch 1 taken 31% -: 212: { 2089: 213: sum ^= gfp_mul(X_i, coefficients[k]); branch 0 taken 99% (fallthrough) branch 1 taken 1% 4178: 214: X_i = gfp_mul(X_i, X); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 215: } -: 216: 955: 217: shares[j].m_contents.push_back(sum); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 218: } -: 219: } -: 220: 14: 221: return shares; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 222: } -: 223: -: 224:secure_vector function _ZN5Botan10RTSS_Share11reconstructERKSt6vectorIS0_SaIS0_EE called 35 returned 94% blocks executed 42% 35: 225:RTSS_Share::reconstruct(const std::vector& shares) -: 226: { 35: 227: if(shares.size() <= 1) branch 0 taken 100% (fallthrough) branch 1 taken 0% #####: 228: throw Decoding_Error("Insufficient shares to do TSS reconstruction"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 229: 250: 230: for(size_t i = 0; i != shares.size(); ++i) branch 0 taken 86% (fallthrough) branch 1 taken 14% -: 231: { 215: 232: if(shares[i].size() < RTSS_HEADER_SIZE + 1) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 233: throw Decoding_Error("Missing or malformed RTSS header"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 234: 215: 235: if(shares[i].share_id() == 0) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 236: throw Decoding_Error("Invalid (id = 0) RTSS share detected"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 237: 215: 238: if(i > 0) branch 0 taken 84% (fallthrough) branch 1 taken 16% -: 239: { 180: 240: if(shares[i].size() != shares[0].size()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 241: throw Decoding_Error("Different sized RTSS shares detected"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 242: 180: 243: if(!same_mem(&shares[0].m_contents[0], branch 0 taken 0% (fallthrough) branch 1 taken 100% 180: 244: &shares[i].m_contents[0], RTSS_HEADER_SIZE)) #####: 245: throw Decoding_Error("Different RTSS headers detected"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 246: } -: 247: } -: 248: 35: 249: const uint8_t N = shares[0].m_contents[17]; branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 250: 35: 251: if(shares.size() < N) branch 0 taken 3% (fallthrough) branch 1 taken 97% 2: 252: throw Decoding_Error("Insufficient shares to do TSS reconstruction"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 0% call 8 never executed -: 253: 34: 254: const uint16_t share_len = make_uint16(shares[0].m_contents[18], 34: 255: shares[0].m_contents[19]); call 0 returned 100% -: 256: 34: 257: const uint8_t hash_id = shares[0].m_contents[16]; 34: 258: std::unique_ptr hash(get_rtss_hash_by_id(hash_id)); call 0 returned 100% 34: 259: const size_t hash_len = (hash ? hash->output_length() : 0); branch 0 taken 35% (fallthrough) branch 1 taken 65% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 260: 34: 261: if(shares[0].size() != RTSS_HEADER_SIZE + share_len) branch 0 taken 9% (fallthrough) branch 1 taken 91% -: 262: { -: 263: /* -: 264: * This second (laxer) check accomodates a bug in TSS that was -: 265: * fixed in 2.9.0 - previous versions used the length of the -: 266: * *secret* here, instead of the length of the *share*, which is -: 267: * precisely 1 + hash_len longer. -: 268: */ 3: 269: if(shares[0].size() <= RTSS_HEADER_SIZE + 1 + hash_len) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 270: throw Decoding_Error("Bad RTSS length field in header"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 271: } -: 272: 68: 273: std::vector V(shares.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 33% (fallthrough) branch 4 taken 67% branch 5 taken 100% (fallthrough) branch 6 taken 0% 34: 274: secure_vector recovered; -: 275: 887: 276: for(size_t i = RTSS_HEADER_SIZE + 1; i != shares[0].size(); ++i) branch 0 taken 96% (fallthrough) branch 1 taken 4% -: 277: { 4686: 278: for(size_t j = 0; j != V.size(); ++j) branch 0 taken 82% (fallthrough) branch 1 taken 18% 3833: 279: V[j] = shares[j].m_contents[i]; -: 280: 853: 281: uint8_t r = 0; 4686: 282: for(size_t k = 0; k != shares.size(); ++k) branch 0 taken 82% (fallthrough) branch 1 taken 18% -: 283: { -: 284: // L_i function: -: 285: uint8_t r2 = 1; 29288: 286: for(size_t l = 0; l != shares.size(); ++l) branch 0 taken 87% (fallthrough) branch 1 taken 13% -: 287: { 25455: 288: if(k == l) branch 0 taken 15% (fallthrough) branch 1 taken 85% 3833: 289: continue; -: 290: 21622: 291: uint8_t share_k = shares[k].share_id(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 21622: 292: uint8_t share_l = shares[l].share_id(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 293: 21622: 294: if(share_k == share_l) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 295: throw Decoding_Error("Duplicate shares found in RTSS recovery"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 296: 21622: 297: uint8_t div = RTSS_EXP[(255 + 21622: 298: RTSS_LOG[share_l] - 21622: 299: RTSS_LOG[share_k ^ share_l]) % 255]; -: 300: 47077: 301: r2 = gfp_mul(r2, div); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 302: } -: 303: 7657: 304: r ^= gfp_mul(V[k], r2); branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 305: } 853: 306: recovered.push_back(r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 307: } -: 308: 34: 309: if(hash) branch 0 taken 35% (fallthrough) branch 1 taken 65% -: 310: { 12: 311: if(recovered.size() < hash->output_length()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 312: throw Decoding_Error("RTSS recovered value too short to be valid"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 313: 12: 314: const size_t secret_len = recovered.size() - hash->output_length(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 315: 12: 316: hash->update(recovered.data(), secret_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 24: 317: secure_vector hash_check = hash->final(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 318: 12: 319: if(!constant_time_compare(hash_check.data(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 8% (fallthrough) branch 7 taken 92% 12: 320: &recovered[secret_len], call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 321: hash->output_length())) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 322: { 2: 323: throw Decoding_Error("RTSS hash check failed"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% call 8 never executed -: 324: } -: 325: -: 326: // remove the trailing hash value 11: 327: recovered.resize(secret_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 328: } -: 329: 66: 330: return recovered; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 331: } -: 332: -: 333:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#eme_raw.h.gcov -: 0:Source:build/include/botan/eme_raw.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pk_pad_eme.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pk_pad_eme.gcda -: 0:Runs:2947 -: 1:/* -: 2:* (C) 2015 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#ifndef BOTAN_EME_RAW_H_ -: 8:#define BOTAN_EME_RAW_H_ -: 9: -: 10:#include -: 11: -: 12:BOTAN_FUTURE_INTERNAL_HEADER(eme_raw.h) -: 13: -: 14:namespace Botan { -: 15: -: 16:class BOTAN_PUBLIC_API(2,0) EME_Raw final : public EME -: 17: { -: 18: public: -: 19: size_t maximum_input_size(size_t i) const override; -: 20: 184: 21: EME_Raw() = default; -: 22: private: -: 23: secure_vector pad(const uint8_t[], size_t, size_t, -: 24: RandomNumberGenerator&) const override; -: 25: -: 26: secure_vector unpad(uint8_t& valid_mask, -: 27: const uint8_t in[], -: 28: size_t in_len) const override; -: 29: }; -: 30: -: 31:} -: 32: -: 33:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#utils#thread_utils#barrier.cpp.gcov -: 0:Source:src/lib/utils/thread_utils/barrier.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_thread_utils_barrier.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_thread_utils_barrier.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Barrier -: 3:* (C) 2016 Joel Low -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9: -: 10:namespace Botan { -: 11: function _ZN5Botan7Barrier4waitEm called 920 returned 100% blocks executed 100% 920: 12:void Barrier::wait(size_t delta) -: 13: { 920: 14: std::lock_guard lock(m_mutex); call 0 returned 100% 920: 15: m_value += delta; branch 0 taken 100% (fallthrough) branch 1 taken 0% 920: 16: } -: 17: function _ZN5Botan7Barrier4syncEv called 5517 returned 100% blocks executed 100% 5517: 18:void Barrier::sync() -: 19: { 5517: 20: std::unique_lock lock(m_mutex); call 0 returned 100% -: 21: 5517: 22: if(m_value > 1) branch 0 taken 83% (fallthrough) branch 1 taken 17% -: 23: { 4597: 24: --m_value; 4597: 25: const size_t current_syncs = m_syncs; 9194: 26: m_cond.wait(lock, [this, ¤t_syncs] { return m_syncs != current_syncs; }); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 27: } -: 28: else -: 29: { 920: 30: m_value = 0; 920: 31: ++m_syncs; 920: 32: m_cond.notify_all(); call 0 returned 100% -: 33: } 5517: 34: } -: 35: -: 36:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#associated_allocator.hpp.gcov -: 0:Source:/usr/include/boost/asio/associated_allocator.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// associated_allocator.hpp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP -: 12:#define BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21: -: 22:#include -: 23: -: 24:namespace boost { -: 25:namespace asio { -: 26:namespace detail { -: 27: -: 28:template -: 29:struct associated_allocator_check -: 30:{ -: 31: typedef void type; -: 32:}; -: 33: -: 34:template -: 35:struct associated_allocator_impl -: 36:{ -: 37: typedef E type; -: 38: 66*: 39: static type get(const T&, const E& e) BOOST_ASIO_NOEXCEPT -: 40: { -: 41: return e; -: 42: } -: 43:}; -: 44: -: 45:template -: 46:struct associated_allocator_impl::type> -: 48:{ -: 49: typedef typename T::allocator_type type; -: 50: -: 51: static type get(const T& t, const E&) BOOST_ASIO_NOEXCEPT -: 52: { -: 53: return t.get_allocator(); -: 54: } -: 55:}; -: 56: -: 57:} // namespace detail -: 58: -: 59:/// Traits type used to obtain the allocator associated with an object. -: 60:/** -: 61: * A program may specialise this traits type if the @c T template parameter in -: 62: * the specialisation is a user-defined type. The template parameter @c -: 63: * Allocator shall be a type meeting the Allocator requirements. -: 64: * -: 65: * Specialisations shall meet the following requirements, where @c t is a const -: 66: * reference to an object of type @c T, and @c a is an object of type @c -: 67: * Allocator. -: 68: * -: 69: * @li Provide a nested typedef @c type that identifies a type meeting the -: 70: * Allocator requirements. -: 71: * -: 72: * @li Provide a noexcept static member function named @c get, callable as @c -: 73: * get(t) and with return type @c type. -: 74: * -: 75: * @li Provide a noexcept static member function named @c get, callable as @c -: 76: * get(t,a) and with return type @c type. -: 77: */ -: 78:template > -: 79:struct associated_allocator -: 80:{ -: 81: /// If @c T has a nested type @c allocator_type, T::allocator_type. -: 82: /// Otherwise @c Allocator. -: 83:#if defined(GENERATING_DOCUMENTATION) -: 84: typedef see_below type; -: 85:#else // defined(GENERATING_DOCUMENTATION) -: 86: typedef typename detail::associated_allocator_impl::type type; -: 87:#endif // defined(GENERATING_DOCUMENTATION) -: 88: -: 89: /// If @c T has a nested type @c allocator_type, returns -: 90: /// t.get_allocator(). Otherwise returns @c a. 66*: 91: static type get(const T& t, -: 92: const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT -: 93: { 12*: 94: return detail::associated_allocator_impl::get(t, a); call 0 never executed branch 1 never executed branch 2 never executed call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 95: } -: 96:}; -: 97: -: 98:/// Helper function to obtain an object's associated allocator. -: 99:/** -: 100: * @returns associated_allocator::get(t) -: 101: */ -: 102:template -: 103:inline typename associated_allocator::type 66*: 104:get_associated_allocator(const T& t) BOOST_ASIO_NOEXCEPT -: 105:{ 66*: 106: return associated_allocator::get(t); call 0 never executed branch 1 never executed branch 2 never executed call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% call 8 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% (throw) call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% (throw) call 14 returned 100% branch 15 taken 100% (fallthrough) branch 16 taken 0% (throw) branch 17 taken 67% (fallthrough) branch 18 taken 33% branch 19 taken 0% (fallthrough) branch 20 taken 100% branch 21 taken 0% (fallthrough) branch 22 taken 100% -: 107:} -: 108: -: 109:/// Helper function to obtain an object's associated allocator. -: 110:/** -: 111: * @returns associated_allocator::get(t, a) -: 112: */ -: 113:template -: 114:inline typename associated_allocator::type -: 115:get_associated_allocator(const T& t, const Allocator& a) BOOST_ASIO_NOEXCEPT -: 116:{ -: 117: return associated_allocator::get(t, a); -: 118:} -: 119: -: 120:#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) -: 121: -: 122:template > -: 123:using associated_allocator_t -: 124: = typename associated_allocator::type; -: 125: -: 126:#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) -: 127: -: 128:} // namespace asio -: 129:} // namespace boost -: 130: -: 131:#include -: 132: -: 133:#endif // BOOST_ASIO_ASSOCIATED_ALLOCATOR_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#date_time#int_adapter.hpp.gcov -: 0:Source:/usr/include/boost/date_time/int_adapter.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:#ifndef _DATE_TIME_INT_ADAPTER_HPP__ -: 2:#define _DATE_TIME_INT_ADAPTER_HPP__ -: 3: -: 4:/* Copyright (c) 2002,2003 CrystalClear Software, Inc. -: 5: * Use, modification and distribution is subject to the -: 6: * Boost Software License, Version 1.0. (See accompanying -: 7: * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -: 8: * Author: Jeff Garland, Bart Garst -: 9: * $Date$ -: 10: */ -: 11: -: 12: -: 13:#include "boost/config.hpp" -: 14:#include "boost/limits.hpp" //work around compilers without limits -: 15:#include "boost/date_time/special_defs.hpp" -: 16:#include "boost/date_time/locale_config.hpp" -: 17:#ifndef BOOST_DATE_TIME_NO_LOCALE -: 18:# include -: 19:#endif -: 20: -: 21:#if defined(BOOST_MSVC) -: 22:#pragma warning(push) -: 23:// conditional expression is constant -: 24:#pragma warning(disable: 4127) -: 25:#endif -: 26: -: 27:namespace boost { -: 28:namespace date_time { -: 29: -: 30: -: 31://! Adapter to create integer types with +-infinity, and not a value -: 32:/*! This class is used internally in counted date/time representations. -: 33: * It adds the floating point like features of infinities and -: 34: * not a number. It also provides mathmatical operations with -: 35: * consideration to special values following these rules: -: 36: *@code -: 37: * +infinity - infinity == Not A Number (NAN) -: 38: * infinity * non-zero == infinity -: 39: * infinity * zero == NAN -: 40: * +infinity * -integer == -infinity -: 41: * infinity / infinity == NAN -: 42: * infinity * infinity == infinity -: 43: *@endcode -: 44: */ -: 45:template -: 46:class int_adapter { -: 47:public: -: 48: typedef int_type_ int_type; #####: 49: int_adapter(int_type v) : call 0 never executed #####: 50: value_(v) branch 0 never executed branch 1 never executed call 2 never executed -: 51: {} -: 52: static bool has_infinity() -: 53: { -: 54: return true; -: 55: } #####: 56: static const int_adapter pos_infinity() -: 57: { #####: 58: return (::std::numeric_limits::max)(); -: 59: } #####: 60: static const int_adapter neg_infinity() -: 61: { #####: 62: return (::std::numeric_limits::min)(); -: 63: } #####: 64: static const int_adapter not_a_number() -: 65: { #####: 66: return (::std::numeric_limits::max)()-1; -: 67: } #####: 68: static int_adapter max BOOST_PREVENT_MACRO_SUBSTITUTION () -: 69: { #####: 70: return (::std::numeric_limits::max)()-2; -: 71: } #####: 72: static int_adapter min BOOST_PREVENT_MACRO_SUBSTITUTION () -: 73: { #####: 74: return (::std::numeric_limits::min)()+1; -: 75: } function _ZN5boost9date_time11int_adapterIlE12from_specialENS0_14special_valuesE called 0 returned 0% blocks executed 0% #####: 76: static int_adapter from_special(special_values sv) -: 77: { #####: 78: switch (sv) { branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed -: 79: case not_a_date_time: return not_a_number(); -: 80: case neg_infin: return neg_infinity(); -: 81: case pos_infin: return pos_infinity(); -: 82: case max_date_time: return (max)(); -: 83: case min_date_time: return (min)(); -: 84: default: return not_a_number(); -: 85: } -: 86: } #####: 87: static bool is_inf(int_type v) -: 88: { #####: 89: return (v == neg_infinity().as_number() || -: 90: v == pos_infinity().as_number()); -: 91: } #####: 92: static bool is_neg_inf(int_type v) -: 93: { -: 94: return (v == neg_infinity().as_number()); -: 95: } #####: 96: static bool is_pos_inf(int_type v) -: 97: { -: 98: return (v == pos_infinity().as_number()); -: 99: } #####: 100: static bool is_not_a_number(int_type v) -: 101: { -: 102: return (v == not_a_number().as_number()); -: 103: } -: 104: //! Returns either special value type or is_not_special #####: 105: static special_values to_special(int_type v) -: 106: { #####: 107: if (is_not_a_number(v)) return not_a_date_time; #####: 108: if (is_neg_inf(v)) return neg_infin; #####: 109: if (is_pos_inf(v)) return pos_infin; -: 110: return not_special; -: 111: } -: 112: -: 113: //-3 leaves room for representations of infinity and not a date -: 114: static int_type maxcount() -: 115: { -: 116: return (::std::numeric_limits::max)()-3; -: 117: } #####: 118: bool is_infinity() const -: 119: { #####: 120: return (value_ == neg_infinity().as_number() || -: 121: value_ == pos_infinity().as_number()); -: 122: } -: 123: bool is_pos_infinity()const -: 124: { -: 125: return(value_ == pos_infinity().as_number()); -: 126: } -: 127: bool is_neg_infinity()const -: 128: { -: 129: return(value_ == neg_infinity().as_number()); -: 130: } #####: 131: bool is_nan() const -: 132: { -: 133: return (value_ == not_a_number().as_number()); -: 134: } #####: 135: bool is_special() const -: 136: { #####: 137: return(is_infinity() || is_nan()); -: 138: } -: 139: bool operator==(const int_adapter& rhs) const -: 140: { -: 141: return (compare(rhs) == 0); -: 142: } -: 143: bool operator==(const int& rhs) const -: 144: { -: 145: if(!std::numeric_limits::is_signed) -: 146: { -: 147: if(is_neg_inf(value_) && rhs == 0) -: 148: { -: 149: return false; -: 150: } -: 151: } -: 152: return (compare(rhs) == 0); -: 153: } -: 154: bool operator!=(const int_adapter& rhs) const -: 155: { -: 156: return (compare(rhs) != 0); -: 157: } -: 158: bool operator!=(const int& rhs) const -: 159: { -: 160: if(!std::numeric_limits::is_signed) -: 161: { -: 162: if(is_neg_inf(value_) && rhs == 0) -: 163: { -: 164: return true; -: 165: } -: 166: } -: 167: return (compare(rhs) != 0); -: 168: } -: 169: bool operator<(const int_adapter& rhs) const -: 170: { -: 171: return (compare(rhs) == -1); -: 172: } -: 173: bool operator<(const int& rhs) const -: 174: { -: 175: // quiets compiler warnings -: 176: if(!std::numeric_limits::is_signed) -: 177: { -: 178: if(is_neg_inf(value_) && rhs == 0) -: 179: { -: 180: return true; -: 181: } -: 182: } -: 183: return (compare(rhs) == -1); -: 184: } -: 185: bool operator>(const int_adapter& rhs) const -: 186: { -: 187: return (compare(rhs) == 1); -: 188: } #####: 189: int_type as_number() const branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed branch 32 never executed branch 33 never executed branch 34 never executed branch 35 never executed branch 36 never executed branch 37 never executed branch 38 never executed branch 39 never executed branch 40 never executed branch 41 never executed branch 42 never executed branch 43 never executed branch 44 never executed branch 45 never executed branch 46 never executed branch 47 never executed branch 48 never executed branch 49 never executed branch 50 never executed branch 51 never executed branch 52 never executed branch 53 never executed branch 54 never executed branch 55 never executed branch 56 never executed branch 57 never executed branch 58 never executed branch 59 never executed branch 60 never executed branch 61 never executed branch 62 never executed branch 63 never executed branch 64 never executed branch 65 never executed -: 190: { -: 191: return value_; -: 192: } -: 193: //! Returns either special value type or is_not_special -: 194: special_values as_special() const -: 195: { -: 196: return int_adapter::to_special(value_); -: 197: } -: 198: //creates nasty ambiguities -: 199:// operator int_type() const -: 200:// { -: 201:// return value_; -: 202:// } -: 203: -: 204: /*! Operator allows for adding dissimilar int_adapter types. -: 205: * The return type will match that of the the calling object's type */ -: 206: template -: 207: inline function _ZNK5boost9date_time11int_adapterIlEplIjEES2_RKNS1_IT_EE called 0 returned 0% blocks executed 0% #####: 208: int_adapter operator+(const int_adapter& rhs) const branch 0 never executed branch 1 never executed -: 209: { #####: 210: if(is_special() || rhs.is_special()) branch 0 never executed branch 1 never executed -: 211: { #####: 212: if (is_nan() || rhs.is_nan()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 213: { -: 214: return int_adapter::not_a_number(); -: 215: } #####: 216: if((is_pos_inf(value_) && rhs.is_neg_inf(rhs.as_number())) || branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 217: (is_neg_inf(value_) && rhs.is_pos_inf(rhs.as_number())) ) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 218: { -: 219: return int_adapter::not_a_number(); -: 220: } #####: 221: if (is_infinity()) branch 0 never executed branch 1 never executed -: 222: { #####: 223: return *this; -: 224: } #####: 225: if (rhs.is_pos_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 226: { -: 227: return int_adapter::pos_infinity(); -: 228: } #####: 229: if (rhs.is_neg_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 230: { -: 231: return int_adapter::neg_infinity(); -: 232: } -: 233: } #####: 234: return int_adapter(value_ + static_cast(rhs.as_number())); -: 235: } -: 236: -: 237: int_adapter operator+(const int_type rhs) const -: 238: { -: 239: if(is_special()) -: 240: { -: 241: if (is_nan()) -: 242: { -: 243: return int_adapter(not_a_number()); -: 244: } -: 245: if (is_infinity()) -: 246: { -: 247: return *this; -: 248: } -: 249: } -: 250: return int_adapter(value_ + rhs); -: 251: } -: 252: -: 253: /*! Operator allows for subtracting dissimilar int_adapter types. -: 254: * The return type will match that of the the calling object's type */ -: 255: template -: 256: inline function _ZNK5boost9date_time11int_adapterIlEmiIlEES2_RKNS1_IT_EE called 0 returned 0% blocks executed 0% #####: 257: int_adapter operator-(const int_adapter& rhs)const branch 0 never executed branch 1 never executed -: 258: { #####: 259: if(is_special() || rhs.is_special()) branch 0 never executed branch 1 never executed -: 260: { #####: 261: if (is_nan() || rhs.is_nan()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 262: { -: 263: return int_adapter::not_a_number(); -: 264: } #####: 265: if((is_pos_inf(value_) && rhs.is_pos_inf(rhs.as_number())) || branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 266: (is_neg_inf(value_) && rhs.is_neg_inf(rhs.as_number())) ) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 267: { -: 268: return int_adapter::not_a_number(); -: 269: } #####: 270: if (is_infinity()) branch 0 never executed branch 1 never executed -: 271: { #####: 272: return *this; -: 273: } #####: 274: if (rhs.is_pos_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 275: { -: 276: return int_adapter::neg_infinity(); -: 277: } #####: 278: if (rhs.is_neg_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 279: { -: 280: return int_adapter::pos_infinity(); -: 281: } -: 282: } #####: 283: return int_adapter(value_ - static_cast(rhs.as_number())); -: 284: } -: 285: int_adapter operator-(const int_type rhs) const -: 286: { -: 287: if(is_special()) -: 288: { -: 289: if (is_nan()) -: 290: { -: 291: return int_adapter(not_a_number()); -: 292: } -: 293: if (is_infinity()) -: 294: { -: 295: return *this; -: 296: } -: 297: } -: 298: return int_adapter(value_ - rhs); -: 299: } -: 300: -: 301: // should templatize this to be consistant with op +- -: 302: int_adapter operator*(const int_adapter& rhs)const -: 303: { -: 304: if(this->is_special() || rhs.is_special()) -: 305: { -: 306: return mult_div_specials(rhs); -: 307: } -: 308: return int_adapter(value_ * rhs.value_); -: 309: } -: 310: /*! Provided for cases when automatic conversion from -: 311: * 'int' to 'int_adapter' causes incorrect results. */ -: 312: int_adapter operator*(const int rhs) const -: 313: { -: 314: if(is_special()) -: 315: { -: 316: return mult_div_specials(rhs); -: 317: } -: 318: return int_adapter(value_ * rhs); -: 319: } -: 320: -: 321: // should templatize this to be consistant with op +- -: 322: int_adapter operator/(const int_adapter& rhs)const -: 323: { -: 324: if(this->is_special() || rhs.is_special()) -: 325: { -: 326: if(is_infinity() && rhs.is_infinity()) -: 327: { -: 328: return int_adapter(not_a_number()); -: 329: } -: 330: if(rhs != 0) -: 331: { -: 332: return mult_div_specials(rhs); -: 333: } -: 334: else { // let divide by zero blow itself up -: 335: return int_adapter(value_ / rhs.value_); -: 336: } -: 337: } -: 338: return int_adapter(value_ / rhs.value_); -: 339: } -: 340: /*! Provided for cases when automatic conversion from -: 341: * 'int' to 'int_adapter' causes incorrect results. */ -: 342: int_adapter operator/(const int rhs) const -: 343: { -: 344: if(is_special() && rhs != 0) -: 345: { -: 346: return mult_div_specials(rhs); -: 347: } -: 348: return int_adapter(value_ / rhs); -: 349: } -: 350: -: 351: // should templatize this to be consistant with op +- -: 352: int_adapter operator%(const int_adapter& rhs)const -: 353: { -: 354: if(this->is_special() || rhs.is_special()) -: 355: { -: 356: if(is_infinity() && rhs.is_infinity()) -: 357: { -: 358: return int_adapter(not_a_number()); -: 359: } -: 360: if(rhs != 0) -: 361: { -: 362: return mult_div_specials(rhs); -: 363: } -: 364: else { // let divide by zero blow itself up -: 365: return int_adapter(value_ % rhs.value_); -: 366: } -: 367: } -: 368: return int_adapter(value_ % rhs.value_); -: 369: } -: 370: /*! Provided for cases when automatic conversion from -: 371: * 'int' to 'int_adapter' causes incorrect results. */ -: 372: int_adapter operator%(const int rhs) const -: 373: { -: 374: if(is_special() && rhs != 0) -: 375: { -: 376: return mult_div_specials(rhs); -: 377: } -: 378: return int_adapter(value_ % rhs); -: 379: } -: 380:private: -: 381: int_type value_; -: 382: -: 383: //! returns -1, 0, 1, or 2 if 'this' is <, ==, >, or 'nan comparison' rhs -: 384: int compare(const int_adapter& rhs)const -: 385: { -: 386: if(this->is_special() || rhs.is_special()) -: 387: { -: 388: if(this->is_nan() || rhs.is_nan()) { -: 389: if(this->is_nan() && rhs.is_nan()) { -: 390: return 0; // equal -: 391: } -: 392: else { -: 393: return 2; // nan -: 394: } -: 395: } -: 396: if((is_neg_inf(value_) && !is_neg_inf(rhs.value_)) || -: 397: (is_pos_inf(rhs.value_) && !is_pos_inf(value_)) ) -: 398: { -: 399: return -1; // less than -: 400: } -: 401: if((is_pos_inf(value_) && !is_pos_inf(rhs.value_)) || -: 402: (is_neg_inf(rhs.value_) && !is_neg_inf(value_)) ) { -: 403: return 1; // greater than -: 404: } -: 405: } -: 406: if(value_ < rhs.value_) return -1; -: 407: if(value_ > rhs.value_) return 1; -: 408: // implied-> if(value_ == rhs.value_) -: 409: return 0; -: 410: } -: 411: /* When multiplying and dividing with at least 1 special value -: 412: * very simmilar rules apply. In those cases where the rules -: 413: * are different, they are handled in the respective operator -: 414: * function. */ -: 415: //! Assumes at least 'this' or 'rhs' is a special value -: 416: int_adapter mult_div_specials(const int_adapter& rhs)const -: 417: { -: 418: if(this->is_nan() || rhs.is_nan()) { -: 419: return int_adapter(not_a_number()); -: 420: } -: 421: BOOST_CONSTEXPR_OR_CONST int min_value = std::numeric_limits::is_signed ? 0 : 1; -: 422: if((*this > 0 && rhs > 0) || (*this < min_value && rhs < min_value)) { -: 423: return int_adapter(pos_infinity()); -: 424: } -: 425: if((*this > 0 && rhs < min_value) || (*this < min_value && rhs > 0)) { -: 426: return int_adapter(neg_infinity()); -: 427: } -: 428: //implied -> if(this->value_ == 0 || rhs.value_ == 0) -: 429: return int_adapter(not_a_number()); -: 430: } -: 431: /* Overloaded function necessary because of special -: 432: * situation where int_adapter is instantiated with -: 433: * 'unsigned' and func is called with negative int. -: 434: * It would produce incorrect results since 'unsigned' -: 435: * wraps around when initialized with a negative value */ -: 436: //! Assumes 'this' is a special value -: 437: int_adapter mult_div_specials(const int& rhs) const -: 438: { -: 439: if(this->is_nan()) { -: 440: return int_adapter(not_a_number()); -: 441: } -: 442: BOOST_CONSTEXPR_OR_CONST int min_value = std::numeric_limits::is_signed ? 0 : 1; -: 443: if((*this > 0 && rhs > 0) || (*this < min_value && rhs < 0)) { -: 444: return int_adapter(pos_infinity()); -: 445: } -: 446: if((*this > 0 && rhs < 0) || (*this < min_value && rhs > 0)) { -: 447: return int_adapter(neg_infinity()); -: 448: } -: 449: //implied -> if(this->value_ == 0 || rhs.value_ == 0) -: 450: return int_adapter(not_a_number()); -: 451: } -: 452: -: 453:}; -: 454: -: 455:#ifndef BOOST_DATE_TIME_NO_LOCALE -: 456: /*! Expected output is either a numeric representation -: 457: * or a special values representation.
-: 458: * Ex. "12", "+infinity", "not-a-number", etc. */ -: 459: //template, typename int_type> -: 460: template -: 461: inline -: 462: std::basic_ostream& -: 463: operator<<(std::basic_ostream& os, const int_adapter& ia) -: 464: { -: 465: if(ia.is_special()) { -: 466: // switch copied from date_names_put.hpp -: 467: switch(ia.as_special()) -: 468: { -: 469: case not_a_date_time: -: 470: os << "not-a-number"; -: 471: break; -: 472: case pos_infin: -: 473: os << "+infinity"; -: 474: break; -: 475: case neg_infin: -: 476: os << "-infinity"; -: 477: break; -: 478: default: -: 479: os << ""; -: 480: } -: 481: } -: 482: else { -: 483: os << ia.as_number(); -: 484: } -: 485: return os; -: 486: } -: 487:#endif -: 488: -: 489: -: 490:} } //namespace date_time -: 491: -: 492:#if defined(BOOST_MSVC) -: 493:#pragma warning(pop) -: 494:#endif -: 495: -: 496:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#regex_constants.h.gcov -: 0:Source:/usr/include/c++/9/bits/regex_constants.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcda -: 0:Runs:2947 -: 1:// class template regex -*- C++ -*- -: 2: -: 3:// Copyright (C) 2010-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/** -: 26: * @file bits/regex_constants.h -: 27: * @brief Constant definitions for the std regex library. -: 28: * -: 29: * This is an internal header file, included by other library headers. -: 30: * Do not attempt to use it directly. @headername{regex} -: 31: */ -: 32: -: 33:namespace std _GLIBCXX_VISIBILITY(default) -: 34:{ -: 35:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 36: -: 37:/** -: 38: * @defgroup regex Regular Expressions -: 39: * -: 40: * A facility for performing regular expression pattern matching. -: 41: * @{ -: 42: */ -: 43: -: 44:/** -: 45: * @namespace std::regex_constants -: 46: * @brief ISO C++-0x entities sub namespace for regex. -: 47: */ -: 48:namespace regex_constants -: 49:{ -: 50: /** -: 51: * @name 5.1 Regular Expression Syntax Options -: 52: */ -: 53: //@{ -: 54: enum __syntax_option -: 55: { -: 56: _S_icase, -: 57: _S_nosubs, -: 58: _S_optimize, -: 59: _S_collate, -: 60: _S_ECMAScript, -: 61: _S_basic, -: 62: _S_extended, -: 63: _S_awk, -: 64: _S_grep, -: 65: _S_egrep, -: 66: _S_polynomial, -: 67: _S_syntax_last -: 68: }; -: 69: -: 70: /** -: 71: * @brief This is a bitmask type indicating how to interpret the regex. -: 72: * -: 73: * The @c syntax_option_type is implementation defined but it is valid to -: 74: * perform bitwise operations on these values and expect the right thing to -: 75: * happen. -: 76: * -: 77: * A valid value of type syntax_option_type shall have exactly one of the -: 78: * elements @c ECMAScript, @c basic, @c extended, @c awk, @c grep, @c egrep -: 79: * %set. -: 80: */ -: 81: enum syntax_option_type : unsigned int { }; -: 82: -: 83: /** -: 84: * Specifies that the matching of regular expressions against a character -: 85: * sequence shall be performed without regard to case. -: 86: */ -: 87: _GLIBCXX17_INLINE constexpr syntax_option_type icase = -: 88: static_cast(1 << _S_icase); -: 89: -: 90: /** -: 91: * Specifies that when a regular expression is matched against a character -: 92: * container sequence, no sub-expression matches are to be stored in the -: 93: * supplied match_results structure. -: 94: */ -: 95: _GLIBCXX17_INLINE constexpr syntax_option_type nosubs = -: 96: static_cast(1 << _S_nosubs); -: 97: -: 98: /** -: 99: * Specifies that the regular expression engine should pay more attention to -: 100: * the speed with which regular expressions are matched, and less to the -: 101: * speed with which regular expression objects are constructed. Otherwise -: 102: * it has no detectable effect on the program output. -: 103: */ -: 104: _GLIBCXX17_INLINE constexpr syntax_option_type optimize = -: 105: static_cast(1 << _S_optimize); -: 106: -: 107: /** -: 108: * Specifies that character ranges of the form [a-b] should be locale -: 109: * sensitive. -: 110: */ -: 111: _GLIBCXX17_INLINE constexpr syntax_option_type collate = -: 112: static_cast(1 << _S_collate); -: 113: -: 114: /** -: 115: * Specifies that the grammar recognized by the regular expression engine is -: 116: * that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript -: 117: * Language Specification, Standard Ecma-262, third edition, 1999], as -: 118: * modified in section [28.13]. This grammar is similar to that defined -: 119: * in the PERL scripting language but extended with elements found in the -: 120: * POSIX regular expression grammar. -: 121: */ -: 122: _GLIBCXX17_INLINE constexpr syntax_option_type ECMAScript = -: 123: static_cast(1 << _S_ECMAScript); -: 124: -: 125: /** -: 126: * Specifies that the grammar recognized by the regular expression engine is -: 127: * that used by POSIX basic regular expressions in IEEE Std 1003.1-2001, -: 128: * Portable Operating System Interface (POSIX), Base Definitions and -: 129: * Headers, Section 9, Regular Expressions [IEEE, Information Technology -- -: 130: * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. -: 131: */ -: 132: _GLIBCXX17_INLINE constexpr syntax_option_type basic = -: 133: static_cast(1 << _S_basic); -: 134: -: 135: /** -: 136: * Specifies that the grammar recognized by the regular expression engine is -: 137: * that used by POSIX extended regular expressions in IEEE Std 1003.1-2001, -: 138: * Portable Operating System Interface (POSIX), Base Definitions and -: 139: * Headers, Section 9, Regular Expressions. -: 140: */ -: 141: _GLIBCXX17_INLINE constexpr syntax_option_type extended = -: 142: static_cast(1 << _S_extended); -: 143: -: 144: /** -: 145: * Specifies that the grammar recognized by the regular expression engine is -: 146: * that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is -: 147: * identical to syntax_option_type extended, except that C-style escape -: 148: * sequences are supported. These sequences are: -: 149: * \\\\, \\a, \\b, \\f, \\n, \\r, \\t , \\v, \\&apos,, &apos,, -: 150: * and \\ddd (where ddd is one, two, or three octal digits). -: 151: */ -: 152: _GLIBCXX17_INLINE constexpr syntax_option_type awk = -: 153: static_cast(1 << _S_awk); -: 154: -: 155: /** -: 156: * Specifies that the grammar recognized by the regular expression engine is -: 157: * that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is -: 158: * identical to syntax_option_type basic, except that newlines are treated -: 159: * as whitespace. -: 160: */ -: 161: _GLIBCXX17_INLINE constexpr syntax_option_type grep = -: 162: static_cast(1 << _S_grep); -: 163: -: 164: /** -: 165: * Specifies that the grammar recognized by the regular expression engine is -: 166: * that used by POSIX utility grep when given the -E option in -: 167: * IEEE Std 1003.1-2001. This option is identical to syntax_option_type -: 168: * extended, except that newlines are treated as whitespace. -: 169: */ -: 170: _GLIBCXX17_INLINE constexpr syntax_option_type egrep = -: 171: static_cast(1 << _S_egrep); -: 172: -: 173: /** -: 174: * Extension: Ensure both space complexity of compiled regex and -: 175: * time complexity execution are not exponential. -: 176: * If specified in a regex with back-references, the exception -: 177: * regex_constants::error_complexity will be thrown. -: 178: */ -: 179: _GLIBCXX17_INLINE constexpr syntax_option_type __polynomial = -: 180: static_cast(1 << _S_polynomial); -: 181: -: 182: constexpr inline syntax_option_type 336*: 183: operator&(syntax_option_type __a, syntax_option_type __b) -: 184: { 5*: 185: return (syntax_option_type)(static_cast(__a) call 0 never executed call 1 never executed branch 2 taken 0% (fallthrough) branch 3 taken 100% 286*: 186: & static_cast(__b)); branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 taken 0% (fallthrough) branch 15 taken 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% branch 18 taken 100% (fallthrough) branch 19 taken 0% branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 taken 80% (fallthrough) branch 25 taken 20% branch 26 never executed branch 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed branch 32 never executed branch 33 never executed branch 34 never executed branch 35 never executed branch 36 never executed branch 37 never executed branch 38 never executed branch 39 never executed branch 40 taken 100% (fallthrough) branch 41 taken 0% branch 42 taken 100% (fallthrough) branch 43 taken 0% branch 44 never executed branch 45 never executed branch 46 never executed branch 47 never executed branch 48 never executed branch 49 never executed branch 50 never executed branch 51 never executed branch 52 taken 100% (fallthrough) branch 53 taken 0% branch 54 taken 100% (fallthrough) branch 55 taken 0% branch 56 never executed branch 57 never executed branch 58 never executed branch 59 never executed branch 60 taken 0% (fallthrough) branch 61 taken 100% branch 62 taken 0% (fallthrough) branch 63 taken 100% branch 64 never executed branch 65 never executed branch 66 taken 0% (fallthrough) branch 67 taken 100% branch 68 taken 100% (fallthrough) branch 69 taken 0% branch 70 taken 0% branch 71 taken 100% branch 72 never executed branch 73 never executed branch 74 never executed branch 75 never executed branch 76 taken 100% (fallthrough) branch 77 taken 0% branch 78 taken 0% (fallthrough) branch 79 taken 100% branch 80 taken 0% (fallthrough) branch 81 taken 100% branch 82 taken 100% (fallthrough) branch 83 taken 0% branch 84 never executed branch 85 never executed branch 86 never executed branch 87 never executed branch 88 never executed branch 89 never executed branch 90 never executed branch 91 never executed branch 92 never executed branch 93 never executed -: 187: } -: 188: -: 189: constexpr inline syntax_option_type #####: 190: operator|(syntax_option_type __a, syntax_option_type __b) -: 191: { #####: 192: return (syntax_option_type)(static_cast(__a) #####: 193: | static_cast(__b)); -: 194: } -: 195: -: 196: constexpr inline syntax_option_type -: 197: operator^(syntax_option_type __a, syntax_option_type __b) -: 198: { -: 199: return (syntax_option_type)(static_cast(__a) -: 200: ^ static_cast(__b)); -: 201: } -: 202: -: 203: constexpr inline syntax_option_type -: 204: operator~(syntax_option_type __a) -: 205: { return (syntax_option_type)(~static_cast(__a)); } -: 206: -: 207: inline syntax_option_type& -: 208: operator&=(syntax_option_type& __a, syntax_option_type __b) -: 209: { return __a = __a & __b; } -: 210: -: 211: inline syntax_option_type& -: 212: operator|=(syntax_option_type& __a, syntax_option_type __b) -: 213: { return __a = __a | __b; } -: 214: -: 215: inline syntax_option_type& -: 216: operator^=(syntax_option_type& __a, syntax_option_type __b) -: 217: { return __a = __a ^ __b; } -: 218: -: 219: //@} -: 220: -: 221: /** -: 222: * @name 5.2 Matching Rules -: 223: * -: 224: * Matching a regular expression against a sequence of characters [first, -: 225: * last) proceeds according to the rules of the grammar specified for the -: 226: * regular expression object, modified according to the effects listed -: 227: * below for any bitmask elements set. -: 228: * -: 229: */ -: 230: //@{ -: 231: -: 232: enum __match_flag -: 233: { -: 234: _S_not_bol, -: 235: _S_not_eol, -: 236: _S_not_bow, -: 237: _S_not_eow, -: 238: _S_any, -: 239: _S_not_null, -: 240: _S_continuous, -: 241: _S_prev_avail, -: 242: _S_sed, -: 243: _S_no_copy, -: 244: _S_first_only, -: 245: _S_match_flag_last -: 246: }; -: 247: -: 248: /** -: 249: * @brief This is a bitmask type indicating regex matching rules. -: 250: * -: 251: * The @c match_flag_type is implementation defined but it is valid to -: 252: * perform bitwise operations on these values and expect the right thing to -: 253: * happen. -: 254: */ -: 255: enum match_flag_type : unsigned int { }; -: 256: -: 257: /** -: 258: * The default matching rules. -: 259: */ -: 260: _GLIBCXX17_INLINE constexpr match_flag_type match_default = -: 261: static_cast(0); -: 262: -: 263: /** -: 264: * The first character in the sequence [first, last) is treated as though it -: 265: * is not at the beginning of a line, so the character (^) in the regular -: 266: * expression shall not match [first, first). -: 267: */ -: 268: _GLIBCXX17_INLINE constexpr match_flag_type match_not_bol = -: 269: static_cast(1 << _S_not_bol); -: 270: -: 271: /** -: 272: * The last character in the sequence [first, last) is treated as though it -: 273: * is not at the end of a line, so the character ($) in the regular -: 274: * expression shall not match [last, last). -: 275: */ -: 276: _GLIBCXX17_INLINE constexpr match_flag_type match_not_eol = -: 277: static_cast(1 << _S_not_eol); -: 278: -: 279: /** -: 280: * The expression \\b is not matched against the sub-sequence -: 281: * [first,first). -: 282: */ -: 283: _GLIBCXX17_INLINE constexpr match_flag_type match_not_bow = -: 284: static_cast(1 << _S_not_bow); -: 285: -: 286: /** -: 287: * The expression \\b should not be matched against the sub-sequence -: 288: * [last,last). -: 289: */ -: 290: _GLIBCXX17_INLINE constexpr match_flag_type match_not_eow = -: 291: static_cast(1 << _S_not_eow); -: 292: -: 293: /** -: 294: * If more than one match is possible then any match is an acceptable -: 295: * result. -: 296: */ -: 297: _GLIBCXX17_INLINE constexpr match_flag_type match_any = -: 298: static_cast(1 << _S_any); -: 299: -: 300: /** -: 301: * The expression does not match an empty sequence. -: 302: */ -: 303: _GLIBCXX17_INLINE constexpr match_flag_type match_not_null = -: 304: static_cast(1 << _S_not_null); -: 305: -: 306: /** -: 307: * The expression only matches a sub-sequence that begins at first . -: 308: */ -: 309: _GLIBCXX17_INLINE constexpr match_flag_type match_continuous = -: 310: static_cast(1 << _S_continuous); -: 311: -: 312: /** -: 313: * --first is a valid iterator position. When this flag is set then the -: 314: * flags match_not_bol and match_not_bow are ignored by the regular -: 315: * expression algorithms 28.11 and iterators 28.12. -: 316: */ -: 317: _GLIBCXX17_INLINE constexpr match_flag_type match_prev_avail = -: 318: static_cast(1 << _S_prev_avail); -: 319: -: 320: /** -: 321: * When a regular expression match is to be replaced by a new string, the -: 322: * new string is constructed using the rules used by the ECMAScript replace -: 323: * function in ECMA- 262 [Ecma International, ECMAScript Language -: 324: * Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11 -: 325: * String.prototype.replace. In addition, during search and replace -: 326: * operations all non-overlapping occurrences of the regular expression -: 327: * are located and replaced, and sections of the input that did not match -: 328: * the expression are copied unchanged to the output string. -: 329: * -: 330: * Format strings (from ECMA-262 [15.5.4.11]): -: 331: * @li $$ The dollar-sign itself ($) -: 332: * @li $& The matched substring. -: 333: * @li $` The portion of @a string that precedes the matched substring. -: 334: * This would be match_results::prefix(). -: 335: * @li $' The portion of @a string that follows the matched substring. -: 336: * This would be match_results::suffix(). -: 337: * @li $n The nth capture, where n is in [1,9] and $n is not followed by a -: 338: * decimal digit. If n <= match_results::size() and the nth capture -: 339: * is undefined, use the empty string instead. If n > -: 340: * match_results::size(), the result is implementation-defined. -: 341: * @li $nn The nnth capture, where nn is a two-digit decimal number on -: 342: * [01, 99]. If nn <= match_results::size() and the nth capture is -: 343: * undefined, use the empty string instead. If -: 344: * nn > match_results::size(), the result is implementation-defined. -: 345: */ -: 346: _GLIBCXX17_INLINE constexpr match_flag_type format_default = -: 347: static_cast(0); -: 348: -: 349: /** -: 350: * When a regular expression match is to be replaced by a new string, the -: 351: * new string is constructed using the rules used by the POSIX sed utility -: 352: * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable -: 353: * Operating System Interface (POSIX), IEEE Standard 1003.1-2001]. -: 354: */ -: 355: _GLIBCXX17_INLINE constexpr match_flag_type format_sed = -: 356: static_cast(1 << _S_sed); -: 357: -: 358: /** -: 359: * During a search and replace operation, sections of the character -: 360: * container sequence being searched that do not match the regular -: 361: * expression shall not be copied to the output string. -: 362: */ -: 363: _GLIBCXX17_INLINE constexpr match_flag_type format_no_copy = -: 364: static_cast(1 << _S_no_copy); -: 365: -: 366: /** -: 367: * When specified during a search and replace operation, only the first -: 368: * occurrence of the regular expression shall be replaced. -: 369: */ -: 370: _GLIBCXX17_INLINE constexpr match_flag_type format_first_only = -: 371: static_cast(1 << _S_first_only); -: 372: -: 373: constexpr inline match_flag_type 15*: 374: operator&(match_flag_type __a, match_flag_type __b) -: 375: { #####: 376: return (match_flag_type)(static_cast(__a) 15*: 377: & static_cast(__b)); branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 taken 100% (fallthrough) branch 15 taken 0% branch 16 taken 100% (fallthrough) branch 17 taken 0% branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 taken 0% (fallthrough) branch 23 taken 100% branch 24 never executed branch 25 never executed -: 378: } -: 379: -: 380: constexpr inline match_flag_type -: 381: operator|(match_flag_type __a, match_flag_type __b) -: 382: { -: 383: return (match_flag_type)(static_cast(__a) -: 384: | static_cast(__b)); -: 385: } -: 386: -: 387: constexpr inline match_flag_type -: 388: operator^(match_flag_type __a, match_flag_type __b) -: 389: { -: 390: return (match_flag_type)(static_cast(__a) -: 391: ^ static_cast(__b)); -: 392: } -: 393: -: 394: constexpr inline match_flag_type -: 395: operator~(match_flag_type __a) -: 396: { return (match_flag_type)(~static_cast(__a)); } -: 397: -: 398: inline match_flag_type& -: 399: operator&=(match_flag_type& __a, match_flag_type __b) -: 400: { return __a = __a & __b; } -: 401: -: 402: inline match_flag_type& -: 403: operator|=(match_flag_type& __a, match_flag_type __b) -: 404: { return __a = __a | __b; } -: 405: -: 406: inline match_flag_type& -: 407: operator^=(match_flag_type& __a, match_flag_type __b) -: 408: { return __a = __a ^ __b; } -: 409: -: 410: //@} -: 411:} // namespace regex_constants -: 412:/* @} */ // group regex -: 413: -: 414:_GLIBCXX_END_NAMESPACE_VERSION -: 415:} // namespace std -: 416: <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#allocator.h.gcov -: 0:Source:/usr/include/c++/9/bits/allocator.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcda -: 0:Runs:2947 -: 1:// Allocators -*- C++ -*- -: 2: -: 3:// Copyright (C) 2001-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/* -: 26: * Copyright (c) 1996-1997 -: 27: * Silicon Graphics Computer Systems, Inc. -: 28: * -: 29: * Permission to use, copy, modify, distribute and sell this software -: 30: * and its documentation for any purpose is hereby granted without fee, -: 31: * provided that the above copyright notice appear in all copies and -: 32: * that both that copyright notice and this permission notice appear -: 33: * in supporting documentation. Silicon Graphics makes no -: 34: * representations about the suitability of this software for any -: 35: * purpose. It is provided "as is" without express or implied warranty. -: 36: */ -: 37: -: 38:/** @file bits/allocator.h -: 39: * This is an internal header file, included by other library headers. -: 40: * Do not attempt to use it directly. @headername{memory} -: 41: */ -: 42: -: 43:#ifndef _ALLOCATOR_H -: 44:#define _ALLOCATOR_H 1 -: 45: -: 46:#include // Define the base class to std::allocator. -: 47:#include -: 48:#if __cplusplus >= 201103L -: 49:#include -: 50:#endif -: 51: -: 52:#define __cpp_lib_incomplete_container_elements 201505 -: 53:#if __cplusplus >= 201103L -: 54:# define __cpp_lib_allocator_is_always_equal 201411 -: 55:#endif -: 56: -: 57:namespace std _GLIBCXX_VISIBILITY(default) -: 58:{ -: 59:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 60: -: 61: /** -: 62: * @addtogroup allocators -: 63: * @{ -: 64: */ -: 65: -: 66: /// allocator specialization. -: 67: template<> -: 68: class allocator -: 69: { -: 70: public: -: 71: typedef size_t size_type; -: 72: typedef ptrdiff_t difference_type; -: 73: typedef void* pointer; -: 74: typedef const void* const_pointer; -: 75: typedef void value_type; -: 76: -: 77: template -: 78: struct rebind -: 79: { typedef allocator<_Tp1> other; }; -: 80: -: 81:#if __cplusplus >= 201103L -: 82: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 83: // 2103. std::allocator propagate_on_container_move_assignment -: 84: typedef true_type propagate_on_container_move_assignment; -: 85: -: 86: typedef true_type is_always_equal; -: 87: -: 88: template -: 89: void -: 90: construct(_Up* __p, _Args&&... __args) -: 91: noexcept(noexcept(::new((void *)__p) -: 92: _Up(std::forward<_Args>(__args)...))) -: 93: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } -: 94: -: 95: template -: 96: void -: 97: destroy(_Up* __p) -: 98: noexcept(noexcept(__p->~_Up())) -: 99: { __p->~_Up(); } -: 100:#endif -: 101: }; -: 102: -: 103: /** -: 104: * @brief The @a standard allocator, as per [20.4]. -: 105: * -: 106: * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/memory.html#std.util.memory.allocator -: 107: * for further details. -: 108: * -: 109: * @tparam _Tp Type of allocated object. -: 110: */ -: 111: template -: 112: class allocator : public __allocator_base<_Tp> -: 113: { -: 114: public: -: 115: typedef size_t size_type; -: 116: typedef ptrdiff_t difference_type; -: 117: typedef _Tp* pointer; -: 118: typedef const _Tp* const_pointer; -: 119: typedef _Tp& reference; -: 120: typedef const _Tp& const_reference; -: 121: typedef _Tp value_type; -: 122: -: 123: template -: 124: struct rebind -: 125: { typedef allocator<_Tp1> other; }; -: 126: -: 127:#if __cplusplus >= 201103L -: 128: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 129: // 2103. std::allocator propagate_on_container_move_assignment -: 130: typedef true_type propagate_on_container_move_assignment; -: 131: -: 132: typedef true_type is_always_equal; -: 133:#endif -: 134: -: 135: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 136: // 3035. std::allocator's constructors should be constexpr -: 137: _GLIBCXX20_CONSTEXPR 162*: 138: allocator() _GLIBCXX_NOTHROW { } call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% -: 139: -: 140: _GLIBCXX20_CONSTEXPR -: 141: allocator(const allocator& __a) _GLIBCXX_NOTHROW -: 142: : __allocator_base<_Tp>(__a) { } -: 143: -: 144:#if __cplusplus >= 201103L -: 145: // Avoid implicit deprecation. -: 146: allocator& operator=(const allocator&) = default; -: 147:#endif -: 148: -: 149: template -: 150: _GLIBCXX20_CONSTEXPR -: 151: allocator(const allocator<_Tp1>&) _GLIBCXX_NOTHROW { } -: 152: 88*: 153: ~allocator() _GLIBCXX_NOTHROW { } call 0 returned 0% call 1 returned 0% call 2 never executed call 3 never executed call 4 never executed -: 154: -: 155: friend bool -: 156: operator==(const allocator&, const allocator&) _GLIBCXX_NOTHROW -: 157: { return true; } -: 158: -: 159: friend bool -: 160: operator!=(const allocator&, const allocator&) _GLIBCXX_NOTHROW -: 161: { return false; } -: 162: -: 163: // Inherit everything else. -: 164: }; -: 165: -: 166: template -: 167: inline bool -: 168: operator==(const allocator<_T1>&, const allocator<_T2>&) -: 169: _GLIBCXX_NOTHROW -: 170: { return true; } -: 171: -: 172: template -: 173: inline bool -: 174: operator!=(const allocator<_T1>&, const allocator<_T2>&) -: 175: _GLIBCXX_NOTHROW -: 176: { return false; } -: 177: -: 178: // Invalid allocator partial specializations. -: 179: // allocator_traits::rebind_alloc can be used to form a valid allocator type. -: 180: template -: 181: class allocator -: 182: { -: 183: public: -: 184: typedef _Tp value_type; -: 185: template allocator(const allocator<_Up>&) { } -: 186: }; -: 187: -: 188: template -: 189: class allocator -: 190: { -: 191: public: -: 192: typedef _Tp value_type; -: 193: template allocator(const allocator<_Up>&) { } -: 194: }; -: 195: -: 196: template -: 197: class allocator -: 198: { -: 199: public: -: 200: typedef _Tp value_type; -: 201: template allocator(const allocator<_Up>&) { } -: 202: }; -: 203: -: 204: /// @} group allocator -: 205: -: 206: // Inhibit implicit instantiations for required instantiations, -: 207: // which are defined via explicit instantiations elsewhere. -: 208:#if _GLIBCXX_EXTERN_TEMPLATE -: 209: extern template class allocator; -: 210: extern template class allocator; -: 211:#endif -: 212: -: 213: // Undefine. -: 214:#undef __allocator_base -: 215: -: 216: // To implement Option 3 of DR 431. -: 217: template -: 218: struct __alloc_swap -: 219: { static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } }; -: 220: -: 221: template -: 222: struct __alloc_swap<_Alloc, false> -: 223: { -: 224: static void -: 225: _S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT -: 226: { -: 227: // Precondition: swappable allocators. -: 228: if (__one != __two) -: 229: swap(__one, __two); -: 230: } -: 231: }; -: 232: -: 233: // Optimize for stateless allocators. -: 234: template -: 235: struct __alloc_neq -: 236: { -: 237: static bool -: 238: _S_do_it(const _Alloc&, const _Alloc&) -: 239: { return false; } -: 240: }; -: 241: -: 242: template -: 243: struct __alloc_neq<_Alloc, false> -: 244: { -: 245: static bool -: 246: _S_do_it(const _Alloc& __one, const _Alloc& __two) -: 247: { return __one != __two; } -: 248: }; -: 249: -: 250:#if __cplusplus >= 201103L -: 251: template, -: 253: is_nothrow_move_constructible>::value> -: 254: struct __shrink_to_fit_aux -: 255: { static bool _S_do_it(_Tp&) noexcept { return false; } }; -: 256: -: 257: template -: 258: struct __shrink_to_fit_aux<_Tp, true> -: 259: { -: 260: static bool -: 261: _S_do_it(_Tp& __c) noexcept -: 262: { -: 263:#if __cpp_exceptions -: 264: try -: 265: { -: 266: _Tp(__make_move_if_noexcept_iterator(__c.begin()), -: 267: __make_move_if_noexcept_iterator(__c.end()), -: 268: __c.get_allocator()).swap(__c); -: 269: return true; -: 270: } -: 271: catch(...) -: 272: { return false; } -: 273:#else -: 274: return false; -: 275:#endif -: 276: } -: 277: }; -: 278:#endif -: 279: -: 280:_GLIBCXX_END_NAMESPACE_VERSION -: 281:} // namespace std -: 282: -: 283:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#redc_p256.cpp.gcov -: 0:Source:src/fuzzer/redc_p256.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/redc_p256.gcno -: 0:Data:- -: 0:Runs:0 -: 1:/* -: 2:* (C) 2015,2016 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "fuzzers.h" -: 8:#include -: 9:#include -: 10: function _Z4fuzzPKhm called 0 returned 0% blocks executed 0% #####: 11:void fuzz(const uint8_t in[], size_t len) -: 12: { #####: 13: if(len > 2*256/8) branch 0 never executed branch 1 never executed #####: 14: return; -: 15: #####: 16: static const Botan::BigInt& prime = Botan::prime_p256(); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed #####: 17: static const Botan::BigInt prime_2 = prime * prime; branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed call 10 never executed #####: 18: static Botan::Modular_Reducer prime_redc(prime); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed call 10 never executed -: 19: #####: 20: Botan::BigInt input = Botan::BigInt::decode(in, len); call 0 never executed -: 21: #####: 22: if(input < prime_2) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 23: { #####: 24: const Botan::BigInt ref = prime_redc.reduce(input); call 0 never executed branch 1 never executed branch 2 never executed -: 25: #####: 26: Botan::secure_vector ws; call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 27: Botan::redc_p256(input, ws); call 0 never executed branch 1 never executed branch 2 never executed -: 28: #####: 29: FUZZER_ASSERT_EQUAL(ref, input); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed branch 9 never executed branch 10 never executed call 11 never executed branch 12 never executed branch 13 never executed call 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed call 20 never executed branch 21 never executed branch 22 never executed call 23 never executed branch 24 never executed branch 25 never executed call 26 never executed branch 27 never executed branch 28 never executed call 29 never executed -: 30: } -: 31: } <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#tls_client_hello.cpp.gcov -: 0:Source:src/fuzzer/tls_client_hello.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/tls_client_hello.gcno -: 0:Data:- -: 0:Runs:0 -: 1:/* -: 2:* (C) 2015,2016 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "fuzzers.h" -: 8:#include -: 9: function _Z4fuzzPKhm called 0 returned 0% blocks executed 0% #####: 10:void fuzz(const uint8_t in[], size_t len) -: 11: { #####: 12: try -: 13: { #####: 14: std::vector v(in, in + len); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 15: Botan::TLS::Client_Hello ch(v); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed -: 16: } =====: 17: catch(Botan::Exception& e) {} call 0 never executed #####: 18: } <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#lib#gcc#x86_64-linux-gnu#9#include#avx2intrin.h.gcov -: 0:Source:/usr/lib/gcc/x86_64-linux-gnu/9/include/avx2intrin.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/stream_chacha_avx2.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/stream_chacha_avx2.gcda -: 0:Runs:2947 -: 1:/* Copyright (C) 2011-2019 Free Software Foundation, Inc. -: 2: -: 3: This file is part of GCC. -: 4: -: 5: GCC is free software; you can redistribute it and/or modify -: 6: it under the terms of the GNU General Public License as published by -: 7: the Free Software Foundation; either version 3, or (at your option) -: 8: any later version. -: 9: -: 10: GCC is distributed in the hope that it will be useful, -: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of -: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 13: GNU General Public License for more details. -: 14: -: 15: Under Section 7 of GPL version 3, you are granted additional -: 16: permissions described in the GCC Runtime Library Exception, version -: 17: 3.1, as published by the Free Software Foundation. -: 18: -: 19: You should have received a copy of the GNU General Public License and -: 20: a copy of the GCC Runtime Library Exception along with this program; -: 21: see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 22: . */ -: 23: -: 24:#ifndef _IMMINTRIN_H_INCLUDED -: 25:# error "Never use directly; include instead." -: 26:#endif -: 27: -: 28:#ifndef _AVX2INTRIN_H_INCLUDED -: 29:#define _AVX2INTRIN_H_INCLUDED -: 30: -: 31:#ifndef __AVX2__ -: 32:#pragma GCC push_options -: 33:#pragma GCC target("avx2") -: 34:#define __DISABLE_AVX2__ -: 35:#endif /* __AVX2__ */ -: 36: -: 37:/* Sum absolute 8-bit integer difference of adjacent groups of 4 -: 38: byte integers in the first 2 operands. Starting offsets within -: 39: operands are determined by the 3rd mask operand. */ -: 40:#ifdef __OPTIMIZE__ -: 41:extern __inline __m256i -: 42:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 43:_mm256_mpsadbw_epu8 (__m256i __X, __m256i __Y, const int __M) -: 44:{ -: 45: return (__m256i) __builtin_ia32_mpsadbw256 ((__v32qi)__X, -: 46: (__v32qi)__Y, __M); -: 47:} -: 48:#else -: 49:#define _mm256_mpsadbw_epu8(X, Y, M) \ -: 50: ((__m256i) __builtin_ia32_mpsadbw256 ((__v32qi)(__m256i)(X), \ -: 51: (__v32qi)(__m256i)(Y), (int)(M))) -: 52:#endif -: 53: -: 54:extern __inline __m256i -: 55:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 56:_mm256_abs_epi8 (__m256i __A) -: 57:{ -: 58: return (__m256i)__builtin_ia32_pabsb256 ((__v32qi)__A); -: 59:} -: 60: -: 61:extern __inline __m256i -: 62:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 63:_mm256_abs_epi16 (__m256i __A) -: 64:{ -: 65: return (__m256i)__builtin_ia32_pabsw256 ((__v16hi)__A); -: 66:} -: 67: -: 68:extern __inline __m256i -: 69:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 70:_mm256_abs_epi32 (__m256i __A) -: 71:{ -: 72: return (__m256i)__builtin_ia32_pabsd256 ((__v8si)__A); -: 73:} -: 74: -: 75:extern __inline __m256i -: 76:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 77:_mm256_packs_epi32 (__m256i __A, __m256i __B) -: 78:{ -: 79: return (__m256i)__builtin_ia32_packssdw256 ((__v8si)__A, (__v8si)__B); -: 80:} -: 81: -: 82:extern __inline __m256i -: 83:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 84:_mm256_packs_epi16 (__m256i __A, __m256i __B) -: 85:{ -: 86: return (__m256i)__builtin_ia32_packsswb256 ((__v16hi)__A, (__v16hi)__B); -: 87:} -: 88: -: 89:extern __inline __m256i -: 90:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 91:_mm256_packus_epi32 (__m256i __A, __m256i __B) -: 92:{ -: 93: return (__m256i)__builtin_ia32_packusdw256 ((__v8si)__A, (__v8si)__B); -: 94:} -: 95: -: 96:extern __inline __m256i -: 97:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 98:_mm256_packus_epi16 (__m256i __A, __m256i __B) -: 99:{ -: 100: return (__m256i)__builtin_ia32_packuswb256 ((__v16hi)__A, (__v16hi)__B); -: 101:} -: 102: -: 103:extern __inline __m256i -: 104:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 105:_mm256_add_epi8 (__m256i __A, __m256i __B) -: 106:{ -: 107: return (__m256i) ((__v32qu)__A + (__v32qu)__B); -: 108:} -: 109: -: 110:extern __inline __m256i -: 111:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 112:_mm256_add_epi16 (__m256i __A, __m256i __B) -: 113:{ -: 114: return (__m256i) ((__v16hu)__A + (__v16hu)__B); -: 115:} -: 116: -: 117:extern __inline __m256i -: 118:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 7357468: 119:_mm256_add_epi32 (__m256i __A, __m256i __B) -: 120:{ 7357468: 121: return (__m256i) ((__v8su)__A + (__v8su)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% call 8 returned 100% -: 122:} -: 123: -: 124:extern __inline __m256i -: 125:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 126:_mm256_add_epi64 (__m256i __A, __m256i __B) -: 127:{ -: 128: return (__m256i) ((__v4du)__A + (__v4du)__B); -: 129:} -: 130: -: 131:extern __inline __m256i -: 132:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 133:_mm256_adds_epi8 (__m256i __A, __m256i __B) -: 134:{ -: 135: return (__m256i)__builtin_ia32_paddsb256 ((__v32qi)__A, (__v32qi)__B); -: 136:} -: 137: -: 138:extern __inline __m256i -: 139:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 140:_mm256_adds_epi16 (__m256i __A, __m256i __B) -: 141:{ -: 142: return (__m256i)__builtin_ia32_paddsw256 ((__v16hi)__A, (__v16hi)__B); -: 143:} -: 144: -: 145:extern __inline __m256i -: 146:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 147:_mm256_adds_epu8 (__m256i __A, __m256i __B) -: 148:{ -: 149: return (__m256i)__builtin_ia32_paddusb256 ((__v32qi)__A, (__v32qi)__B); -: 150:} -: 151: -: 152:extern __inline __m256i -: 153:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 154:_mm256_adds_epu16 (__m256i __A, __m256i __B) -: 155:{ -: 156: return (__m256i)__builtin_ia32_paddusw256 ((__v16hi)__A, (__v16hi)__B); -: 157:} -: 158: -: 159:#ifdef __OPTIMIZE__ -: 160:extern __inline __m256i -: 161:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 162:_mm256_alignr_epi8 (__m256i __A, __m256i __B, const int __N) -: 163:{ -: 164: return (__m256i) __builtin_ia32_palignr256 ((__v4di)__A, -: 165: (__v4di)__B, -: 166: __N * 8); -: 167:} -: 168:#else -: 169:/* In that case (__N*8) will be in vreg, and insn will not be matched. */ -: 170:/* Use define instead */ -: 171:#define _mm256_alignr_epi8(A, B, N) \ -: 172: ((__m256i) __builtin_ia32_palignr256 ((__v4di)(__m256i)(A), \ -: 173: (__v4di)(__m256i)(B), \ -: 174: (int)(N) * 8)) -: 175:#endif -: 176: -: 177:extern __inline __m256i -: 178:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 179:_mm256_and_si256 (__m256i __A, __m256i __B) -: 180:{ -: 181: return (__m256i) ((__v4du)__A & (__v4du)__B); -: 182:} -: 183: -: 184:extern __inline __m256i -: 185:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 186:_mm256_andnot_si256 (__m256i __A, __m256i __B) -: 187:{ -: 188: return (__m256i) __builtin_ia32_andnotsi256 ((__v4di)__A, (__v4di)__B); -: 189:} -: 190: -: 191:extern __inline __m256i -: 192:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 193:_mm256_avg_epu8 (__m256i __A, __m256i __B) -: 194:{ -: 195: return (__m256i)__builtin_ia32_pavgb256 ((__v32qi)__A, (__v32qi)__B); -: 196:} -: 197: -: 198:extern __inline __m256i -: 199:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 200:_mm256_avg_epu16 (__m256i __A, __m256i __B) -: 201:{ -: 202: return (__m256i)__builtin_ia32_pavgw256 ((__v16hi)__A, (__v16hi)__B); -: 203:} -: 204: -: 205:extern __inline __m256i -: 206:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 207:_mm256_blendv_epi8 (__m256i __X, __m256i __Y, __m256i __M) -: 208:{ -: 209: return (__m256i) __builtin_ia32_pblendvb256 ((__v32qi)__X, -: 210: (__v32qi)__Y, -: 211: (__v32qi)__M); -: 212:} -: 213: -: 214:#ifdef __OPTIMIZE__ -: 215:extern __inline __m256i -: 216:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 217:_mm256_blend_epi16 (__m256i __X, __m256i __Y, const int __M) -: 218:{ -: 219: return (__m256i) __builtin_ia32_pblendw256 ((__v16hi)__X, -: 220: (__v16hi)__Y, -: 221: __M); -: 222:} -: 223:#else -: 224:#define _mm256_blend_epi16(X, Y, M) \ -: 225: ((__m256i) __builtin_ia32_pblendw256 ((__v16hi)(__m256i)(X), \ -: 226: (__v16hi)(__m256i)(Y), (int)(M))) -: 227:#endif -: 228: -: 229:extern __inline __m256i -: 230:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 231:_mm256_cmpeq_epi8 (__m256i __A, __m256i __B) -: 232:{ -: 233: return (__m256i) ((__v32qi)__A == (__v32qi)__B); -: 234:} -: 235: -: 236:extern __inline __m256i -: 237:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 238:_mm256_cmpeq_epi16 (__m256i __A, __m256i __B) -: 239:{ -: 240: return (__m256i) ((__v16hi)__A == (__v16hi)__B); -: 241:} -: 242: -: 243:extern __inline __m256i -: 244:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 245:_mm256_cmpeq_epi32 (__m256i __A, __m256i __B) -: 246:{ -: 247: return (__m256i) ((__v8si)__A == (__v8si)__B); -: 248:} -: 249: -: 250:extern __inline __m256i -: 251:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 252:_mm256_cmpeq_epi64 (__m256i __A, __m256i __B) -: 253:{ -: 254: return (__m256i) ((__v4di)__A == (__v4di)__B); -: 255:} -: 256: -: 257:extern __inline __m256i -: 258:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 259:_mm256_cmpgt_epi8 (__m256i __A, __m256i __B) -: 260:{ -: 261: return (__m256i) ((__v32qs)__A > (__v32qs)__B); -: 262:} -: 263: -: 264:extern __inline __m256i -: 265:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 266:_mm256_cmpgt_epi16 (__m256i __A, __m256i __B) -: 267:{ -: 268: return (__m256i) ((__v16hi)__A > (__v16hi)__B); -: 269:} -: 270: -: 271:extern __inline __m256i -: 272:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 273:_mm256_cmpgt_epi32 (__m256i __A, __m256i __B) -: 274:{ -: 275: return (__m256i) ((__v8si)__A > (__v8si)__B); -: 276:} -: 277: -: 278:extern __inline __m256i -: 279:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 280:_mm256_cmpgt_epi64 (__m256i __A, __m256i __B) -: 281:{ -: 282: return (__m256i) ((__v4di)__A > (__v4di)__B); -: 283:} -: 284: -: 285:extern __inline __m256i -: 286:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 287:_mm256_hadd_epi16 (__m256i __X, __m256i __Y) -: 288:{ -: 289: return (__m256i) __builtin_ia32_phaddw256 ((__v16hi)__X, -: 290: (__v16hi)__Y); -: 291:} -: 292: -: 293:extern __inline __m256i -: 294:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 295:_mm256_hadd_epi32 (__m256i __X, __m256i __Y) -: 296:{ -: 297: return (__m256i) __builtin_ia32_phaddd256 ((__v8si)__X, (__v8si)__Y); -: 298:} -: 299: -: 300:extern __inline __m256i -: 301:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 302:_mm256_hadds_epi16 (__m256i __X, __m256i __Y) -: 303:{ -: 304: return (__m256i) __builtin_ia32_phaddsw256 ((__v16hi)__X, -: 305: (__v16hi)__Y); -: 306:} -: 307: -: 308:extern __inline __m256i -: 309:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 310:_mm256_hsub_epi16 (__m256i __X, __m256i __Y) -: 311:{ -: 312: return (__m256i) __builtin_ia32_phsubw256 ((__v16hi)__X, -: 313: (__v16hi)__Y); -: 314:} -: 315: -: 316:extern __inline __m256i -: 317:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 318:_mm256_hsub_epi32 (__m256i __X, __m256i __Y) -: 319:{ -: 320: return (__m256i) __builtin_ia32_phsubd256 ((__v8si)__X, (__v8si)__Y); -: 321:} -: 322: -: 323:extern __inline __m256i -: 324:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 325:_mm256_hsubs_epi16 (__m256i __X, __m256i __Y) -: 326:{ -: 327: return (__m256i) __builtin_ia32_phsubsw256 ((__v16hi)__X, -: 328: (__v16hi)__Y); -: 329:} -: 330: -: 331:extern __inline __m256i -: 332:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 333:_mm256_maddubs_epi16 (__m256i __X, __m256i __Y) -: 334:{ -: 335: return (__m256i) __builtin_ia32_pmaddubsw256 ((__v32qi)__X, -: 336: (__v32qi)__Y); -: 337:} -: 338: -: 339:extern __inline __m256i -: 340:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 341:_mm256_madd_epi16 (__m256i __A, __m256i __B) -: 342:{ -: 343: return (__m256i)__builtin_ia32_pmaddwd256 ((__v16hi)__A, -: 344: (__v16hi)__B); -: 345:} -: 346: -: 347:extern __inline __m256i -: 348:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 349:_mm256_max_epi8 (__m256i __A, __m256i __B) -: 350:{ -: 351: return (__m256i)__builtin_ia32_pmaxsb256 ((__v32qi)__A, (__v32qi)__B); -: 352:} -: 353: -: 354:extern __inline __m256i -: 355:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 356:_mm256_max_epi16 (__m256i __A, __m256i __B) -: 357:{ -: 358: return (__m256i)__builtin_ia32_pmaxsw256 ((__v16hi)__A, (__v16hi)__B); -: 359:} -: 360: -: 361:extern __inline __m256i -: 362:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 363:_mm256_max_epi32 (__m256i __A, __m256i __B) -: 364:{ -: 365: return (__m256i)__builtin_ia32_pmaxsd256 ((__v8si)__A, (__v8si)__B); -: 366:} -: 367: -: 368:extern __inline __m256i -: 369:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 370:_mm256_max_epu8 (__m256i __A, __m256i __B) -: 371:{ -: 372: return (__m256i)__builtin_ia32_pmaxub256 ((__v32qi)__A, (__v32qi)__B); -: 373:} -: 374: -: 375:extern __inline __m256i -: 376:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 377:_mm256_max_epu16 (__m256i __A, __m256i __B) -: 378:{ -: 379: return (__m256i)__builtin_ia32_pmaxuw256 ((__v16hi)__A, (__v16hi)__B); -: 380:} -: 381: -: 382:extern __inline __m256i -: 383:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 384:_mm256_max_epu32 (__m256i __A, __m256i __B) -: 385:{ -: 386: return (__m256i)__builtin_ia32_pmaxud256 ((__v8si)__A, (__v8si)__B); -: 387:} -: 388: -: 389:extern __inline __m256i -: 390:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 391:_mm256_min_epi8 (__m256i __A, __m256i __B) -: 392:{ -: 393: return (__m256i)__builtin_ia32_pminsb256 ((__v32qi)__A, (__v32qi)__B); -: 394:} -: 395: -: 396:extern __inline __m256i -: 397:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 398:_mm256_min_epi16 (__m256i __A, __m256i __B) -: 399:{ -: 400: return (__m256i)__builtin_ia32_pminsw256 ((__v16hi)__A, (__v16hi)__B); -: 401:} -: 402: -: 403:extern __inline __m256i -: 404:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 405:_mm256_min_epi32 (__m256i __A, __m256i __B) -: 406:{ -: 407: return (__m256i)__builtin_ia32_pminsd256 ((__v8si)__A, (__v8si)__B); -: 408:} -: 409: -: 410:extern __inline __m256i -: 411:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 412:_mm256_min_epu8 (__m256i __A, __m256i __B) -: 413:{ -: 414: return (__m256i)__builtin_ia32_pminub256 ((__v32qi)__A, (__v32qi)__B); -: 415:} -: 416: -: 417:extern __inline __m256i -: 418:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 419:_mm256_min_epu16 (__m256i __A, __m256i __B) -: 420:{ -: 421: return (__m256i)__builtin_ia32_pminuw256 ((__v16hi)__A, (__v16hi)__B); -: 422:} -: 423: -: 424:extern __inline __m256i -: 425:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 426:_mm256_min_epu32 (__m256i __A, __m256i __B) -: 427:{ -: 428: return (__m256i)__builtin_ia32_pminud256 ((__v8si)__A, (__v8si)__B); -: 429:} -: 430: -: 431:extern __inline int -: 432:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 433:_mm256_movemask_epi8 (__m256i __A) -: 434:{ -: 435: return __builtin_ia32_pmovmskb256 ((__v32qi)__A); -: 436:} -: 437: -: 438:extern __inline __m256i -: 439:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 440:_mm256_cvtepi8_epi16 (__m128i __X) -: 441:{ -: 442: return (__m256i) __builtin_ia32_pmovsxbw256 ((__v16qi)__X); -: 443:} -: 444: -: 445:extern __inline __m256i -: 446:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 447:_mm256_cvtepi8_epi32 (__m128i __X) -: 448:{ -: 449: return (__m256i) __builtin_ia32_pmovsxbd256 ((__v16qi)__X); -: 450:} -: 451: -: 452:extern __inline __m256i -: 453:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 454:_mm256_cvtepi8_epi64 (__m128i __X) -: 455:{ -: 456: return (__m256i) __builtin_ia32_pmovsxbq256 ((__v16qi)__X); -: 457:} -: 458: -: 459:extern __inline __m256i -: 460:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 461:_mm256_cvtepi16_epi32 (__m128i __X) -: 462:{ -: 463: return (__m256i) __builtin_ia32_pmovsxwd256 ((__v8hi)__X); -: 464:} -: 465: -: 466:extern __inline __m256i -: 467:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 468:_mm256_cvtepi16_epi64 (__m128i __X) -: 469:{ -: 470: return (__m256i) __builtin_ia32_pmovsxwq256 ((__v8hi)__X); -: 471:} -: 472: -: 473:extern __inline __m256i -: 474:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 475:_mm256_cvtepi32_epi64 (__m128i __X) -: 476:{ -: 477: return (__m256i) __builtin_ia32_pmovsxdq256 ((__v4si)__X); -: 478:} -: 479: -: 480:extern __inline __m256i -: 481:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 482:_mm256_cvtepu8_epi16 (__m128i __X) -: 483:{ -: 484: return (__m256i) __builtin_ia32_pmovzxbw256 ((__v16qi)__X); -: 485:} -: 486: -: 487:extern __inline __m256i -: 488:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 489:_mm256_cvtepu8_epi32 (__m128i __X) -: 490:{ -: 491: return (__m256i) __builtin_ia32_pmovzxbd256 ((__v16qi)__X); -: 492:} -: 493: -: 494:extern __inline __m256i -: 495:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 496:_mm256_cvtepu8_epi64 (__m128i __X) -: 497:{ -: 498: return (__m256i) __builtin_ia32_pmovzxbq256 ((__v16qi)__X); -: 499:} -: 500: -: 501:extern __inline __m256i -: 502:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 503:_mm256_cvtepu16_epi32 (__m128i __X) -: 504:{ -: 505: return (__m256i) __builtin_ia32_pmovzxwd256 ((__v8hi)__X); -: 506:} -: 507: -: 508:extern __inline __m256i -: 509:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 510:_mm256_cvtepu16_epi64 (__m128i __X) -: 511:{ -: 512: return (__m256i) __builtin_ia32_pmovzxwq256 ((__v8hi)__X); -: 513:} -: 514: -: 515:extern __inline __m256i -: 516:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 517:_mm256_cvtepu32_epi64 (__m128i __X) -: 518:{ -: 519: return (__m256i) __builtin_ia32_pmovzxdq256 ((__v4si)__X); -: 520:} -: 521: -: 522:extern __inline __m256i -: 523:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 524:_mm256_mul_epi32 (__m256i __X, __m256i __Y) -: 525:{ -: 526: return (__m256i) __builtin_ia32_pmuldq256 ((__v8si)__X, (__v8si)__Y); -: 527:} -: 528: -: 529:extern __inline __m256i -: 530:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 531:_mm256_mulhrs_epi16 (__m256i __X, __m256i __Y) -: 532:{ -: 533: return (__m256i) __builtin_ia32_pmulhrsw256 ((__v16hi)__X, -: 534: (__v16hi)__Y); -: 535:} -: 536: -: 537:extern __inline __m256i -: 538:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 539:_mm256_mulhi_epu16 (__m256i __A, __m256i __B) -: 540:{ -: 541: return (__m256i)__builtin_ia32_pmulhuw256 ((__v16hi)__A, (__v16hi)__B); -: 542:} -: 543: -: 544:extern __inline __m256i -: 545:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 546:_mm256_mulhi_epi16 (__m256i __A, __m256i __B) -: 547:{ -: 548: return (__m256i)__builtin_ia32_pmulhw256 ((__v16hi)__A, (__v16hi)__B); -: 549:} -: 550: -: 551:extern __inline __m256i -: 552:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 553:_mm256_mullo_epi16 (__m256i __A, __m256i __B) -: 554:{ -: 555: return (__m256i) ((__v16hu)__A * (__v16hu)__B); -: 556:} -: 557: -: 558:extern __inline __m256i -: 559:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 560:_mm256_mullo_epi32 (__m256i __A, __m256i __B) -: 561:{ -: 562: return (__m256i) ((__v8su)__A * (__v8su)__B); -: 563:} -: 564: -: 565:extern __inline __m256i -: 566:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 567:_mm256_mul_epu32 (__m256i __A, __m256i __B) -: 568:{ -: 569: return (__m256i)__builtin_ia32_pmuludq256 ((__v8si)__A, (__v8si)__B); -: 570:} -: 571: -: 572:extern __inline __m256i -: 573:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 14355840: 574:_mm256_or_si256 (__m256i __A, __m256i __B) -: 575:{ 14355840: 576: return (__m256i) ((__v4du)__A | (__v4du)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% call 8 returned 100% call 9 returned 100% call 10 returned 100% call 11 returned 100% call 12 returned 100% call 13 returned 100% call 14 returned 100% -: 577:} -: 578: -: 579:extern __inline __m256i -: 580:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 581:_mm256_sad_epu8 (__m256i __A, __m256i __B) -: 582:{ -: 583: return (__m256i)__builtin_ia32_psadbw256 ((__v32qi)__A, (__v32qi)__B); -: 584:} -: 585: -: 586:extern __inline __m256i -: 587:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 14355840: 588:_mm256_shuffle_epi8 (__m256i __X, __m256i __Y) -: 589:{ 3588960: 590: return (__m256i) __builtin_ia32_pshufb256 ((__v32qi)__X, call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% call 8 returned 100% call 9 returned 100% call 10 returned 100% call 11 returned 100% call 12 returned 100% call 13 returned 100% call 14 returned 100% call 15 returned 100% 3588960: 591: (__v32qi)__Y); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% call 8 returned 100% call 9 returned 100% call 10 returned 100% call 11 returned 100% call 12 returned 100% call 13 returned 100% call 14 returned 100% call 15 returned 100% -: 592:} -: 593: -: 594:#ifdef __OPTIMIZE__ -: 595:extern __inline __m256i -: 596:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 597:_mm256_shuffle_epi32 (__m256i __A, const int __mask) -: 598:{ -: 599: return (__m256i)__builtin_ia32_pshufd256 ((__v8si)__A, __mask); -: 600:} -: 601: -: 602:extern __inline __m256i -: 603:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 604:_mm256_shufflehi_epi16 (__m256i __A, const int __mask) -: 605:{ -: 606: return (__m256i)__builtin_ia32_pshufhw256 ((__v16hi)__A, __mask); -: 607:} -: 608: -: 609:extern __inline __m256i -: 610:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 611:_mm256_shufflelo_epi16 (__m256i __A, const int __mask) -: 612:{ -: 613: return (__m256i)__builtin_ia32_pshuflw256 ((__v16hi)__A, __mask); -: 614:} -: 615:#else -: 616:#define _mm256_shuffle_epi32(A, N) \ -: 617: ((__m256i)__builtin_ia32_pshufd256 ((__v8si)(__m256i)(A), (int)(N))) -: 618:#define _mm256_shufflehi_epi16(A, N) \ -: 619: ((__m256i)__builtin_ia32_pshufhw256 ((__v16hi)(__m256i)(A), (int)(N))) -: 620:#define _mm256_shufflelo_epi16(A, N) \ -: 621: ((__m256i)__builtin_ia32_pshuflw256 ((__v16hi)(__m256i)(A), (int)(N))) -: 622:#endif -: 623: -: 624:extern __inline __m256i -: 625:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 626:_mm256_sign_epi8 (__m256i __X, __m256i __Y) -: 627:{ -: 628: return (__m256i) __builtin_ia32_psignb256 ((__v32qi)__X, (__v32qi)__Y); -: 629:} -: 630: -: 631:extern __inline __m256i -: 632:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 633:_mm256_sign_epi16 (__m256i __X, __m256i __Y) -: 634:{ -: 635: return (__m256i) __builtin_ia32_psignw256 ((__v16hi)__X, (__v16hi)__Y); -: 636:} -: 637: -: 638:extern __inline __m256i -: 639:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 640:_mm256_sign_epi32 (__m256i __X, __m256i __Y) -: 641:{ -: 642: return (__m256i) __builtin_ia32_psignd256 ((__v8si)__X, (__v8si)__Y); -: 643:} -: 644: -: 645:#ifdef __OPTIMIZE__ -: 646:extern __inline __m256i -: 647:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 648:_mm256_bslli_epi128 (__m256i __A, const int __N) -: 649:{ -: 650: return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8); -: 651:} -: 652: -: 653:extern __inline __m256i -: 654:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 655:_mm256_slli_si256 (__m256i __A, const int __N) -: 656:{ -: 657: return (__m256i)__builtin_ia32_pslldqi256 (__A, __N * 8); -: 658:} -: 659:#else -: 660:#define _mm256_bslli_epi128(A, N) \ -: 661: ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8)) -: 662:#define _mm256_slli_si256(A, N) \ -: 663: ((__m256i)__builtin_ia32_pslldqi256 ((__m256i)(A), (int)(N) * 8)) -: 664:#endif -: 665: -: 666:extern __inline __m256i -: 667:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 668:_mm256_slli_epi16 (__m256i __A, int __B) -: 669:{ -: 670: return (__m256i)__builtin_ia32_psllwi256 ((__v16hi)__A, __B); -: 671:} -: 672: -: 673:extern __inline __m256i -: 674:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 675:_mm256_sll_epi16 (__m256i __A, __m128i __B) -: 676:{ -: 677: return (__m256i)__builtin_ia32_psllw256((__v16hi)__A, (__v8hi)__B); -: 678:} -: 679: -: 680:extern __inline __m256i -: 681:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 14355840: 682:_mm256_slli_epi32 (__m256i __A, int __B) -: 683:{ 3588960: 684: return (__m256i)__builtin_ia32_pslldi256 ((__v8si)__A, __B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% call 8 returned 100% call 9 returned 100% call 10 returned 100% call 11 returned 100% call 12 returned 100% call 13 returned 100% call 14 returned 100% call 15 returned 100% call 16 returned 100% call 17 returned 100% call 18 returned 100% call 19 returned 100% call 20 returned 100% call 21 returned 100% call 22 returned 100% call 23 returned 100% call 24 returned 100% call 25 returned 100% call 26 returned 100% call 27 returned 100% call 28 returned 100% call 29 returned 100% call 30 returned 100% -: 685:} -: 686: -: 687:extern __inline __m256i -: 688:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 689:_mm256_sll_epi32 (__m256i __A, __m128i __B) -: 690:{ -: 691: return (__m256i)__builtin_ia32_pslld256((__v8si)__A, (__v4si)__B); -: 692:} -: 693: -: 694:extern __inline __m256i -: 695:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 696:_mm256_slli_epi64 (__m256i __A, int __B) -: 697:{ -: 698: return (__m256i)__builtin_ia32_psllqi256 ((__v4di)__A, __B); -: 699:} -: 700: -: 701:extern __inline __m256i -: 702:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 703:_mm256_sll_epi64 (__m256i __A, __m128i __B) -: 704:{ -: 705: return (__m256i)__builtin_ia32_psllq256((__v4di)__A, (__v2di)__B); -: 706:} -: 707: -: 708:extern __inline __m256i -: 709:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 710:_mm256_srai_epi16 (__m256i __A, int __B) -: 711:{ -: 712: return (__m256i)__builtin_ia32_psrawi256 ((__v16hi)__A, __B); -: 713:} -: 714: -: 715:extern __inline __m256i -: 716:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 717:_mm256_sra_epi16 (__m256i __A, __m128i __B) -: 718:{ -: 719: return (__m256i)__builtin_ia32_psraw256 ((__v16hi)__A, (__v8hi)__B); -: 720:} -: 721: -: 722:extern __inline __m256i -: 723:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 724:_mm256_srai_epi32 (__m256i __A, int __B) -: 725:{ -: 726: return (__m256i)__builtin_ia32_psradi256 ((__v8si)__A, __B); -: 727:} -: 728: -: 729:extern __inline __m256i -: 730:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 731:_mm256_sra_epi32 (__m256i __A, __m128i __B) -: 732:{ -: 733: return (__m256i)__builtin_ia32_psrad256 ((__v8si)__A, (__v4si)__B); -: 734:} -: 735: -: 736:#ifdef __OPTIMIZE__ -: 737:extern __inline __m256i -: 738:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 739:_mm256_bsrli_epi128 (__m256i __A, const int __N) -: 740:{ -: 741: return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8); -: 742:} -: 743: -: 744:extern __inline __m256i -: 745:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 746:_mm256_srli_si256 (__m256i __A, const int __N) -: 747:{ -: 748: return (__m256i)__builtin_ia32_psrldqi256 (__A, __N * 8); -: 749:} -: 750:#else -: 751:#define _mm256_bsrli_epi128(A, N) \ -: 752: ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8)) -: 753:#define _mm256_srli_si256(A, N) \ -: 754: ((__m256i)__builtin_ia32_psrldqi256 ((__m256i)(A), (int)(N) * 8)) -: 755:#endif -: 756: -: 757:extern __inline __m256i -: 758:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 759:_mm256_srli_epi16 (__m256i __A, int __B) -: 760:{ -: 761: return (__m256i)__builtin_ia32_psrlwi256 ((__v16hi)__A, __B); -: 762:} -: 763: -: 764:extern __inline __m256i -: 765:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 766:_mm256_srl_epi16 (__m256i __A, __m128i __B) -: 767:{ -: 768: return (__m256i)__builtin_ia32_psrlw256((__v16hi)__A, (__v8hi)__B); -: 769:} -: 770: -: 771:extern __inline __m256i -: 772:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 14355840: 773:_mm256_srli_epi32 (__m256i __A, int __B) -: 774:{ 3588960: 775: return (__m256i)__builtin_ia32_psrldi256 ((__v8si)__A, __B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% call 8 returned 100% call 9 returned 100% call 10 returned 100% call 11 returned 100% call 12 returned 100% call 13 returned 100% call 14 returned 100% call 15 returned 100% call 16 returned 100% call 17 returned 100% call 18 returned 100% call 19 returned 100% call 20 returned 100% call 21 returned 100% call 22 returned 100% call 23 returned 100% call 24 returned 100% call 25 returned 100% call 26 returned 100% call 27 returned 100% call 28 returned 100% call 29 returned 100% call 30 returned 100% call 31 returned 100% -: 776:} -: 777: -: 778:extern __inline __m256i -: 779:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 780:_mm256_srl_epi32 (__m256i __A, __m128i __B) -: 781:{ -: 782: return (__m256i)__builtin_ia32_psrld256((__v8si)__A, (__v4si)__B); -: 783:} -: 784: -: 785:extern __inline __m256i -: 786:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 787:_mm256_srli_epi64 (__m256i __A, int __B) -: 788:{ -: 789: return (__m256i)__builtin_ia32_psrlqi256 ((__v4di)__A, __B); -: 790:} -: 791: -: 792:extern __inline __m256i -: 793:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 794:_mm256_srl_epi64 (__m256i __A, __m128i __B) -: 795:{ -: 796: return (__m256i)__builtin_ia32_psrlq256((__v4di)__A, (__v2di)__B); -: 797:} -: 798: -: 799:extern __inline __m256i -: 800:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 801:_mm256_sub_epi8 (__m256i __A, __m256i __B) -: 802:{ -: 803: return (__m256i) ((__v32qu)__A - (__v32qu)__B); -: 804:} -: 805: -: 806:extern __inline __m256i -: 807:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 808:_mm256_sub_epi16 (__m256i __A, __m256i __B) -: 809:{ -: 810: return (__m256i) ((__v16hu)__A - (__v16hu)__B); -: 811:} -: 812: -: 813:extern __inline __m256i -: 814:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 815:_mm256_sub_epi32 (__m256i __A, __m256i __B) -: 816:{ -: 817: return (__m256i) ((__v8su)__A - (__v8su)__B); -: 818:} -: 819: -: 820:extern __inline __m256i -: 821:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 822:_mm256_sub_epi64 (__m256i __A, __m256i __B) -: 823:{ -: 824: return (__m256i) ((__v4du)__A - (__v4du)__B); -: 825:} -: 826: -: 827:extern __inline __m256i -: 828:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 829:_mm256_subs_epi8 (__m256i __A, __m256i __B) -: 830:{ -: 831: return (__m256i)__builtin_ia32_psubsb256 ((__v32qi)__A, (__v32qi)__B); -: 832:} -: 833: -: 834:extern __inline __m256i -: 835:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 836:_mm256_subs_epi16 (__m256i __A, __m256i __B) -: 837:{ -: 838: return (__m256i)__builtin_ia32_psubsw256 ((__v16hi)__A, (__v16hi)__B); -: 839:} -: 840: -: 841:extern __inline __m256i -: 842:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 843:_mm256_subs_epu8 (__m256i __A, __m256i __B) -: 844:{ -: 845: return (__m256i)__builtin_ia32_psubusb256 ((__v32qi)__A, (__v32qi)__B); -: 846:} -: 847: -: 848:extern __inline __m256i -: 849:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 850:_mm256_subs_epu16 (__m256i __A, __m256i __B) -: 851:{ -: 852: return (__m256i)__builtin_ia32_psubusw256 ((__v16hi)__A, (__v16hi)__B); -: 853:} -: 854: -: 855:extern __inline __m256i -: 856:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 857:_mm256_unpackhi_epi8 (__m256i __A, __m256i __B) -: 858:{ -: 859: return (__m256i)__builtin_ia32_punpckhbw256 ((__v32qi)__A, (__v32qi)__B); -: 860:} -: 861: -: 862:extern __inline __m256i -: 863:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 864:_mm256_unpackhi_epi16 (__m256i __A, __m256i __B) -: 865:{ -: 866: return (__m256i)__builtin_ia32_punpckhwd256 ((__v16hi)__A, (__v16hi)__B); -: 867:} -: 868: -: 869:extern __inline __m256i -: 870:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 359096: 871:_mm256_unpackhi_epi32 (__m256i __A, __m256i __B) call 0 returned 100% call 1 returned 100% -: 872:{ 359096: 873: return (__m256i)__builtin_ia32_punpckhdq256 ((__v8si)__A, (__v8si)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% -: 874:} -: 875: -: 876:extern __inline __m256i -: 877:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 718192: 878:_mm256_unpackhi_epi64 (__m256i __A, __m256i __B) -: 879:{ 718192: 880: return (__m256i)__builtin_ia32_punpckhqdq256 ((__v4di)__A, (__v4di)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 881:} -: 882: -: 883:extern __inline __m256i -: 884:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 885:_mm256_unpacklo_epi8 (__m256i __A, __m256i __B) -: 886:{ -: 887: return (__m256i)__builtin_ia32_punpcklbw256 ((__v32qi)__A, (__v32qi)__B); -: 888:} -: 889: -: 890:extern __inline __m256i -: 891:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 892:_mm256_unpacklo_epi16 (__m256i __A, __m256i __B) -: 893:{ -: 894: return (__m256i)__builtin_ia32_punpcklwd256 ((__v16hi)__A, (__v16hi)__B); -: 895:} -: 896: -: 897:extern __inline __m256i -: 898:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 359096: 899:_mm256_unpacklo_epi32 (__m256i __A, __m256i __B) call 0 returned 100% call 1 returned 100% -: 900:{ 359096: 901: return (__m256i)__builtin_ia32_punpckldq256 ((__v8si)__A, (__v8si)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% -: 902:} -: 903: -: 904:extern __inline __m256i -: 905:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 718192: 906:_mm256_unpacklo_epi64 (__m256i __A, __m256i __B) -: 907:{ 718192: 908: return (__m256i)__builtin_ia32_punpcklqdq256 ((__v4di)__A, (__v4di)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 909:} -: 910: -: 911:extern __inline __m256i -: 912:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 7177920: 913:_mm256_xor_si256 (__m256i __A, __m256i __B) -: 914:{ 7177920: 915: return (__m256i) ((__v4du)__A ^ (__v4du)__B); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% -: 916:} -: 917: -: 918:extern __inline __m256i -: 919:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 920:_mm256_stream_load_si256 (__m256i const *__X) -: 921:{ -: 922: return (__m256i) __builtin_ia32_movntdqa256 ((__v4di *) __X); -: 923:} -: 924: -: 925:extern __inline __m128 -: 926:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 927:_mm_broadcastss_ps (__m128 __X) -: 928:{ -: 929: return (__m128) __builtin_ia32_vbroadcastss_ps ((__v4sf)__X); -: 930:} -: 931: -: 932:extern __inline __m256 -: 933:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 934:_mm256_broadcastss_ps (__m128 __X) -: 935:{ -: 936: return (__m256) __builtin_ia32_vbroadcastss_ps256 ((__v4sf)__X); -: 937:} -: 938: -: 939:extern __inline __m256d -: 940:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 941:_mm256_broadcastsd_pd (__m128d __X) -: 942:{ -: 943: return (__m256d) __builtin_ia32_vbroadcastsd_pd256 ((__v2df)__X); -: 944:} -: 945: -: 946:extern __inline __m256i -: 947:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 948:_mm256_broadcastsi128_si256 (__m128i __X) -: 949:{ -: 950: return (__m256i) __builtin_ia32_vbroadcastsi256 ((__v2di)__X); -: 951:} -: 952: -: 953:#ifdef __OPTIMIZE__ -: 954:extern __inline __m128i -: 955:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 956:_mm_blend_epi32 (__m128i __X, __m128i __Y, const int __M) -: 957:{ -: 958: return (__m128i) __builtin_ia32_pblendd128 ((__v4si)__X, -: 959: (__v4si)__Y, -: 960: __M); -: 961:} -: 962:#else -: 963:#define _mm_blend_epi32(X, Y, M) \ -: 964: ((__m128i) __builtin_ia32_pblendd128 ((__v4si)(__m128i)(X), \ -: 965: (__v4si)(__m128i)(Y), (int)(M))) -: 966:#endif -: 967: -: 968:#ifdef __OPTIMIZE__ -: 969:extern __inline __m256i -: 970:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 971:_mm256_blend_epi32 (__m256i __X, __m256i __Y, const int __M) -: 972:{ -: 973: return (__m256i) __builtin_ia32_pblendd256 ((__v8si)__X, -: 974: (__v8si)__Y, -: 975: __M); -: 976:} -: 977:#else -: 978:#define _mm256_blend_epi32(X, Y, M) \ -: 979: ((__m256i) __builtin_ia32_pblendd256 ((__v8si)(__m256i)(X), \ -: 980: (__v8si)(__m256i)(Y), (int)(M))) -: 981:#endif -: 982: -: 983:extern __inline __m256i -: 984:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 985:_mm256_broadcastb_epi8 (__m128i __X) -: 986:{ -: 987: return (__m256i) __builtin_ia32_pbroadcastb256 ((__v16qi)__X); -: 988:} -: 989: -: 990:extern __inline __m256i -: 991:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 992:_mm256_broadcastw_epi16 (__m128i __X) -: 993:{ -: 994: return (__m256i) __builtin_ia32_pbroadcastw256 ((__v8hi)__X); -: 995:} -: 996: -: 997:extern __inline __m256i -: 998:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 999:_mm256_broadcastd_epi32 (__m128i __X) -: 1000:{ -: 1001: return (__m256i) __builtin_ia32_pbroadcastd256 ((__v4si)__X); -: 1002:} -: 1003: -: 1004:extern __inline __m256i -: 1005:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1006:_mm256_broadcastq_epi64 (__m128i __X) -: 1007:{ -: 1008: return (__m256i) __builtin_ia32_pbroadcastq256 ((__v2di)__X); -: 1009:} -: 1010: -: 1011:extern __inline __m128i -: 1012:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1013:_mm_broadcastb_epi8 (__m128i __X) -: 1014:{ -: 1015: return (__m128i) __builtin_ia32_pbroadcastb128 ((__v16qi)__X); -: 1016:} -: 1017: -: 1018:extern __inline __m128i -: 1019:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1020:_mm_broadcastw_epi16 (__m128i __X) -: 1021:{ -: 1022: return (__m128i) __builtin_ia32_pbroadcastw128 ((__v8hi)__X); -: 1023:} -: 1024: -: 1025:extern __inline __m128i -: 1026:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1027:_mm_broadcastd_epi32 (__m128i __X) -: 1028:{ -: 1029: return (__m128i) __builtin_ia32_pbroadcastd128 ((__v4si)__X); -: 1030:} -: 1031: -: 1032:extern __inline __m128i -: 1033:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1034:_mm_broadcastq_epi64 (__m128i __X) -: 1035:{ -: 1036: return (__m128i) __builtin_ia32_pbroadcastq128 ((__v2di)__X); -: 1037:} -: 1038: -: 1039:extern __inline __m256i -: 1040:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1041:_mm256_permutevar8x32_epi32 (__m256i __X, __m256i __Y) -: 1042:{ -: 1043: return (__m256i) __builtin_ia32_permvarsi256 ((__v8si)__X, (__v8si)__Y); -: 1044:} -: 1045: -: 1046:#ifdef __OPTIMIZE__ -: 1047:extern __inline __m256d -: 1048:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1049:_mm256_permute4x64_pd (__m256d __X, const int __M) -: 1050:{ -: 1051: return (__m256d) __builtin_ia32_permdf256 ((__v4df)__X, __M); -: 1052:} -: 1053:#else -: 1054:#define _mm256_permute4x64_pd(X, M) \ -: 1055: ((__m256d) __builtin_ia32_permdf256 ((__v4df)(__m256d)(X), (int)(M))) -: 1056:#endif -: 1057: -: 1058:extern __inline __m256 -: 1059:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1060:_mm256_permutevar8x32_ps (__m256 __X, __m256i __Y) -: 1061:{ -: 1062: return (__m256) __builtin_ia32_permvarsf256 ((__v8sf)__X, (__v8si)__Y); -: 1063:} -: 1064: -: 1065:#ifdef __OPTIMIZE__ -: 1066:extern __inline __m256i -: 1067:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1068:_mm256_permute4x64_epi64 (__m256i __X, const int __M) -: 1069:{ -: 1070: return (__m256i) __builtin_ia32_permdi256 ((__v4di)__X, __M); -: 1071:} -: 1072:#else -: 1073:#define _mm256_permute4x64_epi64(X, M) \ -: 1074: ((__m256i) __builtin_ia32_permdi256 ((__v4di)(__m256i)(X), (int)(M))) -: 1075:#endif -: 1076: -: 1077: -: 1078:#ifdef __OPTIMIZE__ -: 1079:extern __inline __m256i -: 1080:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) 1436384: 1081:_mm256_permute2x128_si256 (__m256i __X, __m256i __Y, const int __M) -: 1082:{ 179548: 1083: return (__m256i) __builtin_ia32_permti256 ((__v4di)__X, (__v4di)__Y, __M); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% call 7 returned 100% -: 1084:} -: 1085:#else -: 1086:#define _mm256_permute2x128_si256(X, Y, M) \ -: 1087: ((__m256i) __builtin_ia32_permti256 ((__v4di)(__m256i)(X), (__v4di)(__m256i)(Y), (int)(M))) -: 1088:#endif -: 1089: -: 1090:#ifdef __OPTIMIZE__ -: 1091:extern __inline __m128i -: 1092:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1093:_mm256_extracti128_si256 (__m256i __X, const int __M) -: 1094:{ -: 1095: return (__m128i) __builtin_ia32_extract128i256 ((__v4di)__X, __M); -: 1096:} -: 1097:#else -: 1098:#define _mm256_extracti128_si256(X, M) \ -: 1099: ((__m128i) __builtin_ia32_extract128i256 ((__v4di)(__m256i)(X), (int)(M))) -: 1100:#endif -: 1101: -: 1102:#ifdef __OPTIMIZE__ -: 1103:extern __inline __m256i -: 1104:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1105:_mm256_inserti128_si256 (__m256i __X, __m128i __Y, const int __M) -: 1106:{ -: 1107: return (__m256i) __builtin_ia32_insert128i256 ((__v4di)__X, (__v2di)__Y, __M); -: 1108:} -: 1109:#else -: 1110:#define _mm256_inserti128_si256(X, Y, M) \ -: 1111: ((__m256i) __builtin_ia32_insert128i256 ((__v4di)(__m256i)(X), \ -: 1112: (__v2di)(__m128i)(Y), \ -: 1113: (int)(M))) -: 1114:#endif -: 1115: -: 1116:extern __inline __m256i -: 1117:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1118:_mm256_maskload_epi32 (int const *__X, __m256i __M ) -: 1119:{ -: 1120: return (__m256i) __builtin_ia32_maskloadd256 ((const __v8si *)__X, -: 1121: (__v8si)__M); -: 1122:} -: 1123: -: 1124:extern __inline __m256i -: 1125:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1126:_mm256_maskload_epi64 (long long const *__X, __m256i __M ) -: 1127:{ -: 1128: return (__m256i) __builtin_ia32_maskloadq256 ((const __v4di *)__X, -: 1129: (__v4di)__M); -: 1130:} -: 1131: -: 1132:extern __inline __m128i -: 1133:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1134:_mm_maskload_epi32 (int const *__X, __m128i __M ) -: 1135:{ -: 1136: return (__m128i) __builtin_ia32_maskloadd ((const __v4si *)__X, -: 1137: (__v4si)__M); -: 1138:} -: 1139: -: 1140:extern __inline __m128i -: 1141:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1142:_mm_maskload_epi64 (long long const *__X, __m128i __M ) -: 1143:{ -: 1144: return (__m128i) __builtin_ia32_maskloadq ((const __v2di *)__X, -: 1145: (__v2di)__M); -: 1146:} -: 1147: -: 1148:extern __inline void -: 1149:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1150:_mm256_maskstore_epi32 (int *__X, __m256i __M, __m256i __Y ) -: 1151:{ -: 1152: __builtin_ia32_maskstored256 ((__v8si *)__X, (__v8si)__M, (__v8si)__Y); -: 1153:} -: 1154: -: 1155:extern __inline void -: 1156:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1157:_mm256_maskstore_epi64 (long long *__X, __m256i __M, __m256i __Y ) -: 1158:{ -: 1159: __builtin_ia32_maskstoreq256 ((__v4di *)__X, (__v4di)__M, (__v4di)__Y); -: 1160:} -: 1161: -: 1162:extern __inline void -: 1163:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1164:_mm_maskstore_epi32 (int *__X, __m128i __M, __m128i __Y ) -: 1165:{ -: 1166: __builtin_ia32_maskstored ((__v4si *)__X, (__v4si)__M, (__v4si)__Y); -: 1167:} -: 1168: -: 1169:extern __inline void -: 1170:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1171:_mm_maskstore_epi64 (long long *__X, __m128i __M, __m128i __Y ) -: 1172:{ -: 1173: __builtin_ia32_maskstoreq (( __v2di *)__X, (__v2di)__M, (__v2di)__Y); -: 1174:} -: 1175: -: 1176:extern __inline __m256i -: 1177:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1178:_mm256_sllv_epi32 (__m256i __X, __m256i __Y) -: 1179:{ -: 1180: return (__m256i) __builtin_ia32_psllv8si ((__v8si)__X, (__v8si)__Y); -: 1181:} -: 1182: -: 1183:extern __inline __m128i -: 1184:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1185:_mm_sllv_epi32 (__m128i __X, __m128i __Y) -: 1186:{ -: 1187: return (__m128i) __builtin_ia32_psllv4si ((__v4si)__X, (__v4si)__Y); -: 1188:} -: 1189: -: 1190:extern __inline __m256i -: 1191:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1192:_mm256_sllv_epi64 (__m256i __X, __m256i __Y) -: 1193:{ -: 1194: return (__m256i) __builtin_ia32_psllv4di ((__v4di)__X, (__v4di)__Y); -: 1195:} -: 1196: -: 1197:extern __inline __m128i -: 1198:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1199:_mm_sllv_epi64 (__m128i __X, __m128i __Y) -: 1200:{ -: 1201: return (__m128i) __builtin_ia32_psllv2di ((__v2di)__X, (__v2di)__Y); -: 1202:} -: 1203: -: 1204:extern __inline __m256i -: 1205:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1206:_mm256_srav_epi32 (__m256i __X, __m256i __Y) -: 1207:{ -: 1208: return (__m256i) __builtin_ia32_psrav8si ((__v8si)__X, (__v8si)__Y); -: 1209:} -: 1210: -: 1211:extern __inline __m128i -: 1212:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1213:_mm_srav_epi32 (__m128i __X, __m128i __Y) -: 1214:{ -: 1215: return (__m128i) __builtin_ia32_psrav4si ((__v4si)__X, (__v4si)__Y); -: 1216:} -: 1217: -: 1218:extern __inline __m256i -: 1219:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1220:_mm256_srlv_epi32 (__m256i __X, __m256i __Y) -: 1221:{ -: 1222: return (__m256i) __builtin_ia32_psrlv8si ((__v8si)__X, (__v8si)__Y); -: 1223:} -: 1224: -: 1225:extern __inline __m128i -: 1226:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1227:_mm_srlv_epi32 (__m128i __X, __m128i __Y) -: 1228:{ -: 1229: return (__m128i) __builtin_ia32_psrlv4si ((__v4si)__X, (__v4si)__Y); -: 1230:} -: 1231: -: 1232:extern __inline __m256i -: 1233:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1234:_mm256_srlv_epi64 (__m256i __X, __m256i __Y) -: 1235:{ -: 1236: return (__m256i) __builtin_ia32_psrlv4di ((__v4di)__X, (__v4di)__Y); -: 1237:} -: 1238: -: 1239:extern __inline __m128i -: 1240:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1241:_mm_srlv_epi64 (__m128i __X, __m128i __Y) -: 1242:{ -: 1243: return (__m128i) __builtin_ia32_psrlv2di ((__v2di)__X, (__v2di)__Y); -: 1244:} -: 1245: -: 1246:#ifdef __OPTIMIZE__ -: 1247:extern __inline __m128d -: 1248:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1249:_mm_i32gather_pd (double const *__base, __m128i __index, const int __scale) -: 1250:{ -: 1251: __v2df __zero = _mm_setzero_pd (); -: 1252: __v2df __mask = _mm_cmpeq_pd (__zero, __zero); -: 1253: -: 1254: return (__m128d) __builtin_ia32_gathersiv2df (_mm_undefined_pd (), -: 1255: __base, -: 1256: (__v4si)__index, -: 1257: __mask, -: 1258: __scale); -: 1259:} -: 1260: -: 1261:extern __inline __m128d -: 1262:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1263:_mm_mask_i32gather_pd (__m128d __src, double const *__base, __m128i __index, -: 1264: __m128d __mask, const int __scale) -: 1265:{ -: 1266: return (__m128d) __builtin_ia32_gathersiv2df ((__v2df)__src, -: 1267: __base, -: 1268: (__v4si)__index, -: 1269: (__v2df)__mask, -: 1270: __scale); -: 1271:} -: 1272: -: 1273:extern __inline __m256d -: 1274:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1275:_mm256_i32gather_pd (double const *__base, __m128i __index, const int __scale) -: 1276:{ -: 1277: __v4df __zero = _mm256_setzero_pd (); -: 1278: __v4df __mask = _mm256_cmp_pd (__zero, __zero, _CMP_EQ_OQ); -: 1279: -: 1280: return (__m256d) __builtin_ia32_gathersiv4df (_mm256_undefined_pd (), -: 1281: __base, -: 1282: (__v4si)__index, -: 1283: __mask, -: 1284: __scale); -: 1285:} -: 1286: -: 1287:extern __inline __m256d -: 1288:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1289:_mm256_mask_i32gather_pd (__m256d __src, double const *__base, -: 1290: __m128i __index, __m256d __mask, const int __scale) -: 1291:{ -: 1292: return (__m256d) __builtin_ia32_gathersiv4df ((__v4df)__src, -: 1293: __base, -: 1294: (__v4si)__index, -: 1295: (__v4df)__mask, -: 1296: __scale); -: 1297:} -: 1298: -: 1299:extern __inline __m128d -: 1300:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1301:_mm_i64gather_pd (double const *__base, __m128i __index, const int __scale) -: 1302:{ -: 1303: __v2df __src = _mm_setzero_pd (); -: 1304: __v2df __mask = _mm_cmpeq_pd (__src, __src); -: 1305: -: 1306: return (__m128d) __builtin_ia32_gatherdiv2df (__src, -: 1307: __base, -: 1308: (__v2di)__index, -: 1309: __mask, -: 1310: __scale); -: 1311:} -: 1312: -: 1313:extern __inline __m128d -: 1314:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1315:_mm_mask_i64gather_pd (__m128d __src, double const *__base, __m128i __index, -: 1316: __m128d __mask, const int __scale) -: 1317:{ -: 1318: return (__m128d) __builtin_ia32_gatherdiv2df ((__v2df)__src, -: 1319: __base, -: 1320: (__v2di)__index, -: 1321: (__v2df)__mask, -: 1322: __scale); -: 1323:} -: 1324: -: 1325:extern __inline __m256d -: 1326:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1327:_mm256_i64gather_pd (double const *__base, __m256i __index, const int __scale) -: 1328:{ -: 1329: __v4df __src = _mm256_setzero_pd (); -: 1330: __v4df __mask = _mm256_cmp_pd (__src, __src, _CMP_EQ_OQ); -: 1331: -: 1332: return (__m256d) __builtin_ia32_gatherdiv4df (__src, -: 1333: __base, -: 1334: (__v4di)__index, -: 1335: __mask, -: 1336: __scale); -: 1337:} -: 1338: -: 1339:extern __inline __m256d -: 1340:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1341:_mm256_mask_i64gather_pd (__m256d __src, double const *__base, -: 1342: __m256i __index, __m256d __mask, const int __scale) -: 1343:{ -: 1344: return (__m256d) __builtin_ia32_gatherdiv4df ((__v4df)__src, -: 1345: __base, -: 1346: (__v4di)__index, -: 1347: (__v4df)__mask, -: 1348: __scale); -: 1349:} -: 1350: -: 1351:extern __inline __m128 -: 1352:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1353:_mm_i32gather_ps (float const *__base, __m128i __index, const int __scale) -: 1354:{ -: 1355: __v4sf __src = _mm_setzero_ps (); -: 1356: __v4sf __mask = _mm_cmpeq_ps (__src, __src); -: 1357: -: 1358: return (__m128) __builtin_ia32_gathersiv4sf (__src, -: 1359: __base, -: 1360: (__v4si)__index, -: 1361: __mask, -: 1362: __scale); -: 1363:} -: 1364: -: 1365:extern __inline __m128 -: 1366:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1367:_mm_mask_i32gather_ps (__m128 __src, float const *__base, __m128i __index, -: 1368: __m128 __mask, const int __scale) -: 1369:{ -: 1370: return (__m128) __builtin_ia32_gathersiv4sf ((__v4sf)__src, -: 1371: __base, -: 1372: (__v4si)__index, -: 1373: (__v4sf)__mask, -: 1374: __scale); -: 1375:} -: 1376: -: 1377:extern __inline __m256 -: 1378:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1379:_mm256_i32gather_ps (float const *__base, __m256i __index, const int __scale) -: 1380:{ -: 1381: __v8sf __src = _mm256_setzero_ps (); -: 1382: __v8sf __mask = _mm256_cmp_ps (__src, __src, _CMP_EQ_OQ); -: 1383: -: 1384: return (__m256) __builtin_ia32_gathersiv8sf (__src, -: 1385: __base, -: 1386: (__v8si)__index, -: 1387: __mask, -: 1388: __scale); -: 1389:} -: 1390: -: 1391:extern __inline __m256 -: 1392:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1393:_mm256_mask_i32gather_ps (__m256 __src, float const *__base, -: 1394: __m256i __index, __m256 __mask, const int __scale) -: 1395:{ -: 1396: return (__m256) __builtin_ia32_gathersiv8sf ((__v8sf)__src, -: 1397: __base, -: 1398: (__v8si)__index, -: 1399: (__v8sf)__mask, -: 1400: __scale); -: 1401:} -: 1402: -: 1403:extern __inline __m128 -: 1404:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1405:_mm_i64gather_ps (float const *__base, __m128i __index, const int __scale) -: 1406:{ -: 1407: __v4sf __src = _mm_setzero_ps (); -: 1408: __v4sf __mask = _mm_cmpeq_ps (__src, __src); -: 1409: -: 1410: return (__m128) __builtin_ia32_gatherdiv4sf (__src, -: 1411: __base, -: 1412: (__v2di)__index, -: 1413: __mask, -: 1414: __scale); -: 1415:} -: 1416: -: 1417:extern __inline __m128 -: 1418:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1419:_mm_mask_i64gather_ps (__m128 __src, float const *__base, __m128i __index, -: 1420: __m128 __mask, const int __scale) -: 1421:{ -: 1422: return (__m128) __builtin_ia32_gatherdiv4sf ((__v4sf)__src, -: 1423: __base, -: 1424: (__v2di)__index, -: 1425: (__v4sf)__mask, -: 1426: __scale); -: 1427:} -: 1428: -: 1429:extern __inline __m128 -: 1430:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1431:_mm256_i64gather_ps (float const *__base, __m256i __index, const int __scale) -: 1432:{ -: 1433: __v4sf __src = _mm_setzero_ps (); -: 1434: __v4sf __mask = _mm_cmpeq_ps (__src, __src); -: 1435: -: 1436: return (__m128) __builtin_ia32_gatherdiv4sf256 (__src, -: 1437: __base, -: 1438: (__v4di)__index, -: 1439: __mask, -: 1440: __scale); -: 1441:} -: 1442: -: 1443:extern __inline __m128 -: 1444:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1445:_mm256_mask_i64gather_ps (__m128 __src, float const *__base, -: 1446: __m256i __index, __m128 __mask, const int __scale) -: 1447:{ -: 1448: return (__m128) __builtin_ia32_gatherdiv4sf256 ((__v4sf)__src, -: 1449: __base, -: 1450: (__v4di)__index, -: 1451: (__v4sf)__mask, -: 1452: __scale); -: 1453:} -: 1454: -: 1455:extern __inline __m128i -: 1456:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1457:_mm_i32gather_epi64 (long long int const *__base, -: 1458: __m128i __index, const int __scale) -: 1459:{ -: 1460: __v2di __src = __extension__ (__v2di){ 0, 0 }; -: 1461: __v2di __mask = __extension__ (__v2di){ ~0, ~0 }; -: 1462: -: 1463: return (__m128i) __builtin_ia32_gathersiv2di (__src, -: 1464: __base, -: 1465: (__v4si)__index, -: 1466: __mask, -: 1467: __scale); -: 1468:} -: 1469: -: 1470:extern __inline __m128i -: 1471:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1472:_mm_mask_i32gather_epi64 (__m128i __src, long long int const *__base, -: 1473: __m128i __index, __m128i __mask, const int __scale) -: 1474:{ -: 1475: return (__m128i) __builtin_ia32_gathersiv2di ((__v2di)__src, -: 1476: __base, -: 1477: (__v4si)__index, -: 1478: (__v2di)__mask, -: 1479: __scale); -: 1480:} -: 1481: -: 1482:extern __inline __m256i -: 1483:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1484:_mm256_i32gather_epi64 (long long int const *__base, -: 1485: __m128i __index, const int __scale) -: 1486:{ -: 1487: __v4di __src = __extension__ (__v4di){ 0, 0, 0, 0 }; -: 1488: __v4di __mask = __extension__ (__v4di){ ~0, ~0, ~0, ~0 }; -: 1489: -: 1490: return (__m256i) __builtin_ia32_gathersiv4di (__src, -: 1491: __base, -: 1492: (__v4si)__index, -: 1493: __mask, -: 1494: __scale); -: 1495:} -: 1496: -: 1497:extern __inline __m256i -: 1498:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1499:_mm256_mask_i32gather_epi64 (__m256i __src, long long int const *__base, -: 1500: __m128i __index, __m256i __mask, -: 1501: const int __scale) -: 1502:{ -: 1503: return (__m256i) __builtin_ia32_gathersiv4di ((__v4di)__src, -: 1504: __base, -: 1505: (__v4si)__index, -: 1506: (__v4di)__mask, -: 1507: __scale); -: 1508:} -: 1509: -: 1510:extern __inline __m128i -: 1511:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1512:_mm_i64gather_epi64 (long long int const *__base, -: 1513: __m128i __index, const int __scale) -: 1514:{ -: 1515: __v2di __src = __extension__ (__v2di){ 0, 0 }; -: 1516: __v2di __mask = __extension__ (__v2di){ ~0, ~0 }; -: 1517: -: 1518: return (__m128i) __builtin_ia32_gatherdiv2di (__src, -: 1519: __base, -: 1520: (__v2di)__index, -: 1521: __mask, -: 1522: __scale); -: 1523:} -: 1524: -: 1525:extern __inline __m128i -: 1526:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1527:_mm_mask_i64gather_epi64 (__m128i __src, long long int const *__base, -: 1528: __m128i __index, __m128i __mask, const int __scale) -: 1529:{ -: 1530: return (__m128i) __builtin_ia32_gatherdiv2di ((__v2di)__src, -: 1531: __base, -: 1532: (__v2di)__index, -: 1533: (__v2di)__mask, -: 1534: __scale); -: 1535:} -: 1536: -: 1537:extern __inline __m256i -: 1538:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1539:_mm256_i64gather_epi64 (long long int const *__base, -: 1540: __m256i __index, const int __scale) -: 1541:{ -: 1542: __v4di __src = __extension__ (__v4di){ 0, 0, 0, 0 }; -: 1543: __v4di __mask = __extension__ (__v4di){ ~0, ~0, ~0, ~0 }; -: 1544: -: 1545: return (__m256i) __builtin_ia32_gatherdiv4di (__src, -: 1546: __base, -: 1547: (__v4di)__index, -: 1548: __mask, -: 1549: __scale); -: 1550:} -: 1551: -: 1552:extern __inline __m256i -: 1553:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1554:_mm256_mask_i64gather_epi64 (__m256i __src, long long int const *__base, -: 1555: __m256i __index, __m256i __mask, -: 1556: const int __scale) -: 1557:{ -: 1558: return (__m256i) __builtin_ia32_gatherdiv4di ((__v4di)__src, -: 1559: __base, -: 1560: (__v4di)__index, -: 1561: (__v4di)__mask, -: 1562: __scale); -: 1563:} -: 1564: -: 1565:extern __inline __m128i -: 1566:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1567:_mm_i32gather_epi32 (int const *__base, __m128i __index, const int __scale) -: 1568:{ -: 1569: __v4si __src = __extension__ (__v4si){ 0, 0, 0, 0 }; -: 1570: __v4si __mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 }; -: 1571: -: 1572: return (__m128i) __builtin_ia32_gathersiv4si (__src, -: 1573: __base, -: 1574: (__v4si)__index, -: 1575: __mask, -: 1576: __scale); -: 1577:} -: 1578: -: 1579:extern __inline __m128i -: 1580:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1581:_mm_mask_i32gather_epi32 (__m128i __src, int const *__base, __m128i __index, -: 1582: __m128i __mask, const int __scale) -: 1583:{ -: 1584: return (__m128i) __builtin_ia32_gathersiv4si ((__v4si)__src, -: 1585: __base, -: 1586: (__v4si)__index, -: 1587: (__v4si)__mask, -: 1588: __scale); -: 1589:} -: 1590: -: 1591:extern __inline __m256i -: 1592:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1593:_mm256_i32gather_epi32 (int const *__base, __m256i __index, const int __scale) -: 1594:{ -: 1595: __v8si __src = __extension__ (__v8si){ 0, 0, 0, 0, 0, 0, 0, 0 }; -: 1596: __v8si __mask = __extension__ (__v8si){ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0 }; -: 1597: -: 1598: return (__m256i) __builtin_ia32_gathersiv8si (__src, -: 1599: __base, -: 1600: (__v8si)__index, -: 1601: __mask, -: 1602: __scale); -: 1603:} -: 1604: -: 1605:extern __inline __m256i -: 1606:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1607:_mm256_mask_i32gather_epi32 (__m256i __src, int const *__base, -: 1608: __m256i __index, __m256i __mask, -: 1609: const int __scale) -: 1610:{ -: 1611: return (__m256i) __builtin_ia32_gathersiv8si ((__v8si)__src, -: 1612: __base, -: 1613: (__v8si)__index, -: 1614: (__v8si)__mask, -: 1615: __scale); -: 1616:} -: 1617: -: 1618:extern __inline __m128i -: 1619:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1620:_mm_i64gather_epi32 (int const *__base, __m128i __index, const int __scale) -: 1621:{ -: 1622: __v4si __src = __extension__ (__v4si){ 0, 0, 0, 0 }; -: 1623: __v4si __mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 }; -: 1624: -: 1625: return (__m128i) __builtin_ia32_gatherdiv4si (__src, -: 1626: __base, -: 1627: (__v2di)__index, -: 1628: __mask, -: 1629: __scale); -: 1630:} -: 1631: -: 1632:extern __inline __m128i -: 1633:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1634:_mm_mask_i64gather_epi32 (__m128i __src, int const *__base, __m128i __index, -: 1635: __m128i __mask, const int __scale) -: 1636:{ -: 1637: return (__m128i) __builtin_ia32_gatherdiv4si ((__v4si)__src, -: 1638: __base, -: 1639: (__v2di)__index, -: 1640: (__v4si)__mask, -: 1641: __scale); -: 1642:} -: 1643: -: 1644:extern __inline __m128i -: 1645:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1646:_mm256_i64gather_epi32 (int const *__base, __m256i __index, const int __scale) -: 1647:{ -: 1648: __v4si __src = __extension__ (__v4si){ 0, 0, 0, 0 }; -: 1649: __v4si __mask = __extension__ (__v4si){ ~0, ~0, ~0, ~0 }; -: 1650: -: 1651: return (__m128i) __builtin_ia32_gatherdiv4si256 (__src, -: 1652: __base, -: 1653: (__v4di)__index, -: 1654: __mask, -: 1655: __scale); -: 1656:} -: 1657: -: 1658:extern __inline __m128i -: 1659:__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -: 1660:_mm256_mask_i64gather_epi32 (__m128i __src, int const *__base, -: 1661: __m256i __index, __m128i __mask, -: 1662: const int __scale) -: 1663:{ -: 1664: return (__m128i) __builtin_ia32_gatherdiv4si256 ((__v4si)__src, -: 1665: __base, -: 1666: (__v4di)__index, -: 1667: (__v4si)__mask, -: 1668: __scale); -: 1669:} -: 1670:#else /* __OPTIMIZE__ */ -: 1671:#define _mm_i32gather_pd(BASE, INDEX, SCALE) \ -: 1672: (__m128d) __builtin_ia32_gathersiv2df ((__v2df) _mm_setzero_pd (), \ -: 1673: (double const *)BASE, \ -: 1674: (__v4si)(__m128i)INDEX, \ -: 1675: (__v2df)_mm_set1_pd( \ -: 1676: (double)(long long int) -1), \ -: 1677: (int)SCALE) -: 1678: -: 1679:#define _mm_mask_i32gather_pd(SRC, BASE, INDEX, MASK, SCALE) \ -: 1680: (__m128d) __builtin_ia32_gathersiv2df ((__v2df)(__m128d)SRC, \ -: 1681: (double const *)BASE, \ -: 1682: (__v4si)(__m128i)INDEX, \ -: 1683: (__v2df)(__m128d)MASK, \ -: 1684: (int)SCALE) -: 1685: -: 1686:#define _mm256_i32gather_pd(BASE, INDEX, SCALE) \ -: 1687: (__m256d) __builtin_ia32_gathersiv4df ((__v4df) _mm256_setzero_pd (), \ -: 1688: (double const *)BASE, \ -: 1689: (__v4si)(__m128i)INDEX, \ -: 1690: (__v4df)_mm256_set1_pd( \ -: 1691: (double)(long long int) -1), \ -: 1692: (int)SCALE) -: 1693: -: 1694:#define _mm256_mask_i32gather_pd(SRC, BASE, INDEX, MASK, SCALE) \ -: 1695: (__m256d) __builtin_ia32_gathersiv4df ((__v4df)(__m256d)SRC, \ -: 1696: (double const *)BASE, \ -: 1697: (__v4si)(__m128i)INDEX, \ -: 1698: (__v4df)(__m256d)MASK, \ -: 1699: (int)SCALE) -: 1700: -: 1701:#define _mm_i64gather_pd(BASE, INDEX, SCALE) \ -: 1702: (__m128d) __builtin_ia32_gatherdiv2df ((__v2df) _mm_setzero_pd (), \ -: 1703: (double const *)BASE, \ -: 1704: (__v2di)(__m128i)INDEX, \ -: 1705: (__v2df)_mm_set1_pd( \ -: 1706: (double)(long long int) -1), \ -: 1707: (int)SCALE) -: 1708: -: 1709:#define _mm_mask_i64gather_pd(SRC, BASE, INDEX, MASK, SCALE) \ -: 1710: (__m128d) __builtin_ia32_gatherdiv2df ((__v2df)(__m128d)SRC, \ -: 1711: (double const *)BASE, \ -: 1712: (__v2di)(__m128i)INDEX, \ -: 1713: (__v2df)(__m128d)MASK, \ -: 1714: (int)SCALE) -: 1715: -: 1716:#define _mm256_i64gather_pd(BASE, INDEX, SCALE) \ -: 1717: (__m256d) __builtin_ia32_gatherdiv4df ((__v4df) _mm256_setzero_pd (), \ -: 1718: (double const *)BASE, \ -: 1719: (__v4di)(__m256i)INDEX, \ -: 1720: (__v4df)_mm256_set1_pd( \ -: 1721: (double)(long long int) -1), \ -: 1722: (int)SCALE) -: 1723: -: 1724:#define _mm256_mask_i64gather_pd(SRC, BASE, INDEX, MASK, SCALE) \ -: 1725: (__m256d) __builtin_ia32_gatherdiv4df ((__v4df)(__m256d)SRC, \ -: 1726: (double const *)BASE, \ -: 1727: (__v4di)(__m256i)INDEX, \ -: 1728: (__v4df)(__m256d)MASK, \ -: 1729: (int)SCALE) -: 1730: -: 1731:#define _mm_i32gather_ps(BASE, INDEX, SCALE) \ -: 1732: (__m128) __builtin_ia32_gathersiv4sf ((__v4sf) _mm_setzero_ps (), \ -: 1733: (float const *)BASE, \ -: 1734: (__v4si)(__m128i)INDEX, \ -: 1735: _mm_set1_ps ((float)(int) -1), \ -: 1736: (int)SCALE) -: 1737: -: 1738:#define _mm_mask_i32gather_ps(SRC, BASE, INDEX, MASK, SCALE) \ -: 1739: (__m128) __builtin_ia32_gathersiv4sf ((__v4sf)(__m128)SRC, \ -: 1740: (float const *)BASE, \ -: 1741: (__v4si)(__m128i)INDEX, \ -: 1742: (__v4sf)(__m128)MASK, \ -: 1743: (int)SCALE) -: 1744: -: 1745:#define _mm256_i32gather_ps(BASE, INDEX, SCALE) \ -: 1746: (__m256) __builtin_ia32_gathersiv8sf ((__v8sf) _mm256_setzero_ps (), \ -: 1747: (float const *)BASE, \ -: 1748: (__v8si)(__m256i)INDEX, \ -: 1749: (__v8sf)_mm256_set1_ps ( \ -: 1750: (float)(int) -1), \ -: 1751: (int)SCALE) -: 1752: -: 1753:#define _mm256_mask_i32gather_ps(SRC, BASE, INDEX, MASK, SCALE) \ -: 1754: (__m256) __builtin_ia32_gathersiv8sf ((__v8sf)(__m256)SRC, \ -: 1755: (float const *)BASE, \ -: 1756: (__v8si)(__m256i)INDEX, \ -: 1757: (__v8sf)(__m256)MASK, \ -: 1758: (int)SCALE) -: 1759: -: 1760:#define _mm_i64gather_ps(BASE, INDEX, SCALE) \ -: 1761: (__m128) __builtin_ia32_gatherdiv4sf ((__v4sf) _mm_setzero_pd (), \ -: 1762: (float const *)BASE, \ -: 1763: (__v2di)(__m128i)INDEX, \ -: 1764: (__v4sf)_mm_set1_ps ( \ -: 1765: (float)(int) -1), \ -: 1766: (int)SCALE) -: 1767: -: 1768:#define _mm_mask_i64gather_ps(SRC, BASE, INDEX, MASK, SCALE) \ -: 1769: (__m128) __builtin_ia32_gatherdiv4sf ((__v4sf)(__m128)SRC, \ -: 1770: (float const *)BASE, \ -: 1771: (__v2di)(__m128i)INDEX, \ -: 1772: (__v4sf)(__m128)MASK, \ -: 1773: (int)SCALE) -: 1774: -: 1775:#define _mm256_i64gather_ps(BASE, INDEX, SCALE) \ -: 1776: (__m128) __builtin_ia32_gatherdiv4sf256 ((__v4sf) _mm_setzero_ps (), \ -: 1777: (float const *)BASE, \ -: 1778: (__v4di)(__m256i)INDEX, \ -: 1779: (__v4sf)_mm_set1_ps( \ -: 1780: (float)(int) -1), \ -: 1781: (int)SCALE) -: 1782: -: 1783:#define _mm256_mask_i64gather_ps(SRC, BASE, INDEX, MASK, SCALE) \ -: 1784: (__m128) __builtin_ia32_gatherdiv4sf256 ((__v4sf)(__m128)SRC, \ -: 1785: (float const *)BASE, \ -: 1786: (__v4di)(__m256i)INDEX, \ -: 1787: (__v4sf)(__m128)MASK, \ -: 1788: (int)SCALE) -: 1789: -: 1790:#define _mm_i32gather_epi64(BASE, INDEX, SCALE) \ -: 1791: (__m128i) __builtin_ia32_gathersiv2di ((__v2di) _mm_setzero_si128 (), \ -: 1792: (long long const *)BASE, \ -: 1793: (__v4si)(__m128i)INDEX, \ -: 1794: (__v2di)_mm_set1_epi64x (-1), \ -: 1795: (int)SCALE) -: 1796: -: 1797:#define _mm_mask_i32gather_epi64(SRC, BASE, INDEX, MASK, SCALE) \ -: 1798: (__m128i) __builtin_ia32_gathersiv2di ((__v2di)(__m128i)SRC, \ -: 1799: (long long const *)BASE, \ -: 1800: (__v4si)(__m128i)INDEX, \ -: 1801: (__v2di)(__m128i)MASK, \ -: 1802: (int)SCALE) -: 1803: -: 1804:#define _mm256_i32gather_epi64(BASE, INDEX, SCALE) \ -: 1805: (__m256i) __builtin_ia32_gathersiv4di ((__v4di) _mm256_setzero_si256 (), \ -: 1806: (long long const *)BASE, \ -: 1807: (__v4si)(__m128i)INDEX, \ -: 1808: (__v4di)_mm256_set1_epi64x (-1), \ -: 1809: (int)SCALE) -: 1810: -: 1811:#define _mm256_mask_i32gather_epi64(SRC, BASE, INDEX, MASK, SCALE) \ -: 1812: (__m256i) __builtin_ia32_gathersiv4di ((__v4di)(__m256i)SRC, \ -: 1813: (long long const *)BASE, \ -: 1814: (__v4si)(__m128i)INDEX, \ -: 1815: (__v4di)(__m256i)MASK, \ -: 1816: (int)SCALE) -: 1817: -: 1818:#define _mm_i64gather_epi64(BASE, INDEX, SCALE) \ -: 1819: (__m128i) __builtin_ia32_gatherdiv2di ((__v2di) _mm_setzero_si128 (), \ -: 1820: (long long const *)BASE, \ -: 1821: (__v2di)(__m128i)INDEX, \ -: 1822: (__v2di)_mm_set1_epi64x (-1), \ -: 1823: (int)SCALE) -: 1824: -: 1825:#define _mm_mask_i64gather_epi64(SRC, BASE, INDEX, MASK, SCALE) \ -: 1826: (__m128i) __builtin_ia32_gatherdiv2di ((__v2di)(__m128i)SRC, \ -: 1827: (long long const *)BASE, \ -: 1828: (__v2di)(__m128i)INDEX, \ -: 1829: (__v2di)(__m128i)MASK, \ -: 1830: (int)SCALE) -: 1831: -: 1832:#define _mm256_i64gather_epi64(BASE, INDEX, SCALE) \ -: 1833: (__m256i) __builtin_ia32_gatherdiv4di ((__v4di) _mm256_setzero_si256 (), \ -: 1834: (long long const *)BASE, \ -: 1835: (__v4di)(__m256i)INDEX, \ -: 1836: (__v4di)_mm256_set1_epi64x (-1), \ -: 1837: (int)SCALE) -: 1838: -: 1839:#define _mm256_mask_i64gather_epi64(SRC, BASE, INDEX, MASK, SCALE) \ -: 1840: (__m256i) __builtin_ia32_gatherdiv4di ((__v4di)(__m256i)SRC, \ -: 1841: (long long const *)BASE, \ -: 1842: (__v4di)(__m256i)INDEX, \ -: 1843: (__v4di)(__m256i)MASK, \ -: 1844: (int)SCALE) -: 1845: -: 1846:#define _mm_i32gather_epi32(BASE, INDEX, SCALE) \ -: 1847: (__m128i) __builtin_ia32_gathersiv4si ((__v4si) _mm_setzero_si128 (), \ -: 1848: (int const *)BASE, \ -: 1849: (__v4si)(__m128i)INDEX, \ -: 1850: (__v4si)_mm_set1_epi32 (-1), \ -: 1851: (int)SCALE) -: 1852: -: 1853:#define _mm_mask_i32gather_epi32(SRC, BASE, INDEX, MASK, SCALE) \ -: 1854: (__m128i) __builtin_ia32_gathersiv4si ((__v4si)(__m128i)SRC, \ -: 1855: (int const *)BASE, \ -: 1856: (__v4si)(__m128i)INDEX, \ -: 1857: (__v4si)(__m128i)MASK, \ -: 1858: (int)SCALE) -: 1859: -: 1860:#define _mm256_i32gather_epi32(BASE, INDEX, SCALE) \ -: 1861: (__m256i) __builtin_ia32_gathersiv8si ((__v8si) _mm256_setzero_si256 (), \ -: 1862: (int const *)BASE, \ -: 1863: (__v8si)(__m256i)INDEX, \ -: 1864: (__v8si)_mm256_set1_epi32 (-1), \ -: 1865: (int)SCALE) -: 1866: -: 1867:#define _mm256_mask_i32gather_epi32(SRC, BASE, INDEX, MASK, SCALE) \ -: 1868: (__m256i) __builtin_ia32_gathersiv8si ((__v8si)(__m256i)SRC, \ -: 1869: (int const *)BASE, \ -: 1870: (__v8si)(__m256i)INDEX, \ -: 1871: (__v8si)(__m256i)MASK, \ -: 1872: (int)SCALE) -: 1873: -: 1874:#define _mm_i64gather_epi32(BASE, INDEX, SCALE) \ -: 1875: (__m128i) __builtin_ia32_gatherdiv4si ((__v4si) _mm_setzero_si128 (), \ -: 1876: (int const *)BASE, \ -: 1877: (__v2di)(__m128i)INDEX, \ -: 1878: (__v4si)_mm_set1_epi32 (-1), \ -: 1879: (int)SCALE) -: 1880: -: 1881:#define _mm_mask_i64gather_epi32(SRC, BASE, INDEX, MASK, SCALE) \ -: 1882: (__m128i) __builtin_ia32_gatherdiv4si ((__v4si)(__m128i)SRC, \ -: 1883: (int const *)BASE, \ -: 1884: (__v2di)(__m128i)INDEX, \ -: 1885: (__v4si)(__m128i)MASK, \ -: 1886: (int)SCALE) -: 1887: -: 1888:#define _mm256_i64gather_epi32(BASE, INDEX, SCALE) \ -: 1889: (__m128i) __builtin_ia32_gatherdiv4si256 ((__v4si) _mm_setzero_si128 (), \ -: 1890: (int const *)BASE, \ -: 1891: (__v4di)(__m256i)INDEX, \ -: 1892: (__v4si)_mm_set1_epi32(-1), \ -: 1893: (int)SCALE) -: 1894: -: 1895:#define _mm256_mask_i64gather_epi32(SRC, BASE, INDEX, MASK, SCALE) \ -: 1896: (__m128i) __builtin_ia32_gatherdiv4si256 ((__v4si)(__m128i)SRC, \ -: 1897: (int const *)BASE, \ -: 1898: (__v4di)(__m256i)INDEX, \ -: 1899: (__v4si)(__m128i)MASK, \ -: 1900: (int)SCALE) -: 1901:#endif /* __OPTIMIZE__ */ -: 1902: -: 1903:#ifdef __DISABLE_AVX2__ -: 1904:#undef __DISABLE_AVX2__ -: 1905:#pragma GCC pop_options -: 1906:#endif /* __DISABLE_AVX2__ */ -: 1907: -: 1908:#endif /* _AVX2INTRIN_H_INCLUDED */ <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#elgamal.h.gcov -: 0:Source:build/include/botan/elgamal.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_elgamal.gcda -: 0:Runs:2947 -: 1:/* -: 2:* ElGamal -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_ELGAMAL_H_ -: 9:#define BOTAN_ELGAMAL_H_ -: 10: -: 11:#include -: 12: -: 13:namespace Botan { -: 14: -: 15:/** -: 16:* ElGamal Public Key -: 17:*/ =====: 18:class BOTAN_PUBLIC_API(2,0) ElGamal_PublicKey : public virtual DL_Scheme_PublicKey -: 19: { -: 20: public: function _ZNK5Botan17ElGamal_PublicKey9algo_nameB5cxx11Ev called 161 returned 100% blocks executed 100% 161: 21: std::string algo_name() const override { return "ElGamal"; } call 0 returned 100% function _ZNK5Botan17ElGamal_PublicKey12group_formatEv called 44 returned 100% blocks executed 100% 44: 22: DL_Group::Format group_format() const override { return DL_Group::ANSI_X9_42; } -: 23: -: 24: /** -: 25: * Load a public key. -: 26: * @param alg_id the X.509 algorithm identifier -: 27: * @param key_bits DER encoded public key bits -: 28: */ -: 29: ElGamal_PublicKey(const AlgorithmIdentifier& alg_id, -: 30: const std::vector& key_bits) : -: 31: DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_42) -: 32: {} -: 33: -: 34: /** -: 35: * Create a public key. -: 36: * @param group the underlying DL group -: 37: * @param y the public value y = g^x mod p -: 38: */ -: 39: ElGamal_PublicKey(const DL_Group& group, const BigInt& y); -: 40: -: 41: std::unique_ptr -: 42: create_encryption_op(RandomNumberGenerator& rng, -: 43: const std::string& params, -: 44: const std::string& provider) const override; -: 45: -: 46: protected: 47*: 47: ElGamal_PublicKey() = default; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed branch 4 never executed branch 5 never executed call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 never executed branch 10 never executed branch 11 never executed -: 48: }; -: 49: -: 50:/** -: 51:* ElGamal Private Key -: 52:*/ -: 53:class BOTAN_PUBLIC_API(2,0) ElGamal_PrivateKey final : public ElGamal_PublicKey, -: 54: public virtual DL_Scheme_PrivateKey -: 55: { -: 56: public: -: 57: bool check_key(RandomNumberGenerator& rng, bool) const override; -: 58: -: 59: /** -: 60: * Load a private key. -: 61: * @param alg_id the X.509 algorithm identifier -: 62: * @param key_bits DER encoded key bits in ANSI X9.42 format -: 63: */ -: 64: ElGamal_PrivateKey(const AlgorithmIdentifier& alg_id, -: 65: const secure_vector& key_bits); -: 66: -: 67: /** -: 68: * Create a private key. -: 69: * @param rng random number generator to use -: 70: * @param group the group to be used in the key -: 71: * @param priv_key the key's secret value (or if zero, generate a new key) -: 72: */ -: 73: ElGamal_PrivateKey(RandomNumberGenerator& rng, -: 74: const DL_Group& group, -: 75: const BigInt& priv_key = 0); -: 76: -: 77: std::unique_ptr -: 78: create_decryption_op(RandomNumberGenerator& rng, -: 79: const std::string& params, -: 80: const std::string& provider) const override; -: 81: }; -: 82: -: 83:} -: 84: -: 85:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#certstor.h.gcov -: 0:Source:build/include/botan/certstor.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/x509_certstor.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/x509_certstor.gcda -: 0:Runs:2947 -: 1:/* -: 2:* Certificate Store -: 3:* (C) 1999-2010,2013 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_CERT_STORE_H_ -: 9:#define BOTAN_CERT_STORE_H_ -: 10: -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:/** -: 17:* Certificate Store Interface -: 18:*/ 13: 19:class BOTAN_PUBLIC_API(2,0) Certificate_Store branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 20: { -: 21: public: -: 22: virtual ~Certificate_Store(); -: 23: -: 24: /** -: 25: * Find a certificate by Subject DN and (optionally) key identifier -: 26: * @param subject_dn the subject's distinguished name -: 27: * @param key_id an optional key id -: 28: * @return a matching certificate or nullptr otherwise -: 29: * If more than one certificate in the certificate store matches, then -: 30: * a single value is selected arbitrarily. -: 31: */ -: 32: virtual std::shared_ptr -: 33: find_cert(const X509_DN& subject_dn, const std::vector& key_id) const; -: 34: -: 35: /** -: 36: * Find all certificates with a given Subject DN. -: 37: * Subject DN and even the key identifier might not be unique. -: 38: */ -: 39: virtual std::vector> find_all_certs( -: 40: const X509_DN& subject_dn, const std::vector& key_id) const = 0; -: 41: -: 42: -: 43: /** -: 44: * Find a certificate by searching for one with a matching SHA-1 hash of -: 45: * public key. Used for OCSP. -: 46: * @param key_hash SHA-1 hash of the subject's public key -: 47: * @return a matching certificate or nullptr otherwise -: 48: */ -: 49: virtual std::shared_ptr -: 50: find_cert_by_pubkey_sha1(const std::vector& key_hash) const = 0; -: 51: -: 52: /** -: 53: * Find a certificate by searching for one with a matching SHA-256 hash of -: 54: * raw subject name. Used for OCSP. -: 55: * @param subject_hash SHA-256 hash of the subject's raw name -: 56: * @return a matching certificate or nullptr otherwise -: 57: */ -: 58: virtual std::shared_ptr -: 59: find_cert_by_raw_subject_dn_sha256(const std::vector& subject_hash) const = 0; -: 60: -: 61: /** -: 62: * Finds a CRL for the given certificate -: 63: * @param subject the subject certificate -: 64: * @return the CRL for subject or nullptr otherwise -: 65: */ -: 66: virtual std::shared_ptr find_crl_for(const X509_Certificate& subject) const; -: 67: -: 68: /** -: 69: * @return whether the certificate is known -: 70: * @param cert certififcate to be searched -: 71: */ -: 72: bool certificate_known(const X509_Certificate& cert) const -: 73: { -: 74: return find_cert(cert.subject_dn(), cert.subject_key_id()) != nullptr; -: 75: } -: 76: -: 77: // remove this (used by TLS::Server) -: 78: virtual std::vector all_subjects() const = 0; -: 79: }; -: 80: -: 81:/** -: 82:* In Memory Certificate Store -: 83:*/ -: 84:class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_Memory final : public Certificate_Store -: 85: { -: 86: public: -: 87: /** -: 88: * Attempt to parse all files in dir (including subdirectories) -: 89: * as certificates. Ignores errors. -: 90: */ -: 91: explicit Certificate_Store_In_Memory(const std::string& dir); -: 92: -: 93: /** -: 94: * Adds given certificate to the store. -: 95: */ -: 96: explicit Certificate_Store_In_Memory(const X509_Certificate& cert); -: 97: -: 98: /** -: 99: * Create an empty store. -: 100: */ -: 101: Certificate_Store_In_Memory() = default; -: 102: -: 103: /** -: 104: * Add a certificate to the store. -: 105: * @param cert certificate to be added -: 106: */ -: 107: void add_certificate(const X509_Certificate& cert); -: 108: -: 109: /** -: 110: * Add a certificate already in a shared_ptr to the store. -: 111: * @param cert certificate to be added -: 112: */ -: 113: void add_certificate(std::shared_ptr cert); -: 114: -: 115: /** -: 116: * Add a certificate revocation list (CRL) to the store. -: 117: * @param crl CRL to be added -: 118: */ -: 119: void add_crl(const X509_CRL& crl); -: 120: -: 121: /** -: 122: * Add a certificate revocation list (CRL) to the store as a shared_ptr -: 123: * @param crl CRL to be added -: 124: */ -: 125: void add_crl(std::shared_ptr crl); -: 126: -: 127: /** -: 128: * @return DNs for all certificates managed by the store -: 129: */ -: 130: std::vector all_subjects() const override; -: 131: -: 132: /* -: 133: * Find a certificate by Subject DN and (optionally) key identifier -: 134: * @return the first certificate that matches -: 135: */ -: 136: std::shared_ptr find_cert( -: 137: const X509_DN& subject_dn, -: 138: const std::vector& key_id) const override; -: 139: -: 140: /* -: 141: * Find all certificates with a given Subject DN. -: 142: * Subject DN and even the key identifier might not be unique. -: 143: */ -: 144: std::vector> find_all_certs( -: 145: const X509_DN& subject_dn, const std::vector& key_id) const override; -: 146: -: 147: std::shared_ptr -: 148: find_cert_by_pubkey_sha1(const std::vector& key_hash) const override; -: 149: -: 150: std::shared_ptr -: 151: find_cert_by_raw_subject_dn_sha256(const std::vector& subject_hash) const override; -: 152: -: 153: /** -: 154: * Finds a CRL for the given certificate -: 155: */ -: 156: std::shared_ptr find_crl_for(const X509_Certificate& subject) const override; -: 157: private: -: 158: // TODO: Add indexing on the DN and key id to avoid linear search -: 159: std::vector> m_certs; -: 160: std::vector> m_crls; -: 161: }; -: 162: -: 163:} -: 164: -: 165:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#impl#write.hpp.gcov -: 0:Source:/usr/include/boost/asio/impl/write.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcda -: 0:Runs:1 -: 1:// -: 2:// impl/write.hpp -: 3:// ~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_IMPL_WRITE_HPP -: 12:#define BOOST_ASIO_IMPL_WRITE_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22:#include -: 23:#include -: 24:#include -: 25:#include -: 26:#include -: 27:#include -: 28:#include -: 29:#include -: 30:#include -: 31:#include -: 32:#include -: 33: -: 34:#include -: 35: -: 36:namespace boost { -: 37:namespace asio { -: 38: -: 39:namespace detail -: 40:{ -: 41: template 13: 43: std::size_t write_buffer_sequence(SyncWriteStream& s, -: 44: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 45: CompletionCondition completion_condition, boost::system::error_code& ec) -: 46: { 13: 47: ec = boost::system::error_code(); -: 48: boost::asio::detail::consuming_buffers tmp(buffers); 24: 50: while (!tmp.empty()) -: 51: { 16: 52: if (std::size_t max_size = detail::adapt_completion_condition_result( -: 53: completion_condition(ec, tmp.total_consumed()))) 11: 54: tmp.consume(s.write_some(tmp.prepare(max_size), ec)); -: 55: else -: 56: break; -: 57: } 14: 58: return tmp.total_consumed();; -: 59: } ------------------ _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests10TestStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE: function _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests10TestStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE called 8 returned 100% blocks executed 100% 8: 43: std::size_t write_buffer_sequence(SyncWriteStream& s, call 0 returned 100% -: 44: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 45: CompletionCondition completion_condition, boost::system::error_code& ec) -: 46: { 8: 47: ec = boost::system::error_code(); -: 48: boost::asio::detail::consuming_buffers tmp(buffers); 13: 50: while (!tmp.empty()) branch 0 taken 54% (fallthrough) branch 1 taken 46% -: 51: { 7: 52: if (std::size_t max_size = detail::adapt_completion_condition_result( branch 0 taken 71% (fallthrough) branch 1 taken 29% call 2 returned 100% -: 53: completion_condition(ec, tmp.total_consumed()))) 5: 54: tmp.consume(s.write_some(tmp.prepare(max_size), ec)); call 0 returned 100% -: 55: else -: 56: break; -: 57: } 8: 58: return tmp.total_consumed();; -: 59: } ------------------ _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests18ThrowingAsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE: function _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests18ThrowingAsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE called 1 returned 100% blocks executed 100% 1: 43: std::size_t write_buffer_sequence(SyncWriteStream& s, call 0 returned 100% -: 44: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 45: CompletionCondition completion_condition, boost::system::error_code& ec) -: 46: { 1: 47: ec = boost::system::error_code(); -: 48: boost::asio::detail::consuming_buffers tmp(buffers); 2: 50: while (!tmp.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 51: { 2: 52: if (std::size_t max_size = detail::adapt_completion_condition_result( branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% -: 53: completion_condition(ec, tmp.total_consumed()))) 1: 54: tmp.consume(s.write_some(tmp.prepare(max_size), ec)); call 0 returned 100% -: 55: else -: 56: break; -: 57: } 1: 58: return tmp.total_consumed();; -: 59: } ------------------ _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests10AsioStreamESt6vectorINS0_12const_bufferESaIS6_EEN9__gnu_cxx17__normal_iteratorIPKS6_S8_EENS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE: function _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests10AsioStreamESt6vectorINS0_12const_bufferESaIS6_EEN9__gnu_cxx17__normal_iteratorIPKS6_S8_EENS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE called 1 returned 100% blocks executed 81% 1: 43: std::size_t write_buffer_sequence(SyncWriteStream& s, call 0 returned 100% -: 44: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 45: CompletionCondition completion_condition, boost::system::error_code& ec) -: 46: { 1: 47: ec = boost::system::error_code(); -: 48: boost::asio::detail::consuming_buffers tmp(buffers); call 0 returned 100% 3: 50: while (!tmp.empty()) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 51: { 2: 52: if (std::size_t max_size = detail::adapt_completion_condition_result( branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 53: completion_condition(ec, tmp.total_consumed()))) 2: 54: tmp.consume(s.write_some(tmp.prepare(max_size), ec)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 never executed branch 6 never executed -: 55: else -: 56: break; -: 57: } 2: 58: return tmp.total_consumed();; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 59: } ------------------ _ZN5boost4asio6detail21write_buffer_sequenceIN5Botan3TLS6StreamIN11Botan_Tests10TestStreamENS4_7ChannelEEENS0_12const_bufferEPKSA_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE: function _ZN5boost4asio6detail21write_buffer_sequenceIN5Botan3TLS6StreamIN11Botan_Tests10TestStreamENS4_7ChannelEEENS0_12const_bufferEPKSA_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE called 1 returned 100% blocks executed 100% 1: 43: std::size_t write_buffer_sequence(SyncWriteStream& s, call 0 returned 100% -: 44: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 45: CompletionCondition completion_condition, boost::system::error_code& ec) -: 46: { 1: 47: ec = boost::system::error_code(); -: 48: boost::asio::detail::consuming_buffers tmp(buffers); 2: 50: while (!tmp.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 51: { 2: 52: if (std::size_t max_size = detail::adapt_completion_condition_result( branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% -: 53: completion_condition(ec, tmp.total_consumed()))) 1: 54: tmp.consume(s.write_some(tmp.prepare(max_size), ec)); call 0 returned 100% -: 55: else -: 56: break; -: 57: } 1: 58: return tmp.total_consumed();; -: 59: } ------------------ _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests10AsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE: function _ZN5boost4asio6detail21write_buffer_sequenceIN11Botan_Tests10AsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEEEmRT_RKT0_RKT1_T2_RNS_6system10error_codeE called 2 returned 100% blocks executed 100% 2: 43: std::size_t write_buffer_sequence(SyncWriteStream& s, call 0 returned 100% -: 44: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 45: CompletionCondition completion_condition, boost::system::error_code& ec) -: 46: { 2: 47: ec = boost::system::error_code(); -: 48: boost::asio::detail::consuming_buffers tmp(buffers); 4: 50: while (!tmp.empty()) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 51: { 3: 52: if (std::size_t max_size = detail::adapt_completion_condition_result( branch 0 taken 67% (fallthrough) branch 1 taken 33% call 2 returned 100% -: 53: completion_condition(ec, tmp.total_consumed()))) 2: 54: tmp.consume(s.write_some(tmp.prepare(max_size), ec)); call 0 returned 100% -: 55: else -: 56: break; -: 57: } 2: 58: return tmp.total_consumed();; -: 59: } ------------------ -: 60:} // namespace detail -: 61: -: 62:template 13*: 64:inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, -: 65: CompletionCondition completion_condition, boost::system::error_code& ec, -: 66: typename enable_if< -: 67: is_const_buffer_sequence::value -: 68: >::type*) -: 69:{ 13*: 70: return detail::write_buffer_sequence(s, buffers, call 0 never executed call 1 returned 100% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) 26*: 71: boost::asio::buffer_sequence_begin(buffers), -: 72: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 73:} -: 74: -: 75:template -: 76:inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, -: 77: typename enable_if< -: 78: is_const_buffer_sequence::value -: 79: >::type*) -: 80:{ -: 81: boost::system::error_code ec; -: 82: std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec); -: 83: boost::asio::detail::throw_error(ec, "write"); -: 84: return bytes_transferred; -: 85:} -: 86: -: 87:template 13*: 88:inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, call 0 never executed call 1 returned 100% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) -: 89: boost::system::error_code& ec, -: 90: typename enable_if< -: 91: is_const_buffer_sequence::value -: 92: >::type*) -: 93:{ 13*: 94: return write(s, buffers, transfer_all(), ec); call 0 never executed branch 1 never executed branch 2 never executed call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 100% branch 7 taken 71% (fallthrough) branch 8 taken 29% call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) call 18 returned 100% branch 19 taken 100% (fallthrough) branch 20 taken 0% (throw) call 21 returned 100% branch 22 taken 100% (fallthrough) branch 23 taken 0% (throw) call 24 returned 100% branch 25 taken 100% (fallthrough) branch 26 taken 0% (throw) call 27 returned 100% branch 28 taken 100% (fallthrough) branch 29 taken 0% (throw) call 30 returned 100% branch 31 taken 100% (fallthrough) branch 32 taken 0% (throw) call 33 returned 100% branch 34 taken 100% (fallthrough) branch 35 taken 0% (throw) call 36 returned 100% branch 37 taken 100% (fallthrough) branch 38 taken 0% (throw) -: 95:} -: 96: -: 97:template -: 99:inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, -: 100: CompletionCondition completion_condition, -: 101: typename enable_if< -: 102: is_const_buffer_sequence::value -: 103: >::type*) -: 104:{ -: 105: boost::system::error_code ec; -: 106: std::size_t bytes_transferred = write(s, buffers, -: 107: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 108: boost::asio::detail::throw_error(ec, "write"); -: 109: return bytes_transferred; -: 110:} -: 111: -: 112:#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) -: 113: -: 114:template -: 116:std::size_t write(SyncWriteStream& s, -: 117: BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 118: CompletionCondition completion_condition, boost::system::error_code& ec, -: 119: typename enable_if< -: 120: is_dynamic_buffer_v1::type>::value -: 121: && !is_dynamic_buffer_v2::type>::value -: 122: >::type*) -: 123:{ -: 124: typename decay::type b( -: 125: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); -: 126: -: 127: std::size_t bytes_transferred = write(s, b.data(), -: 128: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 129: b.consume(bytes_transferred); -: 130: return bytes_transferred; -: 131:} -: 132: -: 133:template -: 134:inline std::size_t write(SyncWriteStream& s, -: 135: BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 136: typename enable_if< -: 137: is_dynamic_buffer_v1::type>::value -: 138: && !is_dynamic_buffer_v2::type>::value -: 139: >::type*) -: 140:{ -: 141: boost::system::error_code ec; -: 142: std::size_t bytes_transferred = write(s, -: 143: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), -: 144: transfer_all(), ec); -: 145: boost::asio::detail::throw_error(ec, "write"); -: 146: return bytes_transferred; -: 147:} -: 148: -: 149:template -: 150:inline std::size_t write(SyncWriteStream& s, -: 151: BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 152: boost::system::error_code& ec, -: 153: typename enable_if< -: 154: is_dynamic_buffer_v1::type>::value -: 155: && !is_dynamic_buffer_v2::type>::value -: 156: >::type*) -: 157:{ -: 158: return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), -: 159: transfer_all(), ec); -: 160:} -: 161: -: 162:template -: 164:inline std::size_t write(SyncWriteStream& s, -: 165: BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 166: CompletionCondition completion_condition, -: 167: typename enable_if< -: 168: is_dynamic_buffer_v1::type>::value -: 169: && !is_dynamic_buffer_v2::type>::value -: 170: >::type*) -: 171:{ -: 172: boost::system::error_code ec; -: 173: std::size_t bytes_transferred = write(s, -: 174: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), -: 175: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 176: boost::asio::detail::throw_error(ec, "write"); -: 177: return bytes_transferred; -: 178:} -: 179: -: 180:#if !defined(BOOST_ASIO_NO_EXTENSIONS) -: 181:#if !defined(BOOST_ASIO_NO_IOSTREAM) -: 182: -: 183:template -: 185:inline std::size_t write(SyncWriteStream& s, -: 186: boost::asio::basic_streambuf& b, -: 187: CompletionCondition completion_condition, boost::system::error_code& ec) -: 188:{ -: 189: return write(s, basic_streambuf_ref(b), -: 190: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 191:} -: 192: -: 193:template -: 194:inline std::size_t write(SyncWriteStream& s, -: 195: boost::asio::basic_streambuf& b) -: 196:{ -: 197: return write(s, basic_streambuf_ref(b)); -: 198:} -: 199: -: 200:template -: 201:inline std::size_t write(SyncWriteStream& s, -: 202: boost::asio::basic_streambuf& b, -: 203: boost::system::error_code& ec) -: 204:{ -: 205: return write(s, basic_streambuf_ref(b), ec); -: 206:} -: 207: -: 208:template -: 210:inline std::size_t write(SyncWriteStream& s, -: 211: boost::asio::basic_streambuf& b, -: 212: CompletionCondition completion_condition) -: 213:{ -: 214: return write(s, basic_streambuf_ref(b), -: 215: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)); -: 216:} -: 217: -: 218:#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -: 219:#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) -: 220:#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) -: 221: -: 222:template -: 224:std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, -: 225: CompletionCondition completion_condition, boost::system::error_code& ec, -: 226: typename enable_if< -: 227: is_dynamic_buffer_v2::value -: 228: >::type*) -: 229:{ -: 230: std::size_t bytes_transferred = write(s, buffers.data(0, buffers.size()), -: 231: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 232: buffers.consume(bytes_transferred); -: 233: return bytes_transferred; -: 234:} -: 235: -: 236:template -: 237:inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, -: 238: typename enable_if< -: 239: is_dynamic_buffer_v2::value -: 240: >::type*) -: 241:{ -: 242: boost::system::error_code ec; -: 243: std::size_t bytes_transferred = write(s, -: 244: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), -: 245: transfer_all(), ec); -: 246: boost::asio::detail::throw_error(ec, "write"); -: 247: return bytes_transferred; -: 248:} -: 249: -: 250:template -: 251:inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, -: 252: boost::system::error_code& ec, -: 253: typename enable_if< -: 254: is_dynamic_buffer_v2::value -: 255: >::type*) -: 256:{ -: 257: return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), -: 258: transfer_all(), ec); -: 259:} -: 260: -: 261:template -: 263:inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, -: 264: CompletionCondition completion_condition, -: 265: typename enable_if< -: 266: is_dynamic_buffer_v2::value -: 267: >::type*) -: 268:{ -: 269: boost::system::error_code ec; -: 270: std::size_t bytes_transferred = write(s, -: 271: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), -: 272: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); -: 273: boost::asio::detail::throw_error(ec, "write"); -: 274: return bytes_transferred; -: 275:} -: 276: -: 277:namespace detail -: 278:{ -: 279: template 2: 282: class write_op -: 283: : detail::base_from_completion_cond -: 284: { -: 285: public: 1: 286: write_op(AsyncWriteStream& stream, const ConstBufferSequence& buffers, -: 287: CompletionCondition& completion_condition, WriteHandler& handler) -: 288: : detail::base_from_completion_cond< -: 289: CompletionCondition>(completion_condition), -: 290: stream_(stream), -: 291: buffers_(buffers), -: 292: start_(0), 1: 293: handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)) call 0 returned 100% -: 294: { -: 295: } -: 296: -: 297:#if defined(BOOST_ASIO_HAS_MOVE) -: 298: write_op(const write_op& other) -: 299: : detail::base_from_completion_cond(other), -: 300: stream_(other.stream_), -: 301: buffers_(other.buffers_), -: 302: start_(other.start_), -: 303: handler_(other.handler_) -: 304: { -: 305: } -: 306: 30*: 307: write_op(write_op&& other) -: 308: : detail::base_from_completion_cond( -: 309: BOOST_ASIO_MOVE_CAST(detail::base_from_completion_cond< -: 310: CompletionCondition>)(other)), 30*: 311: stream_(other.stream_), 12: 312: buffers_(BOOST_ASIO_MOVE_CAST(buffers_type)(other.buffers_)), 30*: 313: start_(other.start_), 11*: 314: handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_)) call 0 never executed call 1 never executed call 2 never executed call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 never executed call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% (throw) call 14 never executed call 15 returned 100% call 16 returned 100% call 17 returned 100% call 18 returned 100% call 19 returned 100% branch 20 taken 0% (fallthrough) branch 21 taken 100% branch 22 taken 0% (fallthrough) branch 23 taken 100% branch 24 taken 0% (fallthrough) branch 25 taken 100% -: 315: { -: 316: } -: 317:#endif // defined(BOOST_ASIO_HAS_MOVE) -: 318: 9: 319: void operator()(const boost::system::error_code& ec, -: 320: std::size_t bytes_transferred, int start = 0) -: 321: { -: 322: std::size_t max_size; 9: 323: switch (start_ = start) -: 324: { 4: 325: case 1: 4: 326: max_size = this->check_for_completion(ec, buffers_.total_consumed()); -: 327: do -: 328: { 8: 329: stream_.async_write_some(buffers_.prepare(max_size), -: 330: BOOST_ASIO_MOVE_CAST(write_op)(*this)); 5: 331: return; default: 5: 332: buffers_.consume(bytes_transferred); 5*: 333: if ((!ec && bytes_transferred == 0) || buffers_.empty()) -: 334: break; 6*: 335: max_size = this->check_for_completion(ec, buffers_.total_consumed()); -: 336: } while (max_size > 0); -: 337: 4: 338: handler_(ec, buffers_.total_consumed()); -: 339: } -: 340: } ------------------ _ZN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEZNS3_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS3_4Test6ResultESaISC_EEEUlRKNS_6system10error_codeEmE_EclESJ_mi: function _ZN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEZNS3_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS3_4Test6ResultESaISC_EEEUlRKNS_6system10error_codeEmE_EclESJ_mi called 2 returned 100% blocks executed 91% 2: 319: void operator()(const boost::system::error_code& ec, -: 320: std::size_t bytes_transferred, int start = 0) -: 321: { -: 322: std::size_t max_size; 2: 323: switch (start_ = start) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 324: { 1: 325: case 1: 1: 326: max_size = this->check_for_completion(ec, buffers_.total_consumed()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 327: do -: 328: { 2: 329: stream_.async_write_some(buffers_.prepare(max_size), -: 330: BOOST_ASIO_MOVE_CAST(write_op)(*this)); 1: 331: return; default: 1: 332: buffers_.consume(bytes_transferred); branch 0 taken 0% (fallthrough) branch 1 taken 100% 1*: 333: if ((!ec && bytes_transferred == 0) || buffers_.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 334: break; 2: 335: max_size = this->check_for_completion(ec, buffers_.total_consumed()); call 0 returned 100% branch 1 taken 0% branch 2 taken 100% (fallthrough) -: 336: } while (max_size > 0); -: 337: 1: 338: handler_(ec, buffers_.total_consumed()); call 0 returned 100% -: 339: } -: 340: } ------------------ _ZN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEZNS3_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS3_4Test6ResultESaISC_EEEUlRKNS_6system10error_codeEmE_EclESJ_mi: function _ZN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEZNS3_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS3_4Test6ResultESaISC_EEEUlRKNS_6system10error_codeEmE_EclESJ_mi called 2 returned 100% blocks executed 82% 2: 319: void operator()(const boost::system::error_code& ec, -: 320: std::size_t bytes_transferred, int start = 0) -: 321: { -: 322: std::size_t max_size; 2: 323: switch (start_ = start) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 324: { 1: 325: case 1: 1: 326: max_size = this->check_for_completion(ec, buffers_.total_consumed()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 327: do -: 328: { 2: 329: stream_.async_write_some(buffers_.prepare(max_size), -: 330: BOOST_ASIO_MOVE_CAST(write_op)(*this)); 1: 331: return; default: 1: 332: buffers_.consume(bytes_transferred); branch 0 taken 0% (fallthrough) branch 1 taken 100% 1*: 333: if ((!ec && bytes_transferred == 0) || buffers_.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 334: break; 1*: 335: max_size = this->check_for_completion(ec, buffers_.total_consumed()); call 0 returned 100% branch 1 never executed branch 2 never executed -: 336: } while (max_size > 0); -: 337: 1: 338: handler_(ec, buffers_.total_consumed()); call 0 returned 100% -: 339: } -: 340: } ------------------ _ZN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS0_12const_bufferESaIS6_EEN9__gnu_cxx17__normal_iteratorIPKS6_S8_EENS1_14transfer_all_tEZNS3_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS5_INS3_4Test6ResultESaISH_EEEUlRKNS_6system10error_codeEmE_EclESO_mi: function _ZN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS0_12const_bufferESaIS6_EEN9__gnu_cxx17__normal_iteratorIPKS6_S8_EENS1_14transfer_all_tEZNS3_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS5_INS3_4Test6ResultESaISH_EEEUlRKNS_6system10error_codeEmE_EclESO_mi called 3 returned 100% blocks executed 100% 3: 319: void operator()(const boost::system::error_code& ec, -: 320: std::size_t bytes_transferred, int start = 0) -: 321: { -: 322: std::size_t max_size; 3: 323: switch (start_ = start) branch 0 taken 33% (fallthrough) branch 1 taken 67% -: 324: { 1: 325: case 1: 1: 326: max_size = this->check_for_completion(ec, buffers_.total_consumed()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 327: do -: 328: { 2: 329: stream_.async_write_some(buffers_.prepare(max_size), call 0 returned 100% -: 330: BOOST_ASIO_MOVE_CAST(write_op)(*this)); 2: 331: return; default: 2: 332: buffers_.consume(bytes_transferred); call 0 returned 100% 2: 333: if ((!ec && bytes_transferred == 0) || buffers_.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 50% (fallthrough) branch 5 taken 50% -: 334: break; 2: 335: max_size = this->check_for_completion(ec, buffers_.total_consumed()); call 0 returned 100% branch 1 taken 100% branch 2 taken 0% (fallthrough) -: 336: } while (max_size > 0); -: 337: 1: 338: handler_(ec, buffers_.total_consumed()); call 0 returned 100% -: 339: } -: 340: } ------------------ _ZN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEZNS3_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS3_4Test6ResultESaISC_EEEUlRKNS_6system10error_codeEmE_EclESJ_mi: function _ZN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS0_12const_bufferEPKS5_NS1_14transfer_all_tEZNS3_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS3_4Test6ResultESaISC_EEEUlRKNS_6system10error_codeEmE_EclESJ_mi called 2 returned 100% blocks executed 91% 2: 319: void operator()(const boost::system::error_code& ec, -: 320: std::size_t bytes_transferred, int start = 0) -: 321: { -: 322: std::size_t max_size; 2: 323: switch (start_ = start) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 324: { 1: 325: case 1: 1: 326: max_size = this->check_for_completion(ec, buffers_.total_consumed()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 327: do -: 328: { 2: 329: stream_.async_write_some(buffers_.prepare(max_size), -: 330: BOOST_ASIO_MOVE_CAST(write_op)(*this)); 1: 331: return; default: 1: 332: buffers_.consume(bytes_transferred); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 333: if ((!ec && bytes_transferred == 0) || buffers_.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 334: break; 1*: 335: max_size = this->check_for_completion(ec, buffers_.total_consumed()); call 0 returned 100% branch 1 never executed branch 2 never executed -: 336: } while (max_size > 0); -: 337: 1: 338: handler_(ec, buffers_.total_consumed()); call 0 returned 100% -: 339: } -: 340: } ------------------ -: 341: -: 342: //private: -: 343: typedef boost::asio::detail::consuming_buffers buffers_type; -: 345: -: 346: AsyncWriteStream& stream_; -: 347: buffers_type buffers_; -: 348: int start_; -: 349: WriteHandler handler_; -: 350: }; -: 351: -: 352: template -: 355: inline void* asio_handler_allocate(std::size_t size, -: 356: write_op* this_handler) -: 358: { -: 359: return boost_asio_handler_alloc_helpers::allocate( -: 360: size, this_handler->handler_); -: 361: } -: 362: -: 363: template -: 366: inline void asio_handler_deallocate(void* pointer, std::size_t size, -: 367: write_op* this_handler) -: 369: { -: 370: boost_asio_handler_alloc_helpers::deallocate( -: 371: pointer, size, this_handler->handler_); -: 372: } -: 373: -: 374: template -: 377: inline bool asio_handler_is_continuation( -: 378: write_op* this_handler) -: 380: { -: 381: return this_handler->start_ == 0 ? true -: 382: : boost_asio_handler_cont_helpers::is_continuation( -: 383: this_handler->handler_); -: 384: } -: 385: -: 386: template -: 389: inline void asio_handler_invoke(Function& function, -: 390: write_op* this_handler) -: 392: { -: 393: boost_asio_handler_invoke_helpers::invoke( -: 394: function, this_handler->handler_); -: 395: } -: 396: -: 397: template -: 400: inline void asio_handler_invoke(const Function& function, -: 401: write_op* this_handler) -: 403: { -: 404: boost_asio_handler_invoke_helpers::invoke( -: 405: function, this_handler->handler_); -: 406: } -: 407: -: 408: template function _ZN5boost4asio6detail30start_write_buffer_sequence_opIN11Botan_Tests10AsioStreamESt6vectorINS0_12const_bufferESaIS6_EEN9__gnu_cxx17__normal_iteratorIPKS6_S8_EENS1_14transfer_all_tEZNS3_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS5_INS3_4Test6ResultESaISH_EEEUlRKNS_6system10error_codeEmE_EEvRT_RKT0_RKT1_RT2_RT3_ called 1 returned 100% blocks executed 55% 1: 411: inline void start_write_buffer_sequence_op(AsyncWriteStream& stream, call 0 returned 100% -: 412: const ConstBufferSequence& buffers, const ConstBufferIterator&, -: 413: CompletionCondition& completion_condition, WriteHandler& handler) -: 414: { -: 415: detail::write_op( 1: 417: stream, buffers, completion_condition, handler)( call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 0% (fallthrough) branch 5 taken 100% branch 6 never executed branch 7 never executed -: 418: boost::system::error_code(), 0, 1); 1: 419: } -: 420: -: 421: struct initiate_async_write_buffer_sequence -: 422: { -: 423: template 3: 425: void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) -: 426: AsyncWriteStream* s, const ConstBufferSequence& buffers, -: 427: BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const -: 428: { -: 429: // If you get an error on the following line it means that your handler -: 430: // does not meet the documented type requirements for a WriteHandler. -: 431: BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check; -: 432: 3: 433: non_const_lvalue handler2(handler); 3: 434: non_const_lvalue completion_cond2(completion_cond); 3: 435: start_write_buffer_sequence_op(*s, buffers, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) 3: 436: boost::asio::buffer_sequence_begin(buffers), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) -: 437: completion_cond2.value, handler2.value); -: 438: } -: 439: }; -: 440:} // namespace detail -: 441: -: 442:#if !defined(GENERATING_DOCUMENTATION) -: 443: -: 444:template -: 447:struct associated_allocator< -: 448: detail::write_op, -: 450: Allocator> -: 451:{ -: 452: typedef typename associated_allocator::type type; -: 453: 5: 454: static type get( -: 455: const detail::write_op& h, -: 457: const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT -: 458: { 5: 459: return associated_allocator::get(h.handler_, a); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% -: 460: } -: 461:}; -: 462: -: 463:template -: 466:struct associated_executor< -: 467: detail::write_op, -: 469: Executor> -: 470:{ -: 471: typedef typename associated_executor::type type; -: 472: 5: 473: static type get( -: 474: const detail::write_op& h, -: 476: const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT -: 477: { 2: 478: return associated_executor::get(h.handler_, ex); call 0 returned 100% -: 479: } -: 480:}; -: 481: -: 482:#endif // !defined(GENERATING_DOCUMENTATION) -: 483: -: 484:template -: 486:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 487: void (boost::system::error_code, std::size_t)) -: 488:async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, -: 489: CompletionCondition completion_condition, -: 490: BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 491: typename enable_if< -: 492: is_const_buffer_sequence::value -: 493: >::type*) -: 494:{ -: 495: return async_initiate( -: 497: detail::initiate_async_write_buffer_sequence(), handler, &s, buffers, -: 498: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)); -: 499:} -: 500: -: 501:template -: 503:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 504: void (boost::system::error_code, std::size_t)) 4: 505:async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) -: 506: BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 507: typename enable_if< -: 508: is_const_buffer_sequence::value -: 509: >::type*) -: 510:{ -: 511: return async_initiate( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) call 18 returned 100% branch 19 taken 100% (fallthrough) branch 20 taken 0% (throw) -: 513: detail::initiate_async_write_buffer_sequence(), 1: 514: handler, &s, buffers, transfer_all()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 515:} -: 516: -: 517:#if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) -: 518: -: 519:namespace detail -: 520:{ -: 521: template -: 523: class write_dynbuf_v1_op -: 524: { -: 525: public: -: 526: template -: 527: write_dynbuf_v1_op(AsyncWriteStream& stream, -: 528: BOOST_ASIO_MOVE_ARG(BufferSequence) buffers, -: 529: CompletionCondition& completion_condition, WriteHandler& handler) -: 530: : stream_(stream), -: 531: buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)), -: 532: completion_condition_( -: 533: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)), -: 534: handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)) -: 535: { -: 536: } -: 537: -: 538:#if defined(BOOST_ASIO_HAS_MOVE) -: 539: write_dynbuf_v1_op(const write_dynbuf_v1_op& other) -: 540: : stream_(other.stream_), -: 541: buffers_(other.buffers_), -: 542: completion_condition_(other.completion_condition_), -: 543: handler_(other.handler_) -: 544: { -: 545: } -: 546: -: 547: write_dynbuf_v1_op(write_dynbuf_v1_op&& other) -: 548: : stream_(other.stream_), -: 549: buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(other.buffers_)), -: 550: completion_condition_( -: 551: BOOST_ASIO_MOVE_CAST(CompletionCondition)( -: 552: other.completion_condition_)), -: 553: handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_)) -: 554: { -: 555: } -: 556:#endif // defined(BOOST_ASIO_HAS_MOVE) -: 557: -: 558: void operator()(const boost::system::error_code& ec, -: 559: std::size_t bytes_transferred, int start = 0) -: 560: { -: 561: switch (start) -: 562: { -: 563: case 1: -: 564: async_write(stream_, buffers_.data(), -: 565: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition_), -: 566: BOOST_ASIO_MOVE_CAST(write_dynbuf_v1_op)(*this)); -: 567: return; default: -: 568: buffers_.consume(bytes_transferred); -: 569: handler_(ec, static_cast(bytes_transferred)); -: 570: } -: 571: } -: 572: -: 573: //private: -: 574: AsyncWriteStream& stream_; -: 575: DynamicBuffer_v1 buffers_; -: 576: CompletionCondition completion_condition_; -: 577: WriteHandler handler_; -: 578: }; -: 579: -: 580: template -: 582: inline void* asio_handler_allocate(std::size_t size, -: 583: write_dynbuf_v1_op* this_handler) -: 585: { -: 586: return boost_asio_handler_alloc_helpers::allocate( -: 587: size, this_handler->handler_); -: 588: } -: 589: -: 590: template -: 592: inline void asio_handler_deallocate(void* pointer, std::size_t size, -: 593: write_dynbuf_v1_op* this_handler) -: 595: { -: 596: boost_asio_handler_alloc_helpers::deallocate( -: 597: pointer, size, this_handler->handler_); -: 598: } -: 599: -: 600: template -: 602: inline bool asio_handler_is_continuation( -: 603: write_dynbuf_v1_op* this_handler) -: 605: { -: 606: return boost_asio_handler_cont_helpers::is_continuation( -: 607: this_handler->handler_); -: 608: } -: 609: -: 610: template -: 613: inline void asio_handler_invoke(Function& function, -: 614: write_dynbuf_v1_op* this_handler) -: 616: { -: 617: boost_asio_handler_invoke_helpers::invoke( -: 618: function, this_handler->handler_); -: 619: } -: 620: -: 621: template -: 624: inline void asio_handler_invoke(const Function& function, -: 625: write_dynbuf_v1_op* this_handler) -: 627: { -: 628: boost_asio_handler_invoke_helpers::invoke( -: 629: function, this_handler->handler_); -: 630: } -: 631: -: 632: struct initiate_async_write_dynbuf_v1 -: 633: { -: 634: template -: 636: void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 637: AsyncWriteStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 638: BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const -: 639: { -: 640: // If you get an error on the following line it means that your handler -: 641: // does not meet the documented type requirements for a WriteHandler. -: 642: BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check; -: 643: -: 644: non_const_lvalue handler2(handler); -: 645: non_const_lvalue completion_cond2(completion_cond); -: 646: write_dynbuf_v1_op::type, -: 648: CompletionCondition, typename decay::type>( -: 649: *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), -: 650: completion_cond2.value, handler2.value)( -: 651: boost::system::error_code(), 0, 1); -: 652: } -: 653: }; -: 654:} // namespace detail -: 655: -: 656:#if !defined(GENERATING_DOCUMENTATION) -: 657: -: 658:template -: 660:struct associated_allocator< -: 661: detail::write_dynbuf_v1_op, -: 663: Allocator> -: 664:{ -: 665: typedef typename associated_allocator::type type; -: 666: -: 667: static type get( -: 668: const detail::write_dynbuf_v1_op& h, -: 670: const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT -: 671: { -: 672: return associated_allocator::get(h.handler_, a); -: 673: } -: 674:}; -: 675: -: 676:template -: 678:struct associated_executor< -: 679: detail::write_dynbuf_v1_op, -: 681: Executor> -: 682:{ -: 683: typedef typename associated_executor::type type; -: 684: -: 685: static type get( -: 686: const detail::write_dynbuf_v1_op& h, -: 688: const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT -: 689: { -: 690: return associated_executor::get(h.handler_, ex); -: 691: } -: 692:}; -: 693: -: 694:#endif // !defined(GENERATING_DOCUMENTATION) -: 695: -: 696:template -: 698:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 699: void (boost::system::error_code, std::size_t)) -: 700:async_write(AsyncWriteStream& s, -: 701: BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 702: BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 703: typename enable_if< -: 704: is_dynamic_buffer_v1::type>::value -: 705: && !is_dynamic_buffer_v2::type>::value -: 706: >::type*) -: 707:{ -: 708: return async_write(s, -: 709: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), -: 710: transfer_all(), BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); -: 711:} -: 712: -: 713:template -: 715:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 716: void (boost::system::error_code, std::size_t)) -: 717:async_write(AsyncWriteStream& s, -: 718: BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, -: 719: CompletionCondition completion_condition, -: 720: BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 721: typename enable_if< -: 722: is_dynamic_buffer_v1::type>::value -: 723: && !is_dynamic_buffer_v2::type>::value -: 724: >::type*) -: 725:{ -: 726: return async_initiate( -: 728: detail::initiate_async_write_dynbuf_v1(), handler, &s, -: 729: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), -: 730: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)); -: 731:} -: 732: -: 733:#if !defined(BOOST_ASIO_NO_EXTENSIONS) -: 734:#if !defined(BOOST_ASIO_NO_IOSTREAM) -: 735: -: 736:template -: 737:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 738: void (boost::system::error_code, std::size_t)) -: 739:async_write(AsyncWriteStream& s, -: 740: boost::asio::basic_streambuf& b, -: 741: BOOST_ASIO_MOVE_ARG(WriteHandler) handler) -: 742:{ -: 743: return async_write(s, basic_streambuf_ref(b), -: 744: BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); -: 745:} -: 746: -: 747:template -: 749:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 750: void (boost::system::error_code, std::size_t)) -: 751:async_write(AsyncWriteStream& s, -: 752: boost::asio::basic_streambuf& b, -: 753: CompletionCondition completion_condition, -: 754: BOOST_ASIO_MOVE_ARG(WriteHandler) handler) -: 755:{ -: 756: return async_write(s, basic_streambuf_ref(b), -: 757: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), -: 758: BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); -: 759:} -: 760: -: 761:#endif // !defined(BOOST_ASIO_NO_IOSTREAM) -: 762:#endif // !defined(BOOST_ASIO_NO_EXTENSIONS) -: 763:#endif // !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) -: 764: -: 765:namespace detail -: 766:{ -: 767: template -: 769: class write_dynbuf_v2_op -: 770: { -: 771: public: -: 772: template -: 773: write_dynbuf_v2_op(AsyncWriteStream& stream, -: 774: BOOST_ASIO_MOVE_ARG(BufferSequence) buffers, -: 775: CompletionCondition& completion_condition, WriteHandler& handler) -: 776: : stream_(stream), -: 777: buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)), -: 778: completion_condition_( -: 779: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)), -: 780: handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)) -: 781: { -: 782: } -: 783: -: 784:#if defined(BOOST_ASIO_HAS_MOVE) -: 785: write_dynbuf_v2_op(const write_dynbuf_v2_op& other) -: 786: : stream_(other.stream_), -: 787: buffers_(other.buffers_), -: 788: completion_condition_(other.completion_condition_), -: 789: handler_(other.handler_) -: 790: { -: 791: } -: 792: -: 793: write_dynbuf_v2_op(write_dynbuf_v2_op&& other) -: 794: : stream_(other.stream_), -: 795: buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(other.buffers_)), -: 796: completion_condition_( -: 797: BOOST_ASIO_MOVE_CAST(CompletionCondition)( -: 798: other.completion_condition_)), -: 799: handler_(BOOST_ASIO_MOVE_CAST(WriteHandler)(other.handler_)) -: 800: { -: 801: } -: 802:#endif // defined(BOOST_ASIO_HAS_MOVE) -: 803: -: 804: void operator()(const boost::system::error_code& ec, -: 805: std::size_t bytes_transferred, int start = 0) -: 806: { -: 807: switch (start) -: 808: { -: 809: case 1: -: 810: async_write(stream_, buffers_.data(0, buffers_.size()), -: 811: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition_), -: 812: BOOST_ASIO_MOVE_CAST(write_dynbuf_v2_op)(*this)); -: 813: return; default: -: 814: buffers_.consume(bytes_transferred); -: 815: handler_(ec, static_cast(bytes_transferred)); -: 816: } -: 817: } -: 818: -: 819: //private: -: 820: AsyncWriteStream& stream_; -: 821: DynamicBuffer_v2 buffers_; -: 822: CompletionCondition completion_condition_; -: 823: WriteHandler handler_; -: 824: }; -: 825: -: 826: template -: 828: inline void* asio_handler_allocate(std::size_t size, -: 829: write_dynbuf_v2_op* this_handler) -: 831: { -: 832: return boost_asio_handler_alloc_helpers::allocate( -: 833: size, this_handler->handler_); -: 834: } -: 835: -: 836: template -: 838: inline void asio_handler_deallocate(void* pointer, std::size_t size, -: 839: write_dynbuf_v2_op* this_handler) -: 841: { -: 842: boost_asio_handler_alloc_helpers::deallocate( -: 843: pointer, size, this_handler->handler_); -: 844: } -: 845: -: 846: template -: 848: inline bool asio_handler_is_continuation( -: 849: write_dynbuf_v2_op* this_handler) -: 851: { -: 852: return boost_asio_handler_cont_helpers::is_continuation( -: 853: this_handler->handler_); -: 854: } -: 855: -: 856: template -: 859: inline void asio_handler_invoke(Function& function, -: 860: write_dynbuf_v2_op* this_handler) -: 862: { -: 863: boost_asio_handler_invoke_helpers::invoke( -: 864: function, this_handler->handler_); -: 865: } -: 866: -: 867: template -: 870: inline void asio_handler_invoke(const Function& function, -: 871: write_dynbuf_v2_op* this_handler) -: 873: { -: 874: boost_asio_handler_invoke_helpers::invoke( -: 875: function, this_handler->handler_); -: 876: } -: 877: -: 878: struct initiate_async_write_dynbuf_v2 -: 879: { -: 880: template -: 882: void operator()(BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 883: AsyncWriteStream* s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v2) buffers, -: 884: BOOST_ASIO_MOVE_ARG(CompletionCondition) completion_cond) const -: 885: { -: 886: // If you get an error on the following line it means that your handler -: 887: // does not meet the documented type requirements for a WriteHandler. -: 888: BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check; -: 889: -: 890: non_const_lvalue handler2(handler); -: 891: non_const_lvalue completion_cond2(completion_cond); -: 892: write_dynbuf_v2_op::type, -: 894: CompletionCondition, typename decay::type>( -: 895: *s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), -: 896: completion_cond2.value, handler2.value)( -: 897: boost::system::error_code(), 0, 1); -: 898: } -: 899: }; -: 900:} // namespace detail -: 901: -: 902:#if !defined(GENERATING_DOCUMENTATION) -: 903: -: 904:template -: 906:struct associated_allocator< -: 907: detail::write_dynbuf_v2_op, -: 909: Allocator> -: 910:{ -: 911: typedef typename associated_allocator::type type; -: 912: -: 913: static type get( -: 914: const detail::write_dynbuf_v2_op& h, -: 916: const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT -: 917: { -: 918: return associated_allocator::get(h.handler_, a); -: 919: } -: 920:}; -: 921: -: 922:template -: 924:struct associated_executor< -: 925: detail::write_dynbuf_v2_op, -: 927: Executor> -: 928:{ -: 929: typedef typename associated_executor::type type; -: 930: -: 931: static type get( -: 932: const detail::write_dynbuf_v2_op& h, -: 934: const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT -: 935: { -: 936: return associated_executor::get(h.handler_, ex); -: 937: } -: 938:}; -: 939: -: 940:#endif // !defined(GENERATING_DOCUMENTATION) -: 941: -: 942:template -: 944:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 945: void (boost::system::error_code, std::size_t)) -: 946:async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers, -: 947: BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 948: typename enable_if< -: 949: is_dynamic_buffer_v2::value -: 950: >::type*) -: 951:{ -: 952: return async_write(s, -: 953: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), -: 954: transfer_all(), BOOST_ASIO_MOVE_CAST(WriteHandler)(handler)); -: 955:} -: 956: -: 957:template -: 959:inline BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, -: 960: void (boost::system::error_code, std::size_t)) -: 961:async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers, -: 962: CompletionCondition completion_condition, -: 963: BOOST_ASIO_MOVE_ARG(WriteHandler) handler, -: 964: typename enable_if< -: 965: is_dynamic_buffer_v2::value -: 966: >::type*) -: 967:{ -: 968: return async_initiate( -: 970: detail::initiate_async_write_dynbuf_v2(), handler, &s, -: 971: BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), -: 972: BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition)); -: 973:} -: 974: -: 975:} // namespace asio -: 976:} // namespace boost -: 977: -: 978:#include -: 979: -: 980:#endif // BOOST_ASIO_IMPL_WRITE_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#pk_algs.cpp.gcov -: 0:Source:src/lib/pubkey/pk_algs.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_pk_algs.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_pk_algs.gcda -: 0:Runs:2947 -: 1:/* -: 2:* PK Key -: 3:* (C) 1999-2010,2016 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10: -: 11:#if defined(BOTAN_HAS_RSA) -: 12: #include -: 13:#endif -: 14: -: 15:#if defined(BOTAN_HAS_DSA) -: 16: #include -: 17:#endif -: 18: -: 19:#if defined(BOTAN_HAS_DL_GROUP) -: 20: #include -: 21:#endif -: 22: -: 23:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) -: 24: #include -: 25:#endif -: 26: -: 27:#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO) -: 28: #include -: 29:#endif -: 30: -: 31:#if defined(BOTAN_HAS_ECDSA) -: 32: #include -: 33:#endif -: 34: -: 35:#if defined(BOTAN_HAS_ECGDSA) -: 36: #include -: 37:#endif -: 38: -: 39:#if defined(BOTAN_HAS_ECKCDSA) -: 40: #include -: 41:#endif -: 42: -: 43:#if defined(BOTAN_HAS_ED25519) -: 44: #include -: 45:#endif -: 46: -: 47:#if defined(BOTAN_HAS_GOST_34_10_2001) -: 48: #include -: 49:#endif -: 50: -: 51:#if defined(BOTAN_HAS_ELGAMAL) -: 52: #include -: 53:#endif -: 54: -: 55:#if defined(BOTAN_HAS_ECDH) -: 56: #include -: 57:#endif -: 58: -: 59:#if defined(BOTAN_HAS_CURVE_25519) -: 60: #include -: 61:#endif -: 62: -: 63:#if defined(BOTAN_HAS_MCELIECE) -: 64: #include -: 65:#endif -: 66: -: 67:#if defined(BOTAN_HAS_XMSS_RFC8391) -: 68: #include -: 69:#endif -: 70: -: 71:#if defined(BOTAN_HAS_SM2) -: 72: #include -: 73:#endif -: 74: -: 75:#if defined(BOTAN_HAS_OPENSSL) -: 76: #include -: 77:#endif -: 78: -: 79:namespace Botan { -: 80: -: 81:std::unique_ptr function _ZN5Botan15load_public_keyERKNS_19AlgorithmIdentifierERKSt6vectorIhSaIhEE called 12187 returned 90% blocks executed 83% 12187: 82:load_public_key(const AlgorithmIdentifier& alg_id, -: 83: const std::vector& key_bits) -: 84: { 23144: 85: const std::string oid_str = alg_id.get_oid().to_formatted_string(); call 0 returned 100% 24374: 86: const std::vector alg_info = split_on(oid_str, '/'); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 1% (fallthrough) branch 4 taken 99% call 5 returned 100% 24374: 87: const std::string alg_name = alg_info[0]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 88: -: 89:#if defined(BOTAN_HAS_RSA) 12187: 90: if(alg_name == "RSA") call 0 returned 100% branch 1 taken 75% (fallthrough) branch 2 taken 25% 9158: 91: return std::unique_ptr(new RSA_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 92% (fallthrough) branch 5 taken 8% (throw) call 6 returned 100% -: 92:#endif -: 93: -: 94:#if defined(BOTAN_HAS_CURVE_25519) 3029: 95: if(alg_name == "Curve25519") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 23: 96: return std::unique_ptr(new Curve25519_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 97:#endif -: 98: -: 99:#if defined(BOTAN_HAS_MCELIECE) 3006: 100: if(alg_name == "McEliece") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% 4: 101: return std::unique_ptr(new McEliece_PublicKey(key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 102:#endif -: 103: -: 104:#if defined(BOTAN_HAS_ECDSA) 3002: 105: if(alg_name == "ECDSA") call 0 returned 100% branch 1 taken 56% (fallthrough) branch 2 taken 44% 1678: 106: return std::unique_ptr(new ECDSA_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 85% (fallthrough) branch 5 taken 15% (throw) call 6 returned 100% -: 107:#endif -: 108: -: 109:#if defined(BOTAN_HAS_ECDH) 1324: 110: if(alg_name == "ECDH") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 19: 111: return std::unique_ptr(new ECDH_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 95% (fallthrough) branch 5 taken 5% (throw) call 6 returned 100% -: 112:#endif -: 113: -: 114:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 1305: 115: if(alg_name == "DH") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 15: 116: return std::unique_ptr(new DH_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 33% (fallthrough) branch 5 taken 67% (throw) call 6 returned 100% -: 117:#endif -: 118: -: 119:#if defined(BOTAN_HAS_DSA) 1290: 120: if(alg_name == "DSA") call 0 returned 100% branch 1 taken 20% (fallthrough) branch 2 taken 80% 260: 121: return std::unique_ptr(new DSA_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 52% (fallthrough) branch 5 taken 48% (throw) call 6 returned 100% -: 122:#endif -: 123: -: 124:#if defined(BOTAN_HAS_ELGAMAL) 1030: 125: if(alg_name == "ElGamal") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 6: 126: return std::unique_ptr(new ElGamal_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 127:#endif -: 128: -: 129:#if defined(BOTAN_HAS_ECGDSA) 1024: 130: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% 65: 131: return std::unique_ptr(new ECGDSA_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 132:#endif -: 133: -: 134:#if defined(BOTAN_HAS_ECKCDSA) 959: 135: if(alg_name == "ECKCDSA") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% 56: 136: return std::unique_ptr(new ECKCDSA_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 137:#endif -: 138: -: 139:#if defined(BOTAN_HAS_ED25519) 903: 140: if(alg_name == "Ed25519") call 0 returned 100% branch 1 taken 81% (fallthrough) branch 2 taken 19% 729: 141: return std::unique_ptr(new Ed25519_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 142:#endif -: 143: -: 144:#if defined(BOTAN_HAS_GOST_34_10_2001) 467: 145: if(alg_name == "GOST-34.10" || alg_name == "GOST-34.10-2012-256" || alg_name == "GOST-34.10-2012-512") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 68% (fallthrough) branch 4 taken 32% branch 5 taken 0% (fallthrough) branch 6 taken 100% 55: 146: return std::unique_ptr(new GOST_3410_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 147:#endif -: 148: -: 149:#if defined(BOTAN_HAS_SM2) 323: 150: if(alg_name == "SM2" || alg_name == "SM2_Sig" || alg_name == "SM2_Enc") call 0 returned 100% branch 1 taken 86% branch 2 taken 14% branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 100% (fallthrough) branch 6 taken 0% 17: 151: return std::unique_ptr(new SM2_PublicKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 152:#endif -: 153: -: 154:#if defined(BOTAN_HAS_XMSS_RFC8391) 102: 155: if(alg_name == "XMSS") call 0 returned 100% branch 1 taken 21% branch 2 taken 79% 10957: 156: return std::unique_ptr(new XMSS_PublicKey(key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 1% (fallthrough) branch 7 taken 99% call 8 never executed -: 157:#endif -: 158: 162: 159: throw Decoding_Error("Unknown or unavailable public key algorithm " + alg_name); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% call 8 never executed -: 160: } -: 161: -: 162:std::unique_ptr function _ZN5Botan16load_private_keyERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE called 2170 returned 71% blocks executed 84% 2170: 163:load_private_key(const AlgorithmIdentifier& alg_id, -: 164: const secure_vector& key_bits) -: 165: { 3707: 166: const std::string alg_name = alg_id.get_oid().to_formatted_string(); call 0 returned 100% -: 167: -: 168:#if defined(BOTAN_HAS_RSA) 2170: 169: if(alg_name == "RSA") call 0 returned 100% branch 1 taken 48% (fallthrough) branch 2 taken 52% 1034: 170: return std::unique_ptr(new RSA_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 98% (fallthrough) branch 5 taken 2% (throw) call 6 returned 100% -: 171:#endif -: 172: -: 173:#if defined(BOTAN_HAS_CURVE_25519) 1136: 174: if(alg_name == "Curve25519") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% 28: 175: return std::unique_ptr(new Curve25519_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 93% (fallthrough) branch 5 taken 7% (throw) call 6 returned 100% -: 176:#endif -: 177: -: 178:#if defined(BOTAN_HAS_ECDSA) 1108: 179: if(alg_name == "ECDSA") call 0 returned 100% branch 1 taken 55% (fallthrough) branch 2 taken 45% 611: 180: return std::unique_ptr(new ECDSA_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 41% (fallthrough) branch 5 taken 59% (throw) call 6 returned 100% -: 181:#endif -: 182: -: 183:#if defined(BOTAN_HAS_ECDH) 497: 184: if(alg_name == "ECDH") call 0 returned 100% branch 1 taken 19% (fallthrough) branch 2 taken 81% 96: 185: return std::unique_ptr(new ECDH_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 65% (fallthrough) branch 5 taken 35% (throw) call 6 returned 100% -: 186:#endif -: 187: -: 188:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 401: 189: if(alg_name == "DH") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% 18: 190: return std::unique_ptr(new DH_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 44% (fallthrough) branch 5 taken 56% (throw) call 6 returned 100% -: 191:#endif -: 192: -: 193:#if defined(BOTAN_HAS_DSA) 383: 194: if(alg_name == "DSA") call 0 returned 100% branch 1 taken 55% (fallthrough) branch 2 taken 45% 211: 195: return std::unique_ptr(new DSA_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 36% (fallthrough) branch 5 taken 64% (throw) call 6 returned 100% -: 196:#endif -: 197: -: 198:#if defined(BOTAN_HAS_MCELIECE) 172: 199: if(alg_name == "McEliece") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% 4: 200: return std::unique_ptr(new McEliece_PrivateKey(key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 201:#endif -: 202: -: 203:#if defined(BOTAN_HAS_ECGDSA) 168: 204: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 11% (fallthrough) branch 2 taken 89% 18: 205: return std::unique_ptr(new ECGDSA_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 206:#endif -: 207: -: 208:#if defined(BOTAN_HAS_ECKCDSA) 150: 209: if(alg_name == "ECKCDSA") call 0 returned 100% branch 1 taken 12% (fallthrough) branch 2 taken 88% 18: 210: return std::unique_ptr(new ECKCDSA_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 211:#endif -: 212: -: 213:#if defined(BOTAN_HAS_ED25519) 132: 214: if(alg_name == "Ed25519") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% 4: 215: return std::unique_ptr(new Ed25519_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 25% (fallthrough) branch 5 taken 75% (throw) call 6 returned 100% -: 216:#endif -: 217: -: 218:#if defined(BOTAN_HAS_GOST_34_10_2001) 372: 219: if(alg_name == "GOST-34.10" || alg_name == "GOST-34.10-2012-256" || alg_name == "GOST-34.10-2012-512") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 91% (fallthrough) branch 4 taken 9% branch 5 taken 0% (fallthrough) branch 6 taken 100% 12: 220: return std::unique_ptr(new GOST_3410_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 221:#endif -: 222: -: 223:#if defined(BOTAN_HAS_SM2) 308: 224: if(alg_name == "SM2" || alg_name == "SM2_Sig" || alg_name == "SM2_Enc") call 0 returned 100% branch 1 taken 83% branch 2 taken 17% branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 100% (fallthrough) branch 6 taken 0% 20: 225: return std::unique_ptr(new SM2_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 226:#endif -: 227: -: 228:#if defined(BOTAN_HAS_ELGAMAL) 96: 229: if(alg_name == "ElGamal") call 0 returned 100% branch 1 taken 15% branch 2 taken 85% 14: 230: return std::unique_ptr(new ElGamal_PrivateKey(alg_id, key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 231:#endif -: 232: -: 233:#if defined(BOTAN_HAS_XMSS_RFC8391) 82: 234: if(alg_name == "XMSS") call 0 returned 100% branch 1 taken 12% (fallthrough) branch 2 taken 88% 1537: 235: return std::unique_ptr(new XMSS_PrivateKey(key_bits)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 1% (fallthrough) branch 7 taken 99% call 8 never executed -: 236:#endif -: 237: 144: 238: throw Decoding_Error("Unknown or unavailable public key algorithm " + alg_name); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% call 8 never executed -: 239: } -: 240: -: 241:#if defined(BOTAN_HAS_ECC_GROUP) -: 242: -: 243:namespace { -: 244: function _ZN5Botan12_GLOBAL__N_120default_ec_group_forERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 9 returned 100% blocks executed 80% 9: 245:std::string default_ec_group_for(const std::string& alg_name) -: 246: { 27: 247: if(alg_name == "SM2" || alg_name == "SM2_Enc" || alg_name == "SM2_Sig") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 0% (fallthrough) branch 6 taken 100% #####: 248: return "sm2p256v1"; call 0 never executed 18: 249: if(alg_name == "GOST-34.10" || alg_name == "GOST-34.10-2012-256") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 100% (fallthrough) branch 4 taken 0% #####: 250: return "gost_256A"; call 0 never executed 9: 251: if(alg_name == "GOST-34.10-2012-512") call 0 returned 100% branch 1 taken 0% branch 2 taken 100% #####: 252: return "gost_512A"; call 0 never executed 9: 253: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 254: return "brainpool256r1"; call 0 never executed 9: 255: return "secp256r1"; call 0 returned 100% -: 256: -: 257: } -: 258: -: 259:} -: 260: -: 261:#endif -: 262: -: 263:std::unique_ptr function _ZN5Botan18create_private_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_21RandomNumberGeneratorES7_S7_ called 203 returned 100% blocks executed 55% 203: 264:create_private_key(const std::string& alg_name, -: 265: RandomNumberGenerator& rng, -: 266: const std::string& params, -: 267: const std::string& provider) -: 268: { -: 269: /* -: 270: * Default paramaters are chosen for work factor > 2**128 where possible -: 271: */ -: 272: -: 273:#if defined(BOTAN_HAS_CURVE_25519) 203: 274: if(alg_name == "Curve25519") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 3: 275: return std::unique_ptr(new Curve25519_PrivateKey(rng)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 276:#endif -: 277: -: 278:#if defined(BOTAN_HAS_RSA) 200: 279: if(alg_name == "RSA") call 0 returned 100% branch 1 taken 18% (fallthrough) branch 2 taken 82% -: 280: { 35: 281: const size_t rsa_bits = (params.empty() ? 3072 : to_u32bit(params)); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 282:#if defined(BOTAN_HAS_OPENSSL) 40: 283: if(provider.empty() || provider == "openssl") branch 0 taken 14% (fallthrough) branch 1 taken 86% branch 2 taken 40% (fallthrough) branch 3 taken 60% -: 284: { 35: 285: std::unique_ptr pk; 32: 286: if((pk = make_openssl_rsa_private_key(rng, rsa_bits))) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% 32: 287: return pk; -: 288: #####: 289: if(!provider.empty()) branch 0 never executed branch 1 never executed 203*: 290: return nullptr; -: 291: } -: 292:#endif 3: 293: return std::unique_ptr(new RSA_PrivateKey(rng, rsa_bits)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 294: } -: 295:#endif -: 296: -: 297:#if defined(BOTAN_HAS_MCELIECE) 165: 298: if(alg_name == "McEliece") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 299: { 3: 300: std::vector mce_param = branch 0 taken 0% (fallthrough) branch 1 taken 100% 9*: 301: Botan::split_on(params.empty() ? "2960,57" : params, ','); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed branch 3 never executed branch 4 never executed call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 returned 100% call 9 never executed call 10 never executed -: 302: 3: 303: if(mce_param.size() != 2) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 304: throw Invalid_Argument("create_private_key bad McEliece parameters " + params); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 305: 3: 306: size_t mce_n = Botan::to_u32bit(mce_param[0]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 307: size_t mce_t = Botan::to_u32bit(mce_param[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 308: 3: 309: return std::unique_ptr(new Botan::McEliece_PrivateKey(rng, mce_n, mce_t)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed -: 310: } -: 311:#endif -: 312: -: 313:#if defined(BOTAN_HAS_XMSS_RFC8391) 162: 314: if(alg_name == "XMSS") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 315: { 3: 316: return std::unique_ptr( branch 0 taken 33% (fallthrough) branch 1 taken 67% 8: 317: new XMSS_PrivateKey(XMSS_Parameters(params.empty() ? "XMSS-SHA2_10_512" : params).oid(), rng)); branch 0 taken 33% (fallthrough) branch 1 taken 67% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% (throw) call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% (throw) call 14 returned 100% branch 15 taken 100% (fallthrough) branch 16 taken 0% call 17 never executed call 18 never executed branch 19 never executed branch 20 never executed call 21 never executed -: 318: } -: 319:#endif -: 320: -: 321:#if defined(BOTAN_HAS_ED25519) 159: 322: if(alg_name == "Ed25519") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 323: { 3: 324: return std::unique_ptr(new Ed25519_PrivateKey(rng)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 325: } -: 326:#endif -: 327: -: 328: // ECC crypto -: 329:#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO) -: 330: 156: 331: if(alg_name == "ECDSA" || call 0 returned 100% 129: 332: alg_name == "ECDH" || branch 0 taken 74% (fallthrough) branch 1 taken 26% 95: 333: alg_name == "ECKCDSA" || branch 0 taken 82% (fallthrough) branch 1 taken 18% 78: 334: alg_name == "ECGDSA" || branch 0 taken 78% (fallthrough) branch 1 taken 22% 61: 335: alg_name == "SM2" || branch 0 taken 93% (fallthrough) branch 1 taken 7% 57: 336: alg_name == "SM2_Sig" || branch 0 taken 88% (fallthrough) branch 1 taken 12% 50: 337: alg_name == "SM2_Enc" || branch 0 taken 98% (fallthrough) branch 1 taken 2% 49: 338: alg_name == "GOST-34.10" || branch 0 taken 78% (fallthrough) branch 1 taken 22% 194: 339: alg_name == "GOST-34.10-2012-256" || branch 0 taken 83% (fallthrough) branch 1 taken 17% branch 2 taken 100% (fallthrough) branch 3 taken 0% 38: 340: alg_name == "GOST-34.10-2012-512") branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 341: { 227*: 342: const EC_Group ec_group(params.empty() ? default_ec_group_for(alg_name) : params); branch 0 taken 8% (fallthrough) branch 1 taken 92% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed -: 343: -: 344:#if defined(BOTAN_HAS_ECDSA) 118: 345: if(alg_name == "ECDSA") call 0 returned 100% branch 1 taken 23% (fallthrough) branch 2 taken 77% 27: 346: return std::unique_ptr(new ECDSA_PrivateKey(rng, ec_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 347:#endif -: 348: -: 349:#if defined(BOTAN_HAS_ECDH) 91: 350: if(alg_name == "ECDH") call 0 returned 100% branch 1 taken 37% (fallthrough) branch 2 taken 63% 34: 351: return std::unique_ptr(new ECDH_PrivateKey(rng, ec_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 352:#endif -: 353: -: 354:#if defined(BOTAN_HAS_ECKCDSA) 57: 355: if(alg_name == "ECKCDSA") call 0 returned 100% branch 1 taken 30% (fallthrough) branch 2 taken 70% 17: 356: return std::unique_ptr(new ECKCDSA_PrivateKey(rng, ec_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 357:#endif -: 358: -: 359:#if defined(BOTAN_HAS_GOST_34_10_2001) 98: 360: if(alg_name == "GOST-34.10" || alg_name == "GOST-34.10-2012-256" || alg_name == "GOST-34.10-2012-512") call 0 returned 100% branch 1 taken 72% (fallthrough) branch 2 taken 28% branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 100% (fallthrough) branch 6 taken 0% 11: 361: return std::unique_ptr(new GOST_3410_PrivateKey(rng, ec_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 362:#endif -: 363: -: 364:#if defined(BOTAN_HAS_SM2) 72: 365: if(alg_name == "SM2" || alg_name == "SM2_Sig" || alg_name == "SM2_Enc") call 0 returned 100% branch 1 taken 86% branch 2 taken 14% branch 3 taken 72% (fallthrough) branch 4 taken 28% branch 5 taken 94% (fallthrough) branch 6 taken 6% 12: 366: return std::unique_ptr(new SM2_PrivateKey(rng, ec_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 367:#endif -: 368: -: 369:#if defined(BOTAN_HAS_ECGDSA) 17: 370: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 100% branch 2 taken 0% 17: 371: return std::unique_ptr(new ECGDSA_PrivateKey(rng, ec_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed call 12 never executed -: 372:#endif -: 373: } -: 374:#endif -: 375: -: 376: // DL crypto -: 377:#if defined(BOTAN_HAS_DL_GROUP) 65: 378: if(alg_name == "DH" || alg_name == "DSA" || alg_name == "ElGamal") call 0 returned 100% branch 1 taken 53% (fallthrough) branch 2 taken 47% branch 3 taken 35% (fallthrough) branch 4 taken 65% branch 5 taken 100% (fallthrough) branch 6 taken 0% -: 379: { 63*: 380: std::string default_group = (alg_name == "DSA") ? "dsa/botan/2048" : "modp/ietf/2048"; call 0 returned 100% branch 1 taken 66% (fallthrough) branch 2 taken 34% call 3 returned 100% 65*: 381: DL_Group modp_group(params.empty() ? default_group : params); branch 0 taken 71% (fallthrough) branch 1 taken 29% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 never executed branch 6 never executed -: 382: -: 383:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 38: 384: if(alg_name == "DH") call 0 returned 100% branch 1 taken 47% (fallthrough) branch 2 taken 53% 18: 385: return std::unique_ptr(new DH_PrivateKey(rng, modp_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 386:#endif -: 387: -: 388:#if defined(BOTAN_HAS_DSA) 20: 389: if(alg_name == "DSA") call 0 returned 100% branch 1 taken 65% (fallthrough) branch 2 taken 35% 13: 390: return std::unique_ptr(new DSA_PrivateKey(rng, modp_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 391:#endif -: 392: -: 393:#if defined(BOTAN_HAS_ELGAMAL) 7: 394: if(alg_name == "ElGamal") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% 7: 395: return std::unique_ptr(new ElGamal_PrivateKey(rng, modp_group)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed branch 12 never executed branch 13 never executed -: 396:#endif -: 397: } -: 398:#endif -: 399: #####: 400: BOTAN_UNUSED(alg_name, rng, params, provider); -: 401: 203*: 402: return std::unique_ptr(); -: 403: } -: 404: -: 405:std::vector function _ZN5Botan26probe_provider_private_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS5_SaIS5_EE called 29 returned 100% blocks executed 92% 29: 406:probe_provider_private_key(const std::string& alg_name, -: 407: const std::vector possible) -: 408: { 29: 409: std::vector providers; 145: 410: for(auto&& prov : possible) branch 0 taken 80% (fallthrough) branch 1 taken 20% call 2 returned 100% -: 411: { 116: 412: if(prov == "base" || call 0 returned 100% -: 413:#if defined(BOTAN_HAS_OPENSSL) 232: 414: (prov == "openssl" && alg_name == "RSA") || branch 0 taken 75% (fallthrough) branch 1 taken 25% branch 2 taken 33% (fallthrough) branch 3 taken 67% branch 4 taken 7% (fallthrough) branch 5 taken 93% -: 415:#endif -: 416: 0) -: 417: { 31: 418: providers.push_back(prov); // available call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 419: } -: 420: } -: 421: 29: 422: BOTAN_UNUSED(alg_name); -: 423: 29: 424: return providers; -: 425: } -: 426:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#cbc_mac.h.gcov -: 0:Source:build/include/botan/cbc_mac.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/mac.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/mac.gcda -: 0:Runs:2947 -: 1:/* -: 2:* CBC-MAC -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_CBC_MAC_H_ -: 9:#define BOTAN_CBC_MAC_H_ -: 10: -: 11:#include -: 12:#include -: 13: -: 14:BOTAN_FUTURE_INTERNAL_HEADER(cbc_mac.h) -: 15: -: 16:namespace Botan { -: 17: -: 18:/** -: 19:* CBC-MAC -: 20:*/ -: 21:class BOTAN_PUBLIC_API(2,0) CBC_MAC final : public MessageAuthenticationCode -: 22: { -: 23: public: -: 24: std::string name() const override; -: 25: MessageAuthenticationCode* clone() const override; function _ZNK5Botan7CBC_MAC13output_lengthEv called 0 returned 0% blocks executed 0% #####: 26: size_t output_length() const override { return m_cipher->block_size(); } call 0 never executed -: 27: void clear() override; -: 28: -: 29: Key_Length_Specification key_spec() const override -: 30: { -: 31: return m_cipher->key_spec(); -: 32: } -: 33: -: 34: /** -: 35: * @param cipher the block cipher to use -: 36: */ -: 37: explicit CBC_MAC(BlockCipher* cipher); -: 38: private: -: 39: void add_data(const uint8_t[], size_t) override; -: 40: void final_result(uint8_t[]) override; -: 41: void key_schedule(const uint8_t[], size_t) override; -: 42: -: 43: std::unique_ptr m_cipher; -: 44: secure_vector m_state; -: 45: size_t m_position = 0; -: 46: }; -: 47: -: 48:} -: 49: -: 50:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#math#bigint#big_ops3.cpp.gcov -: 0:Source:src/lib/math/bigint/big_ops3.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/math_bigint_big_ops3.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_bigint_big_ops3.gcda -: 0:Runs:2947 -: 1:/* -: 2:* BigInt Binary Operators -: 3:* (C) 1999-2007,2018 Jack Lloyd -: 4:* 2016 Matthias Gierlings -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14: -: 15:namespace Botan { -: 16: -: 17://static function _ZN5Botan6BigInt4add2ERKS0_PKmmNS0_4SignE called 3575395 returned 100% blocks executed 83% 3575395: 18:BigInt BigInt::add2(const BigInt& x, const word y[], size_t y_words, BigInt::Sign y_sign) -: 19: { 3575395: 20: const size_t x_sw = x.sig_words(); branch 0 taken 55% (fallthrough) branch 1 taken 45% -: 21: 3942488: 22: BigInt z(x.sign(), std::max(x_sw, y_words) + 1); branch 0 taken 10% (fallthrough) branch 1 taken 90% call 2 returned 100% -: 23: 3575395: 24: if(x.sign() == y_sign) branch 0 taken 72% (fallthrough) branch 1 taken 28% -: 25: { 2585998: 26: bigint_add3(z.mutable_data(), x.data(), x_sw, y, y_words); call 0 returned 100% -: 27: } -: 28: else -: 29: { 989397: 30: const int32_t relative_size = bigint_sub_abs(z.mutable_data(), x.data(), x_sw, y, y_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 31: -: 32: //z.sign_fixup(relative_size, y_sign); 989397: 33: if(relative_size < 0) branch 0 taken 41% (fallthrough) branch 1 taken 59% 401243: 34: z.set_sign(y_sign); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 588154: 35: else if(relative_size == 0) branch 0 taken 1% (fallthrough) branch 1 taken 100% 619: 36: z.set_sign(BigInt::Positive); -: 37: } -: 38: 3575395: 39: return z; -: 40: } -: 41: -: 42:/* -: 43:* Multiplication Operator -: 44:*/ function _ZN5BotanmlERKNS_6BigIntES2_ called 3058495 returned 100% blocks executed 80% 3058495: 45:BigInt operator*(const BigInt& x, const BigInt& y) -: 46: { 3058495: 47: const size_t x_sw = x.sig_words(); branch 0 taken 36% (fallthrough) branch 1 taken 64% 3058495: 48: const size_t y_sw = y.sig_words(); branch 0 taken 68% (fallthrough) branch 1 taken 32% -: 49: 3058495: 50: BigInt z(BigInt::Positive, x.size() + y.size()); call 0 returned 100% -: 51: 3058495: 52: if(x_sw == 1 && y_sw) branch 0 taken 67% (fallthrough) branch 1 taken 33% 4089408: 53: bigint_linmul3(z.mutable_data(), y.data(), y_sw, x.word_at(0)); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% 1013791: 54: else if(y_sw == 1 && x_sw) branch 0 taken 41% (fallthrough) branch 1 taken 59% 838022: 55: bigint_linmul3(z.mutable_data(), x.data(), x_sw, y.word_at(0)); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% 594780: 56: else if(x_sw && y_sw) branch 0 taken 93% (fallthrough) branch 1 taken 7% -: 57: { 1106712: 58: secure_vector workspace(z.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 59: 553356: 60: bigint_mul(z.mutable_data(), z.size(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 61: x.data(), x.size(), x_sw, -: 62: y.data(), y.size(), y_sw, -: 63: workspace.data(), workspace.size()); -: 64: } -: 65: 5238269: 66: z.cond_flip_sign(x_sw > 0 && y_sw > 0 && x.sign() != y.sign()); branch 0 taken 99% (fallthrough) branch 1 taken 1% branch 2 taken 72% (fallthrough) branch 3 taken 28% call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) -: 67: 3058495: 68: return z; -: 69: } -: 70: -: 71:/* -: 72:* Multiplication Operator -: 73:*/ function _ZN5BotanmlERKNS_6BigIntEm called 1188184 returned 100% blocks executed 75% 1188184: 74:BigInt operator*(const BigInt& x, word y) -: 75: { 1188184: 76: const size_t x_sw = x.sig_words(); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 77: 1188184: 78: BigInt z(BigInt::Positive, x_sw + 1); call 0 returned 100% -: 79: 1188184: 80: if(x_sw && y) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 81: { 594905: 82: bigint_linmul3(z.mutable_data(), x.data(), x_sw, y); call 0 returned 100% 594905: 83: z.set_sign(x.sign()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 84: } -: 85: 1188184: 86: return z; -: 87: } -: 88: -: 89:/* -: 90:* Division Operator -: 91:*/ function _ZN5BotandvERKNS_6BigIntES2_ called 3320 returned 100% blocks executed 62% 3320: 92:BigInt operator/(const BigInt& x, const BigInt& y) -: 93: { 5787: 94: if(y.sig_words() == 1) branch 0 taken 74% (fallthrough) branch 1 taken 26% branch 2 taken 76% (fallthrough) branch 3 taken 24% -: 95: { 5022: 96: return x / y.word_at(0); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 97: } -: 98: 4938: 99: BigInt q, r; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 809: 100: vartime_divide(x, y, q, r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 809: 101: return q; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 102: } -: 103: -: 104:/* -: 105:* Division Operator -: 106:*/ function _ZN5BotandvERKNS_6BigIntEm called 869497 returned 100% blocks executed 49% 869497: 107:BigInt operator/(const BigInt& x, word y) -: 108: { 869497: 109: if(y == 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 110: throw BigInt::DivideByZero(); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 869497: 111: else if(y == 1) branch 0 taken 1% (fallthrough) branch 1 taken 100% 84: 112: return x; call 0 returned 100% 869413: 113: else if(y == 2) branch 0 taken 100% (fallthrough) branch 1 taken 1% 866991: 114: return (x >> 1); call 0 returned 100% 2422: 115: else if(y <= 255) branch 0 taken 21% (fallthrough) branch 1 taken 79% -: 116: { 508: 117: BigInt q; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed 508: 118: uint8_t r; 508: 119: ct_divide_u8(x, static_cast(y), q, r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 508: 120: return q; -: 121: } -: 122: 873325: 123: BigInt q, r; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 1914: 124: vartime_divide(x, y, q, r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 never executed branch 7 never executed 1914: 125: return q; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 126: } -: 127: -: 128:/* -: 129:* Modulo Operator -: 130:*/ function _ZN5BotanrmERKNS_6BigIntES2_ called 983511 returned 100% blocks executed 46% 983511: 131:BigInt operator%(const BigInt& n, const BigInt& mod) -: 132: { 983587: 133: if(mod.is_zero()) branch 0 taken 1% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 134: throw BigInt::DivideByZero(); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 983511: 135: if(mod.is_negative()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 136: throw Invalid_Argument("BigInt::operator%: modulus must be > 0"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed 1936484: 137: if(n.is_positive() && mod.is_positive() && n < mod) branch 0 taken 97% (fallthrough) branch 1 taken 3% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 20% (fallthrough) branch 5 taken 80% 187416: 138: return n; call 0 returned 100% -: 139: 796095: 140: if(mod.sig_words() == 1) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 33% (fallthrough) branch 3 taken 67% -: 141: { 526978: 142: return n % mod.word_at(0); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% call 3 returned 100% -: 143: } -: 144: 1516117: 145: BigInt q, r; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 532606: 146: vartime_divide(n, mod, q, r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 532606: 147: return r; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 148: } -: 149: -: 150:/* -: 151:* Modulo Operator -: 152:*/ function _ZN5BotanrmERKNS_6BigIntEm called 2517319 returned 100% blocks executed 83% 2517319: 153:word operator%(const BigInt& n, word mod) -: 154: { 2517319: 155: if(mod == 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 156: throw BigInt::DivideByZero(); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 157: 2517319: 158: if(mod == 1) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 159: return 0; -: 160: 2517319: 161: word remainder = 0; -: 162: 2517319: 163: if(is_power_of_2(mod)) branch 0 taken 73% (fallthrough) branch 1 taken 27% -: 164: { 3689060: 165: remainder = (n.word_at(0) & (mod - 1)); branch 0 taken 100% branch 1 taken 0% -: 166: } -: 167: else -: 168: { 672789: 169: const size_t sw = n.sig_words(); branch 0 taken 1% branch 1 taken 100% 6520648: 170: for(size_t i = sw; i > 0; --i) branch 0 taken 90% (fallthrough) branch 1 taken 10% -: 171: { 11695718: 172: remainder = bigint_modop(remainder, n.word_at(i-1), mod); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 173: } -: 174: } -: 175: 2517319: 176: if(remainder && n.sign() == BigInt::Negative) branch 0 taken 99% (fallthrough) branch 1 taken 1% branch 2 taken 1% (fallthrough) branch 3 taken 99% 29945: 177: return mod - remainder; -: 178: return remainder; -: 179: } -: 180: -: 181:/* -: 182:* Left Shift Operator -: 183:*/ function _ZN5BotanlsERKNS_6BigIntEm called 536384 returned 100% blocks executed 75% 536384: 184:BigInt operator<<(const BigInt& x, size_t shift) -: 185: { 536384: 186: const size_t shift_words = shift / BOTAN_MP_WORD_BITS, 536384: 187: shift_bits = shift % BOTAN_MP_WORD_BITS; -: 188: 536384: 189: const size_t x_sw = x.sig_words(); branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 190: 1071981: 191: BigInt y(x.sign(), x_sw + shift_words + (shift_bits ? 1 : 0)); branch 0 taken 100% (fallthrough) branch 1 taken 1% call 2 returned 100% 536384: 192: bigint_shl2(y.mutable_data(), x.data(), x_sw, shift_words, shift_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 536384: 193: return y; -: 194: } -: 195: -: 196:/* -: 197:* Right Shift Operator -: 198:*/ function _ZN5BotanrsERKNS_6BigIntEm called 1054534 returned 100% blocks executed 81% 1054534: 199:BigInt operator>>(const BigInt& x, size_t shift) -: 200: { 1054534: 201: const size_t shift_words = shift / BOTAN_MP_WORD_BITS; 1054534: 202: const size_t shift_bits = shift % BOTAN_MP_WORD_BITS; 1054534: 203: const size_t x_sw = x.sig_words(); branch 0 taken 14% (fallthrough) branch 1 taken 86% -: 204: 1054534: 205: BigInt y(x.sign(), x_sw - shift_words); call 0 returned 100% 1054534: 206: bigint_shr2(y.mutable_data(), x.data(), x_sw, shift_words, shift_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 207: 1054564: 208: if(x.is_negative() && y.is_zero()) branch 0 taken 1% (fallthrough) branch 1 taken 100% branch 2 taken 27% (fallthrough) branch 3 taken 73% 8: 209: y.set_sign(BigInt::Positive); -: 210: 1054534: 211: return y; -: 212: } -: 213: -: 214:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#basic_waitable_timer.hpp.gcov -: 0:Source:/usr/include/boost/asio/basic_waitable_timer.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// basic_waitable_timer.hpp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_BASIC_WAITABLE_TIMER_HPP -: 12:#define BOOST_ASIO_BASIC_WAITABLE_TIMER_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22:#include -: 23:#include -: 24:#include -: 25:#include -: 26:#include -: 27:#include -: 28:#include -: 29: -: 30:#if defined(BOOST_ASIO_HAS_MOVE) -: 31:# include -: 32:#endif // defined(BOOST_ASIO_HAS_MOVE) -: 33: -: 34:#include -: 35: -: 36:namespace boost { -: 37:namespace asio { -: 38: -: 39:#if !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL) -: 40:#define BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL -: 41: -: 42:// Forward declaration with defaulted arguments. -: 43:template , -: 45: typename Executor = executor> -: 46:class basic_waitable_timer; -: 47: -: 48:#endif // !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL) -: 49: -: 50:/// Provides waitable timer functionality. -: 51:/** -: 52: * The basic_waitable_timer class template provides the ability to perform a -: 53: * blocking or asynchronous wait for a timer to expire. -: 54: * -: 55: * A waitable timer is always in one of two states: "expired" or "not expired". -: 56: * If the wait() or async_wait() function is called on an expired timer, the -: 57: * wait operation will complete immediately. -: 58: * -: 59: * Most applications will use one of the boost::asio::steady_timer, -: 60: * boost::asio::system_timer or boost::asio::high_resolution_timer typedefs. -: 61: * -: 62: * @note This waitable timer functionality is for use with the C++11 standard -: 63: * library's @c <chrono> facility, or with the Boost.Chrono library. -: 64: * -: 65: * @par Thread Safety -: 66: * @e Distinct @e objects: Safe.@n -: 67: * @e Shared @e objects: Unsafe. -: 68: * -: 69: * @par Examples -: 70: * Performing a blocking wait (C++11): -: 71: * @code -: 72: * // Construct a timer without setting an expiry time. -: 73: * boost::asio::steady_timer timer(my_context); -: 74: * -: 75: * // Set an expiry time relative to now. -: 76: * timer.expires_after(std::chrono::seconds(5)); -: 77: * -: 78: * // Wait for the timer to expire. -: 79: * timer.wait(); -: 80: * @endcode -: 81: * -: 82: * @par -: 83: * Performing an asynchronous wait (C++11): -: 84: * @code -: 85: * void handler(const boost::system::error_code& error) -: 86: * { -: 87: * if (!error) -: 88: * { -: 89: * // Timer expired. -: 90: * } -: 91: * } -: 92: * -: 93: * ... -: 94: * -: 95: * // Construct a timer with an absolute expiry time. -: 96: * boost::asio::steady_timer timer(my_context, -: 97: * std::chrono::steady_clock::now() + std::chrono::seconds(60)); -: 98: * -: 99: * // Start an asynchronous wait. -: 100: * timer.async_wait(handler); -: 101: * @endcode -: 102: * -: 103: * @par Changing an active waitable timer's expiry time -: 104: * -: 105: * Changing the expiry time of a timer while there are pending asynchronous -: 106: * waits causes those wait operations to be cancelled. To ensure that the action -: 107: * associated with the timer is performed only once, use something like this: -: 108: * used: -: 109: * -: 110: * @code -: 111: * void on_some_event() -: 112: * { -: 113: * if (my_timer.expires_after(seconds(5)) > 0) -: 114: * { -: 115: * // We managed to cancel the timer. Start new asynchronous wait. -: 116: * my_timer.async_wait(on_timeout); -: 117: * } -: 118: * else -: 119: * { -: 120: * // Too late, timer has already expired! -: 121: * } -: 122: * } -: 123: * -: 124: * void on_timeout(const boost::system::error_code& e) -: 125: * { -: 126: * if (e != boost::asio::error::operation_aborted) -: 127: * { -: 128: * // Timer was not cancelled, take necessary action. -: 129: * } -: 130: * } -: 131: * @endcode -: 132: * -: 133: * @li The boost::asio::basic_waitable_timer::expires_after() function -: 134: * cancels any pending asynchronous waits, and returns the number of -: 135: * asynchronous waits that were cancelled. If it returns 0 then you were too -: 136: * late and the wait handler has already been executed, or will soon be -: 137: * executed. If it returns 1 then the wait handler was successfully cancelled. -: 138: * -: 139: * @li If a wait handler is cancelled, the boost::system::error_code passed to -: 140: * it contains the value boost::asio::error::operation_aborted. -: 141: */ -: 142:template -: 143:class basic_waitable_timer -: 144:{ -: 145:public: -: 146: /// The type of the executor associated with the object. -: 147: typedef Executor executor_type; -: 148: -: 149: /// The clock type. -: 150: typedef Clock clock_type; -: 151: -: 152: /// The duration type of the clock. -: 153: typedef typename clock_type::duration duration; -: 154: -: 155: /// The time point type of the clock. -: 156: typedef typename clock_type::time_point time_point; -: 157: -: 158: /// The wait traits type. -: 159: typedef WaitTraits traits_type; -: 160: -: 161: /// Constructor. -: 162: /** -: 163: * This constructor creates a timer without setting an expiry time. The -: 164: * expires_at() or expires_after() functions must be called to set an expiry -: 165: * time before the timer can be waited on. -: 166: * -: 167: * @param ex The I/O executor that the timer will use, by default, to -: 168: * dispatch handlers for any asynchronous operations performed on the timer. -: 169: */ -: 170: explicit basic_waitable_timer(const executor_type& ex) -: 171: : impl_(ex) -: 172: { -: 173: } -: 174: -: 175: /// Constructor. -: 176: /** -: 177: * This constructor creates a timer without setting an expiry time. The -: 178: * expires_at() or expires_after() functions must be called to set an expiry -: 179: * time before the timer can be waited on. -: 180: * -: 181: * @param context An execution context which provides the I/O executor that -: 182: * the timer will use, by default, to dispatch handlers for any asynchronous -: 183: * operations performed on the timer. -: 184: */ -: 185: template 6: 186: explicit basic_waitable_timer(ExecutionContext& context, -: 187: typename enable_if< -: 188: is_convertible::value -: 189: >::type* = 0) 6: 190: : impl_(context) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 191: { 6: 192: } -: 193: -: 194: /// Constructor to set a particular expiry time as an absolute time. -: 195: /** -: 196: * This constructor creates a timer and sets the expiry time. -: 197: * -: 198: * @param ex The I/O executor object that the timer will use, by default, to -: 199: * dispatch handlers for any asynchronous operations performed on the timer. -: 200: * -: 201: * @param expiry_time The expiry time to be used for the timer, expressed -: 202: * as an absolute time. -: 203: */ -: 204: basic_waitable_timer(const executor_type& ex, const time_point& expiry_time) -: 205: : impl_(ex) -: 206: { -: 207: boost::system::error_code ec; -: 208: impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); -: 209: boost::asio::detail::throw_error(ec, "expires_at"); -: 210: } -: 211: -: 212: /// Constructor to set a particular expiry time as an absolute time. -: 213: /** -: 214: * This constructor creates a timer and sets the expiry time. -: 215: * -: 216: * @param context An execution context which provides the I/O executor that -: 217: * the timer will use, by default, to dispatch handlers for any asynchronous -: 218: * operations performed on the timer. -: 219: * -: 220: * @param expiry_time The expiry time to be used for the timer, expressed -: 221: * as an absolute time. -: 222: */ -: 223: template -: 224: explicit basic_waitable_timer(ExecutionContext& context, -: 225: const time_point& expiry_time, -: 226: typename enable_if< -: 227: is_convertible::value -: 228: >::type* = 0) -: 229: : impl_(context) -: 230: { -: 231: boost::system::error_code ec; -: 232: impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); -: 233: boost::asio::detail::throw_error(ec, "expires_at"); -: 234: } -: 235: -: 236: /// Constructor to set a particular expiry time relative to now. -: 237: /** -: 238: * This constructor creates a timer and sets the expiry time. -: 239: * -: 240: * @param ex The I/O executor that the timer will use, by default, to -: 241: * dispatch handlers for any asynchronous operations performed on the timer. -: 242: * -: 243: * @param expiry_time The expiry time to be used for the timer, relative to -: 244: * now. -: 245: */ -: 246: basic_waitable_timer(const executor_type& ex, const duration& expiry_time) -: 247: : impl_(ex) -: 248: { -: 249: boost::system::error_code ec; -: 250: impl_.get_service().expires_after( -: 251: impl_.get_implementation(), expiry_time, ec); -: 252: boost::asio::detail::throw_error(ec, "expires_after"); -: 253: } -: 254: -: 255: /// Constructor to set a particular expiry time relative to now. -: 256: /** -: 257: * This constructor creates a timer and sets the expiry time. -: 258: * -: 259: * @param context An execution context which provides the I/O executor that -: 260: * the timer will use, by default, to dispatch handlers for any asynchronous -: 261: * operations performed on the timer. -: 262: * -: 263: * @param expiry_time The expiry time to be used for the timer, relative to -: 264: * now. -: 265: */ -: 266: template -: 267: explicit basic_waitable_timer(ExecutionContext& context, -: 268: const duration& expiry_time, -: 269: typename enable_if< -: 270: is_convertible::value -: 271: >::type* = 0) -: 272: : impl_(context) -: 273: { -: 274: boost::system::error_code ec; -: 275: impl_.get_service().expires_after( -: 276: impl_.get_implementation(), expiry_time, ec); -: 277: boost::asio::detail::throw_error(ec, "expires_after"); -: 278: } -: 279: -: 280:#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) -: 281: /// Move-construct a basic_waitable_timer from another. -: 282: /** -: 283: * This constructor moves a timer from one object to another. -: 284: * -: 285: * @param other The other basic_waitable_timer object from which the move will -: 286: * occur. -: 287: * -: 288: * @note Following the move, the moved-from object is in the same state as if -: 289: * constructed using the @c basic_waitable_timer(const executor_type&) -: 290: * constructor. -: 291: */ -: 292: basic_waitable_timer(basic_waitable_timer&& other) -: 293: : impl_(std::move(other.impl_)) -: 294: { -: 295: } -: 296: -: 297: /// Move-assign a basic_waitable_timer from another. -: 298: /** -: 299: * This assignment operator moves a timer from one object to another. Cancels -: 300: * any outstanding asynchronous operations associated with the target object. -: 301: * -: 302: * @param other The other basic_waitable_timer object from which the move will -: 303: * occur. -: 304: * -: 305: * @note Following the move, the moved-from object is in the same state as if -: 306: * constructed using the @c basic_waitable_timer(const executor_type&) -: 307: * constructor. -: 308: */ -: 309: basic_waitable_timer& operator=(basic_waitable_timer&& other) -: 310: { -: 311: impl_ = std::move(other.impl_); -: 312: return *this; -: 313: } -: 314:#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) -: 315: -: 316: /// Destroys the timer. -: 317: /** -: 318: * This function destroys the timer, cancelling any outstanding asynchronous -: 319: * wait operations associated with the timer as if by calling @c cancel. -: 320: */ =====: 321: ~basic_waitable_timer() -: 322: { =====: 323: } call 0 never executed -: 324: -: 325: /// Get the executor associated with the object. -: 326: executor_type get_executor() BOOST_ASIO_NOEXCEPT -: 327: { -: 328: return impl_.get_executor(); -: 329: } -: 330: -: 331: /// Cancel any asynchronous operations that are waiting on the timer. -: 332: /** -: 333: * This function forces the completion of any pending asynchronous wait -: 334: * operations against the timer. The handler for each cancelled operation will -: 335: * be invoked with the boost::asio::error::operation_aborted error code. -: 336: * -: 337: * Cancelling the timer does not change the expiry time. -: 338: * -: 339: * @return The number of asynchronous operations that were cancelled. -: 340: * -: 341: * @throws boost::system::system_error Thrown on failure. -: 342: * -: 343: * @note If the timer has already expired when cancel() is called, then the -: 344: * handlers for asynchronous wait operations will: -: 345: * -: 346: * @li have already been invoked; or -: 347: * -: 348: * @li have been queued for invocation in the near future. -: 349: * -: 350: * These handlers can no longer be cancelled, and therefore are passed an -: 351: * error code that indicates the successful completion of the wait operation. -: 352: */ -: 353: std::size_t cancel() -: 354: { -: 355: boost::system::error_code ec; -: 356: std::size_t s = impl_.get_service().cancel(impl_.get_implementation(), ec); -: 357: boost::asio::detail::throw_error(ec, "cancel"); -: 358: return s; -: 359: } -: 360: -: 361:#if !defined(BOOST_ASIO_NO_DEPRECATED) -: 362: /// (Deprecated: Use non-error_code overload.) Cancel any asynchronous -: 363: /// operations that are waiting on the timer. -: 364: /** -: 365: * This function forces the completion of any pending asynchronous wait -: 366: * operations against the timer. The handler for each cancelled operation will -: 367: * be invoked with the boost::asio::error::operation_aborted error code. -: 368: * -: 369: * Cancelling the timer does not change the expiry time. -: 370: * -: 371: * @param ec Set to indicate what error occurred, if any. -: 372: * -: 373: * @return The number of asynchronous operations that were cancelled. -: 374: * -: 375: * @note If the timer has already expired when cancel() is called, then the -: 376: * handlers for asynchronous wait operations will: -: 377: * -: 378: * @li have already been invoked; or -: 379: * -: 380: * @li have been queued for invocation in the near future. -: 381: * -: 382: * These handlers can no longer be cancelled, and therefore are passed an -: 383: * error code that indicates the successful completion of the wait operation. -: 384: */ -: 385: std::size_t cancel(boost::system::error_code& ec) -: 386: { -: 387: return impl_.get_service().cancel(impl_.get_implementation(), ec); -: 388: } -: 389:#endif // !defined(BOOST_ASIO_NO_DEPRECATED) -: 390: -: 391: /// Cancels one asynchronous operation that is waiting on the timer. -: 392: /** -: 393: * This function forces the completion of one pending asynchronous wait -: 394: * operation against the timer. Handlers are cancelled in FIFO order. The -: 395: * handler for the cancelled operation will be invoked with the -: 396: * boost::asio::error::operation_aborted error code. -: 397: * -: 398: * Cancelling the timer does not change the expiry time. -: 399: * -: 400: * @return The number of asynchronous operations that were cancelled. That is, -: 401: * either 0 or 1. -: 402: * -: 403: * @throws boost::system::system_error Thrown on failure. -: 404: * -: 405: * @note If the timer has already expired when cancel_one() is called, then -: 406: * the handlers for asynchronous wait operations will: -: 407: * -: 408: * @li have already been invoked; or -: 409: * -: 410: * @li have been queued for invocation in the near future. -: 411: * -: 412: * These handlers can no longer be cancelled, and therefore are passed an -: 413: * error code that indicates the successful completion of the wait operation. -: 414: */ -: 415: std::size_t cancel_one() -: 416: { -: 417: boost::system::error_code ec; -: 418: std::size_t s = impl_.get_service().cancel_one( -: 419: impl_.get_implementation(), ec); -: 420: boost::asio::detail::throw_error(ec, "cancel_one"); -: 421: return s; -: 422: } -: 423: -: 424:#if !defined(BOOST_ASIO_NO_DEPRECATED) -: 425: /// (Deprecated: Use non-error_code overload.) Cancels one asynchronous -: 426: /// operation that is waiting on the timer. -: 427: /** -: 428: * This function forces the completion of one pending asynchronous wait -: 429: * operation against the timer. Handlers are cancelled in FIFO order. The -: 430: * handler for the cancelled operation will be invoked with the -: 431: * boost::asio::error::operation_aborted error code. -: 432: * -: 433: * Cancelling the timer does not change the expiry time. -: 434: * -: 435: * @param ec Set to indicate what error occurred, if any. -: 436: * -: 437: * @return The number of asynchronous operations that were cancelled. That is, -: 438: * either 0 or 1. -: 439: * -: 440: * @note If the timer has already expired when cancel_one() is called, then -: 441: * the handlers for asynchronous wait operations will: -: 442: * -: 443: * @li have already been invoked; or -: 444: * -: 445: * @li have been queued for invocation in the near future. -: 446: * -: 447: * These handlers can no longer be cancelled, and therefore are passed an -: 448: * error code that indicates the successful completion of the wait operation. -: 449: */ -: 450: std::size_t cancel_one(boost::system::error_code& ec) -: 451: { -: 452: return impl_.get_service().cancel_one(impl_.get_implementation(), ec); -: 453: } -: 454: -: 455: /// (Deprecated: Use expiry().) Get the timer's expiry time as an absolute -: 456: /// time. -: 457: /** -: 458: * This function may be used to obtain the timer's current expiry time. -: 459: * Whether the timer has expired or not does not affect this value. -: 460: */ 12: 461: time_point expires_at() const -: 462: { 12: 463: return impl_.get_service().expires_at(impl_.get_implementation()); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 464: } -: 465:#endif // !defined(BOOST_ASIO_NO_DEPRECATED) -: 466: -: 467: /// Get the timer's expiry time as an absolute time. -: 468: /** -: 469: * This function may be used to obtain the timer's current expiry time. -: 470: * Whether the timer has expired or not does not affect this value. -: 471: */ -: 472: time_point expiry() const -: 473: { -: 474: return impl_.get_service().expiry(impl_.get_implementation()); -: 475: } -: 476: -: 477: /// Set the timer's expiry time as an absolute time. -: 478: /** -: 479: * This function sets the expiry time. Any pending asynchronous wait -: 480: * operations will be cancelled. The handler for each cancelled operation will -: 481: * be invoked with the boost::asio::error::operation_aborted error code. -: 482: * -: 483: * @param expiry_time The expiry time to be used for the timer. -: 484: * -: 485: * @return The number of asynchronous operations that were cancelled. -: 486: * -: 487: * @throws boost::system::system_error Thrown on failure. -: 488: * -: 489: * @note If the timer has already expired when expires_at() is called, then -: 490: * the handlers for asynchronous wait operations will: -: 491: * -: 492: * @li have already been invoked; or -: 493: * -: 494: * @li have been queued for invocation in the near future. -: 495: * -: 496: * These handlers can no longer be cancelled, and therefore are passed an -: 497: * error code that indicates the successful completion of the wait operation. -: 498: */ -: 499: std::size_t expires_at(const time_point& expiry_time) -: 500: { -: 501: boost::system::error_code ec; -: 502: std::size_t s = impl_.get_service().expires_at( -: 503: impl_.get_implementation(), expiry_time, ec); -: 504: boost::asio::detail::throw_error(ec, "expires_at"); -: 505: return s; -: 506: } -: 507: -: 508:#if !defined(BOOST_ASIO_NO_DEPRECATED) -: 509: /// (Deprecated: Use non-error_code overload.) Set the timer's expiry time as -: 510: /// an absolute time. -: 511: /** -: 512: * This function sets the expiry time. Any pending asynchronous wait -: 513: * operations will be cancelled. The handler for each cancelled operation will -: 514: * be invoked with the boost::asio::error::operation_aborted error code. -: 515: * -: 516: * @param expiry_time The expiry time to be used for the timer. -: 517: * -: 518: * @param ec Set to indicate what error occurred, if any. -: 519: * -: 520: * @return The number of asynchronous operations that were cancelled. -: 521: * -: 522: * @note If the timer has already expired when expires_at() is called, then -: 523: * the handlers for asynchronous wait operations will: -: 524: * -: 525: * @li have already been invoked; or -: 526: * -: 527: * @li have been queued for invocation in the near future. -: 528: * -: 529: * These handlers can no longer be cancelled, and therefore are passed an -: 530: * error code that indicates the successful completion of the wait operation. -: 531: */ -: 532: std::size_t expires_at(const time_point& expiry_time, -: 533: boost::system::error_code& ec) -: 534: { -: 535: return impl_.get_service().expires_at( -: 536: impl_.get_implementation(), expiry_time, ec); -: 537: } -: 538:#endif // !defined(BOOST_ASIO_NO_DEPRECATED) -: 539: -: 540: /// Set the timer's expiry time relative to now. -: 541: /** -: 542: * This function sets the expiry time. Any pending asynchronous wait -: 543: * operations will be cancelled. The handler for each cancelled operation will -: 544: * be invoked with the boost::asio::error::operation_aborted error code. -: 545: * -: 546: * @param expiry_time The expiry time to be used for the timer. -: 547: * -: 548: * @return The number of asynchronous operations that were cancelled. -: 549: * -: 550: * @throws boost::system::system_error Thrown on failure. -: 551: * -: 552: * @note If the timer has already expired when expires_after() is called, -: 553: * then the handlers for asynchronous wait operations will: -: 554: * -: 555: * @li have already been invoked; or -: 556: * -: 557: * @li have been queued for invocation in the near future. -: 558: * -: 559: * These handlers can no longer be cancelled, and therefore are passed an -: 560: * error code that indicates the successful completion of the wait operation. -: 561: */ -: 562: std::size_t expires_after(const duration& expiry_time) -: 563: { -: 564: boost::system::error_code ec; -: 565: std::size_t s = impl_.get_service().expires_after( -: 566: impl_.get_implementation(), expiry_time, ec); -: 567: boost::asio::detail::throw_error(ec, "expires_after"); -: 568: return s; -: 569: } -: 570: -: 571:#if !defined(BOOST_ASIO_NO_DEPRECATED) -: 572: /// (Deprecated: Use expiry().) Get the timer's expiry time relative to now. -: 573: /** -: 574: * This function may be used to obtain the timer's current expiry time. -: 575: * Whether the timer has expired or not does not affect this value. -: 576: */ -: 577: duration expires_from_now() const -: 578: { -: 579: return impl_.get_service().expires_from_now(impl_.get_implementation()); -: 580: } -: 581: -: 582: /// (Deprecated: Use expires_after().) Set the timer's expiry time relative -: 583: /// to now. -: 584: /** -: 585: * This function sets the expiry time. Any pending asynchronous wait -: 586: * operations will be cancelled. The handler for each cancelled operation will -: 587: * be invoked with the boost::asio::error::operation_aborted error code. -: 588: * -: 589: * @param expiry_time The expiry time to be used for the timer. -: 590: * -: 591: * @return The number of asynchronous operations that were cancelled. -: 592: * -: 593: * @throws boost::system::system_error Thrown on failure. -: 594: * -: 595: * @note If the timer has already expired when expires_from_now() is called, -: 596: * then the handlers for asynchronous wait operations will: -: 597: * -: 598: * @li have already been invoked; or -: 599: * -: 600: * @li have been queued for invocation in the near future. -: 601: * -: 602: * These handlers can no longer be cancelled, and therefore are passed an -: 603: * error code that indicates the successful completion of the wait operation. -: 604: */ function _ZN5boost4asio20basic_waitable_timerINSt6chrono3_V212system_clockENS0_11wait_traitsIS4_EENS0_8executorEE16expires_from_nowERKNS2_8durationIlSt5ratioILl1ELl1000000000EEEE called 12 returned 100% blocks executed 80% 12: 605: std::size_t expires_from_now(const duration& expiry_time) call 0 returned 100% -: 606: { 12: 607: boost::system::error_code ec; 12: 608: std::size_t s = impl_.get_service().expires_from_now( call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 609: impl_.get_implementation(), expiry_time, ec); 12: 610: boost::asio::detail::throw_error(ec, "expires_from_now"); 12: 611: return s; -: 612: } -: 613: -: 614: /// (Deprecated: Use expires_after().) Set the timer's expiry time relative -: 615: /// to now. -: 616: /** -: 617: * This function sets the expiry time. Any pending asynchronous wait -: 618: * operations will be cancelled. The handler for each cancelled operation will -: 619: * be invoked with the boost::asio::error::operation_aborted error code. -: 620: * -: 621: * @param expiry_time The expiry time to be used for the timer. -: 622: * -: 623: * @param ec Set to indicate what error occurred, if any. -: 624: * -: 625: * @return The number of asynchronous operations that were cancelled. -: 626: * -: 627: * @note If the timer has already expired when expires_from_now() is called, -: 628: * then the handlers for asynchronous wait operations will: -: 629: * -: 630: * @li have already been invoked; or -: 631: * -: 632: * @li have been queued for invocation in the near future. -: 633: * -: 634: * These handlers can no longer be cancelled, and therefore are passed an -: 635: * error code that indicates the successful completion of the wait operation. -: 636: */ -: 637: std::size_t expires_from_now(const duration& expiry_time, -: 638: boost::system::error_code& ec) -: 639: { -: 640: return impl_.get_service().expires_from_now( -: 641: impl_.get_implementation(), expiry_time, ec); -: 642: } -: 643:#endif // !defined(BOOST_ASIO_NO_DEPRECATED) -: 644: -: 645: /// Perform a blocking wait on the timer. -: 646: /** -: 647: * This function is used to wait for the timer to expire. This function -: 648: * blocks and does not return until the timer has expired. -: 649: * -: 650: * @throws boost::system::system_error Thrown on failure. -: 651: */ -: 652: void wait() -: 653: { -: 654: boost::system::error_code ec; -: 655: impl_.get_service().wait(impl_.get_implementation(), ec); -: 656: boost::asio::detail::throw_error(ec, "wait"); -: 657: } -: 658: -: 659: /// Perform a blocking wait on the timer. -: 660: /** -: 661: * This function is used to wait for the timer to expire. This function -: 662: * blocks and does not return until the timer has expired. -: 663: * -: 664: * @param ec Set to indicate what error occurred, if any. -: 665: */ -: 666: void wait(boost::system::error_code& ec) -: 667: { -: 668: impl_.get_service().wait(impl_.get_implementation(), ec); -: 669: } -: 670: -: 671: /// Start an asynchronous wait on the timer. -: 672: /** -: 673: * This function may be used to initiate an asynchronous wait against the -: 674: * timer. It always returns immediately. -: 675: * -: 676: * For each call to async_wait(), the supplied handler will be called exactly -: 677: * once. The handler will be called when: -: 678: * -: 679: * @li The timer has expired. -: 680: * -: 681: * @li The timer was cancelled, in which case the handler is passed the error -: 682: * code boost::asio::error::operation_aborted. -: 683: * -: 684: * @param handler The handler to be called when the timer expires. Copies -: 685: * will be made of the handler as required. The function signature of the -: 686: * handler must be: -: 687: * @code void handler( -: 688: * const boost::system::error_code& error // Result of operation. -: 689: * ); @endcode -: 690: * Regardless of whether the asynchronous operation completes immediately or -: 691: * not, the handler will not be invoked from within this function. On -: 692: * immediate completion, invocation of the handler will be performed in a -: 693: * manner equivalent to using boost::asio::post(). -: 694: */ -: 695: template -: 696: BOOST_ASIO_INITFN_RESULT_TYPE(WaitHandler, -: 697: void (boost::system::error_code)) 18: 698: async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler) -: 699: { 18: 700: return async_initiate( call 0 returned 100% -: 701: initiate_async_wait(), handler, this); -: 702: } -: 703: -: 704:private: -: 705: // Disallow copying and assignment. -: 706: basic_waitable_timer(const basic_waitable_timer&) BOOST_ASIO_DELETED; -: 707: basic_waitable_timer& operator=( -: 708: const basic_waitable_timer&) BOOST_ASIO_DELETED; -: 709: -: 710: struct initiate_async_wait -: 711: { -: 712: template 18: 713: void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler, call 0 returned 100% -: 714: basic_waitable_timer* self) const -: 715: { -: 716: // If you get an error on the following line it means that your handler -: 717: // does not meet the documented type requirements for a WaitHandler. -: 718: BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check; -: 719: 18: 720: detail::non_const_lvalue handler2(handler); 18: 721: self->impl_.get_service().async_wait( call 0 returned 100% -: 722: self->impl_.get_implementation(), handler2.value, -: 723: self->impl_.get_implementation_executor()); -: 724: } -: 725: }; -: 726: -: 727: detail::io_object_impl< -: 728: detail::deadline_timer_service< -: 729: detail::chrono_time_traits >, -: 730: executor_type > impl_; -: 731:}; -: 732: -: 733:} // namespace asio -: 734:} // namespace boost -: 735: -: 736:#include -: 737: -: 738:#endif // BOOST_ASIO_BASIC_WAITABLE_TIMER_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#impl#epoll_reactor.hpp.gcov -: 0:Source:/usr/include/boost/asio/detail/impl/epoll_reactor.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2947 -: 1:// -: 2:// detail/impl/epoll_reactor.hpp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP -: 12:#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#if defined(BOOST_ASIO_HAS_EPOLL) -: 19: -: 20:#include -: 21: -: 22:namespace boost { -: 23:namespace asio { -: 24:namespace detail { -: 25: -: 26:template #####: 27:void epoll_reactor::add_timer_queue(timer_queue& queue) -: 28:{ #####: 29: do_add_timer_queue(queue); call 0 never executed -: 30:} -: 31: -: 32:template #####: 33:void epoll_reactor::remove_timer_queue(timer_queue& queue) -: 34:{ #####: 35: do_remove_timer_queue(queue); call 0 never executed -: 36:} -: 37: -: 38:template function _ZN5boost4asio6detail13epoll_reactor14schedule_timerINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS7_EEEEEEvRNS1_11timer_queueIT_EERKNSC_9time_typeERNSD_14per_timer_dataEPNS1_7wait_opE called 0 returned 0% blocks executed 0% #####: 39:void epoll_reactor::schedule_timer(timer_queue& queue, -: 40: const typename Time_Traits::time_type& time, -: 41: typename timer_queue::per_timer_data& timer, wait_op* op) -: 42:{ #####: 43: mutex::scoped_lock lock(mutex_); branch 0 never executed branch 1 never executed -: 44: #####: 45: if (shutdown_) branch 0 never executed branch 1 never executed -: 46: { #####: 47: scheduler_.post_immediate_completion(op, false); call 0 never executed #####: 48: return; branch 0 never executed branch 1 never executed -: 49: } -: 50: #####: 51: bool earliest = queue.enqueue_timer(time, timer, op); call 0 never executed branch 1 never executed branch 2 never executed #####: 52: scheduler_.work_started(); branch 0 never executed branch 1 never executed #####: 53: if (earliest) branch 0 never executed branch 1 never executed #####: 54: update_timeout(); call 0 never executed branch 1 never executed branch 2 never executed -: 55:} -: 56: -: 57:template function _ZN5boost4asio6detail13epoll_reactor12cancel_timerINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS7_EEEEEEmRNS1_11timer_queueIT_EERNSD_14per_timer_dataEm called 0 returned 0% blocks executed 0% #####: 58:std::size_t epoll_reactor::cancel_timer(timer_queue& queue, -: 59: typename timer_queue::per_timer_data& timer, -: 60: std::size_t max_cancelled) -: 61:{ #####: 62: mutex::scoped_lock lock(mutex_); branch 0 never executed branch 1 never executed call 2 never executed #####: 63: op_queue ops; call 0 never executed branch 1 never executed branch 2 never executed #####: 64: std::size_t n = queue.cancel_timer(timer, ops, max_cancelled); call 0 never executed #####: 65: lock.unlock(); branch 0 never executed branch 1 never executed #####: 66: scheduler_.post_deferred_completions(ops); call 0 never executed #####: 67: return n; -: 68:} -: 69: -: 70:template -: 71:void epoll_reactor::move_timer(timer_queue& queue, -: 72: typename timer_queue::per_timer_data& target, -: 73: typename timer_queue::per_timer_data& source) -: 74:{ -: 75: mutex::scoped_lock lock(mutex_); -: 76: op_queue ops; -: 77: queue.cancel_timer(target, ops); -: 78: queue.move_timer(target, source); -: 79: lock.unlock(); -: 80: scheduler_.post_deferred_completions(ops); -: 81:} -: 82: -: 83:} // namespace detail -: 84:} // namespace asio -: 85:} // namespace boost -: 86: -: 87:#include -: 88: -: 89:#endif // defined(BOOST_ASIO_HAS_EPOLL) -: 90: -: 91:#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#beast#core#detail#bind_handler.hpp.gcov -: 0:Source:/usr/include/boost/beast/core/detail/bind_handler.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcda -: 0:Runs:1 -: 1:// -: 2:// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) -: 3:// -: 4:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 5:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 6:// -: 7:// Official repository: https://github.com/boostorg/beast -: 8:// -: 9: -: 10:#ifndef BOOST_BEAST_DETAIL_BIND_HANDLER_HPP -: 11:#define BOOST_BEAST_DETAIL_BIND_HANDLER_HPP -: 12: -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22:#include -: 23:#include -: 24:#include -: 25:#include -: 26: -: 27:namespace boost { -: 28:namespace beast { -: 29:namespace detail { -: 30: -: 31://------------------------------------------------------------------------------ -: 32:// -: 33:// bind_handler -: 34:// -: 35://------------------------------------------------------------------------------ -: 36: -: 37:template -: 38:class bind_wrapper -: 39:{ -: 40: using args_type = detail::tuple; -: 41: -: 42: Handler h_; -: 43: args_type args_; -: 44: -: 45: template -: 46: friend struct net::associated_executor; -: 47: -: 48: template -: 49: friend struct net::associated_allocator; -: 50: -: 51: template -: 52: static -: 53: typename std::enable_if< -: 54: std::is_placeholder::type>::value == 0 && -: 56: boost::is_placeholder::type>::value == 0, -: 58: Arg&&>::type -: 59: extract(Arg&& arg, Vals&& vals) -: 60: { -: 61: boost::ignore_unused(vals); -: 62: return std::forward(arg); -: 63: } -: 64: -: 65: template -: 66: static -: 67: typename std::enable_if< -: 68: std::is_placeholder::type>::value != 0, -: 70: tuple_element::type>::value - 1, -: 72: Vals>>::type&& -: 73: extract(Arg&&, Vals&& vals) -: 74: { -: 75: return detail::get::type>::value - 1>( -: 77: std::forward(vals)); -: 78: } -: 79: -: 80: template -: 81: static -: 82: typename std::enable_if< -: 83: boost::is_placeholder::type>::value != 0, -: 85: tuple_element::type>::value - 1, -: 87: Vals>>::type&& -: 88: extract(Arg&&, Vals&& vals) -: 89: { -: 90: return detail::get::type>::value - 1>( -: 92: std::forward(vals)); -: 93: } -: 94: -: 95: template -: 96: static -: 97: void -: 98: invoke( -: 99: Handler& h, -: 100: ArgsTuple& args, -: 101: tuple<>&&, -: 102: mp11::index_sequence) -: 103: { -: 104: boost::ignore_unused(args); -: 105: h(detail::get(std::move(args))...); -: 106: } -: 107: -: 108: template< -: 109: class ArgsTuple, -: 110: class ValsTuple, -: 111: std::size_t... S> -: 112: static -: 113: void -: 114: invoke( -: 115: Handler& h, -: 116: ArgsTuple& args, -: 117: ValsTuple&& vals, -: 118: mp11::index_sequence) -: 119: { -: 120: boost::ignore_unused(args); -: 121: boost::ignore_unused(vals); -: 122: h(extract(detail::get(std::move(args)), -: 123: std::forward(vals))...); -: 124: } -: 125: -: 126:public: -: 127: using result_type = void; // asio needs this -: 128: -: 129: bind_wrapper(bind_wrapper&&) = default; -: 130: bind_wrapper(bind_wrapper const&) = default; -: 131: -: 132: template< -: 133: class DeducedHandler, -: 134: class... Args_> -: 135: explicit -: 136: bind_wrapper( -: 137: DeducedHandler&& handler, -: 138: Args_&&... args) -: 139: : h_(std::forward(handler)) -: 140: , args_(std::forward(args)...) -: 141: { -: 142: } -: 143: -: 144: template -: 145: void -: 146: operator()(Values&&... values) -: 147: { -: 148: invoke(h_, args_, -: 149: tuple( -: 150: std::forward(values)...), -: 151: mp11::index_sequence_for()); -: 152: } -: 153: -: 154: // -: 155: -: 156: template -: 157: friend -: 158: void asio_handler_invoke( -: 159: Function&& f, bind_wrapper* op) -: 160: { -: 161: using net::asio_handler_invoke; -: 162: asio_handler_invoke(f, std::addressof(op->h_)); -: 163: } -: 164: -: 165: friend -: 166: bool asio_handler_is_continuation( -: 167: bind