.github/workflows/ci.yml .gitignore .lgtm.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/api_ref/zfec.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/loongarch64.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/cli/zfec.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/sha3/sha3_round.h 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/misc/zfec/info.txt src/lib/misc/zfec/zfec.cpp src/lib/misc/zfec/zfec.h src/lib/misc/zfec/zfec_sse2/info.txt src/lib/misc/zfec/zfec_sse2/zfec_sse2.cpp src/lib/misc/zfec/zfec_vperm/info.txt src/lib/misc/zfec/zfec_vperm/zfec_vperm.cpp 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/argon2_ssse3/argon2_ssse3.cpp src/lib/pbkdf/argon2/argon2_ssse3/argon2_ssse3.h src/lib/pbkdf/argon2/argon2_ssse3/info.txt 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/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_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/data/zfec.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/test_zfec.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#mceliece.h.gcov -: 0:Source:build/include/botan/mceliece.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_mce_goppa_code.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_mce_goppa_code.gcda -: 0:Runs:2960 -: 1:/* -: 2: * (C) Copyright Projet SECRET, INRIA, Rocquencourt -: 3: * (C) Bhaskar Biswas and Nicolas Sendrier -: 4: * -: 5: * (C) 2014 cryptosource GmbH -: 6: * (C) 2014 Falko Strenzke fstrenzke@cryptosource.de -: 7: * -: 8: * Botan is released under the Simplified BSD License (see license.txt) -: 9: * -: 10: */ -: 11: -: 12:#ifndef BOTAN_MCELIECE_KEY_H_ -: 13:#define BOTAN_MCELIECE_KEY_H_ -: 14: -: 15:#include -: 16:#include -: 17: -: 18:namespace Botan { -: 19: -: 20:typedef uint16_t gf2m; -: 21: -: 22:class polyn_gf2m; -: 23: -: 24:class BOTAN_PUBLIC_API(2,0) McEliece_PublicKey : public virtual Public_Key -: 25: { -: 26: public: -: 27: explicit McEliece_PublicKey(const std::vector& key_bits); -: 28: -: 29: McEliece_PublicKey(const std::vector& pub_matrix, size_t t, size_t the_code_length) : -: 30: m_public_matrix(pub_matrix), -: 31: m_t(t), -: 32: m_code_length(the_code_length){} -: 33: -: 34: McEliece_PublicKey(const McEliece_PublicKey& other) = default; -: 35: McEliece_PublicKey& operator=(const McEliece_PublicKey& other) = default; -: 36: virtual ~McEliece_PublicKey()= default; -: 37: -: 38: secure_vector random_plaintext_element(RandomNumberGenerator& rng) const; -: 39: -: 40: std::string algo_name() const override { return "McEliece"; } -: 41: -: 42: AlgorithmIdentifier algorithm_identifier() const override; -: 43: -: 44: size_t key_length() const override; -: 45: size_t estimated_strength() const override; -: 46: -: 47: std::vector public_key_bits() const override; -: 48: -: 49: bool check_key(RandomNumberGenerator&, bool) const override -: 50: { return true; } -: 51: -: 52: size_t get_t() const { return m_t; } 12778: 53: size_t get_code_length() const { return m_code_length; } branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 54: size_t get_message_word_bit_length() const; -: 55: const std::vector& get_public_matrix() const { return m_public_matrix; } -: 56: -: 57: bool operator==(const McEliece_PublicKey& other) const; -: 58: bool operator!=(const McEliece_PublicKey& other) const { return !(*this == other); } -: 59: -: 60: std::unique_ptr -: 61: create_kem_encryption_op(RandomNumberGenerator& rng, -: 62: const std::string& params, -: 63: const std::string& provider) const override; -: 64: -: 65: protected: -: 66: McEliece_PublicKey() : m_t(0), m_code_length(0) {} -: 67: -: 68: std::vector m_public_matrix; -: 69: size_t m_t; -: 70: size_t m_code_length; -: 71: }; -: 72: -: 73:class BOTAN_PUBLIC_API(2,0) McEliece_PrivateKey final : public virtual McEliece_PublicKey, -: 74: public virtual Private_Key -: 75: { -: 76: public: -: 77: -: 78: /** -: 79: Generate a McEliece key pair -: 80: -: 81: Suggested parameters for a given security level (SL) -: 82: -: 83: SL=80 n=1632 t=33 - 59 KB pubkey 140 KB privkey -: 84: SL=107 n=2480 t=45 - 128 KB pubkey 300 KB privkey -: 85: SL=128 n=2960 t=57 - 195 KB pubkey 459 KB privkey -: 86: SL=147 n=3408 t=67 - 265 KB pubkey 622 KB privkey -: 87: SL=191 n=4624 t=95 - 516 KB pubkey 1234 KB privkey -: 88: SL=256 n=6624 t=115 - 942 KB pubkey 2184 KB privkey -: 89: */ -: 90: McEliece_PrivateKey(RandomNumberGenerator& rng, size_t code_length, size_t t); -: 91: -: 92: explicit McEliece_PrivateKey(const secure_vector& key_bits); -: 93: -: 94: McEliece_PrivateKey(polyn_gf2m const& goppa_polyn, -: 95: std::vector const& parity_check_matrix_coeffs, -: 96: std::vector const& square_root_matrix, -: 97: std::vector const& inverse_support, -: 98: std::vector const& public_matrix ); -: 99: -: 100: ~McEliece_PrivateKey(); -: 101: -: 102: bool check_key(RandomNumberGenerator& rng, bool strong) const override; -: 103: -: 104: polyn_gf2m const& get_goppa_polyn() const; 6389: 105: std::vector const& get_H_coeffs() const { return m_coeffs; } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6389: 106: std::vector const& get_Linv() const { return m_Linv; } 6389: 107: std::vector const& get_sqrtmod() const { return m_sqrtmod; } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 108: 6389: 109: inline size_t get_dimension() const { return m_dimension; } call 0 returned 100% -: 110: 6389: 111: inline size_t get_codimension() const { return m_codimension; } call 0 returned 100% -: 112: -: 113: secure_vector private_key_bits() const override; -: 114: -: 115: bool operator==(const McEliece_PrivateKey & other) const; -: 116: -: 117: bool operator!=(const McEliece_PrivateKey& other) const { return !(*this == other); } -: 118: -: 119: std::unique_ptr -: 120: create_kem_decryption_op(RandomNumberGenerator& rng, -: 121: const std::string& params, -: 122: const std::string& provider) const override; -: 123: private: -: 124: std::vector m_g; // single element -: 125: std::vector m_sqrtmod; -: 126: std::vector m_Linv; -: 127: std::vector m_coeffs; -: 128: -: 129: size_t m_codimension; -: 130: size_t m_dimension; -: 131: }; -: 132: -: 133:/** -: 134:* Estimate work factor for McEliece -: 135:* @return estimated security level for these key parameters -: 136:*/ -: 137:BOTAN_PUBLIC_API(2,0) size_t mceliece_work_factor(size_t code_size, size_t t); -: 138: -: 139:} -: 140: -: 141:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#ip#basic_resolver_query.hpp.gcov -: 0:Source:/usr/include/boost/asio/ip/basic_resolver_query.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcda -: 0:Runs:2960 -: 1:// -: 2:// ip/basic_resolver_query.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_QUERY_HPP -: 12:#define BOOST_ASIO_IP_BASIC_RESOLVER_QUERY_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:namespace ip { -: 28: -: 29:/// An query to be passed to a resolver. -: 30:/** -: 31: * The boost::asio::ip::basic_resolver_query class template describes a query -: 32: * that can be passed to a resolver. -: 33: * -: 34: * @par Thread Safety -: 35: * @e Distinct @e objects: Safe.@n -: 36: * @e Shared @e objects: Unsafe. -: 37: */ -: 38:template -: 39:class basic_resolver_query -: 40: : public resolver_query_base -: 41:{ -: 42:public: -: 43: /// The protocol type associated with the endpoint query. -: 44: typedef InternetProtocol protocol_type; -: 45: -: 46: /// Construct with specified service name for any protocol. -: 47: /** -: 48: * This constructor is typically used to perform name resolution for local -: 49: * service binding. -: 50: * -: 51: * @param service A string identifying the requested service. This may be a -: 52: * descriptive name or a numeric string corresponding to a port number. -: 53: * -: 54: * @param resolve_flags A set of flags that determine how name resolution -: 55: * should be performed. The default flags are suitable for local service -: 56: * binding. -: 57: * -: 58: * @note On POSIX systems, service names are typically defined in the file -: 59: * /etc/services. On Windows, service names may be found in the file -: 60: * c:\\windows\\system32\\drivers\\etc\\services. Operating systems -: 61: * may use additional locations when resolving service names. -: 62: */ -: 63: basic_resolver_query(const std::string& service, -: 64: resolver_query_base::flags resolve_flags = passive | address_configured) -: 65: : hints_(), -: 66: host_name_(), -: 67: service_name_(service) -: 68: { -: 69: typename InternetProtocol::endpoint endpoint; -: 70: hints_.ai_flags = static_cast(resolve_flags); -: 71: hints_.ai_family = PF_UNSPEC; -: 72: hints_.ai_socktype = endpoint.protocol().type(); -: 73: hints_.ai_protocol = endpoint.protocol().protocol(); -: 74: hints_.ai_addrlen = 0; -: 75: hints_.ai_canonname = 0; -: 76: hints_.ai_addr = 0; -: 77: hints_.ai_next = 0; -: 78: } -: 79: -: 80: /// Construct with specified service name for a given protocol. -: 81: /** -: 82: * This constructor is typically used to perform name resolution for local -: 83: * service binding with a specific protocol version. -: 84: * -: 85: * @param protocol A protocol object, normally representing either the IPv4 or -: 86: * IPv6 version of an internet protocol. -: 87: * -: 88: * @param service A string identifying the requested service. This may be a -: 89: * descriptive name or a numeric string corresponding to a port number. -: 90: * -: 91: * @param resolve_flags A set of flags that determine how name resolution -: 92: * should be performed. The default flags are suitable for local service -: 93: * binding. -: 94: * -: 95: * @note On POSIX systems, service names are typically defined in the file -: 96: * /etc/services. On Windows, service names may be found in the file -: 97: * c:\\windows\\system32\\drivers\\etc\\services. Operating systems -: 98: * may use additional locations when resolving service names. -: 99: */ -: 100: basic_resolver_query(const protocol_type& protocol, -: 101: const std::string& service, -: 102: resolver_query_base::flags resolve_flags = passive | address_configured) -: 103: : hints_(), -: 104: host_name_(), -: 105: service_name_(service) -: 106: { -: 107: hints_.ai_flags = static_cast(resolve_flags); -: 108: hints_.ai_family = protocol.family(); -: 109: hints_.ai_socktype = protocol.type(); -: 110: hints_.ai_protocol = protocol.protocol(); -: 111: hints_.ai_addrlen = 0; -: 112: hints_.ai_canonname = 0; -: 113: hints_.ai_addr = 0; -: 114: hints_.ai_next = 0; -: 115: } -: 116: -: 117: /// Construct with specified host name and service name for any protocol. -: 118: /** -: 119: * This constructor is typically used to perform name resolution for -: 120: * communication with remote hosts. -: 121: * -: 122: * @param host A string identifying a location. May be a descriptive name or -: 123: * a numeric address string. If an empty string and the passive flag has been -: 124: * specified, the resolved endpoints are suitable for local service binding. -: 125: * If an empty string and passive is not specified, the resolved endpoints -: 126: * will use the loopback address. -: 127: * -: 128: * @param service A string identifying the requested service. This may be a -: 129: * descriptive name or a numeric string corresponding to a port number. May -: 130: * be an empty string, in which case all resolved endpoints will have a port -: 131: * number of 0. -: 132: * -: 133: * @param resolve_flags A set of flags that determine how name resolution -: 134: * should be performed. The default flags are suitable for communication with -: 135: * remote hosts. -: 136: * -: 137: * @note On POSIX systems, host names may be locally defined in the file -: 138: * /etc/hosts. On Windows, host names may be defined in the file -: 139: * c:\\windows\\system32\\drivers\\etc\\hosts. Remote host name -: 140: * resolution is performed using DNS. Operating systems may use additional -: 141: * locations when resolving host names (such as NETBIOS names on Windows). -: 142: * -: 143: * On POSIX systems, service names are typically defined in the file -: 144: * /etc/services. On Windows, service names may be found in the file -: 145: * c:\\windows\\system32\\drivers\\etc\\services. Operating systems -: 146: * may use additional locations when resolving service names. -: 147: */ function _ZN5boost4asio2ip20basic_resolver_queryINS1_3tcpEEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_NS1_13resolver_base5flagsE called 1 returned 100% blocks executed 62% 1: 148: basic_resolver_query(const std::string& host, const std::string& service, -: 149: resolver_query_base::flags resolve_flags = address_configured) -: 150: : hints_(), -: 151: host_name_(host), 2: 152: service_name_(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 -: 153: { 1: 154: typename InternetProtocol::endpoint endpoint; 1: 155: hints_.ai_flags = static_cast(resolve_flags); 1: 156: hints_.ai_family = BOOST_ASIO_OS_DEF(AF_UNSPEC); 1: 157: hints_.ai_socktype = endpoint.protocol().type(); 1: 158: hints_.ai_protocol = endpoint.protocol().protocol(); 1: 159: hints_.ai_addrlen = 0; 1: 160: hints_.ai_canonname = 0; 1: 161: hints_.ai_addr = 0; 1: 162: hints_.ai_next = 0; 1: 163: } -: 164: -: 165: /// Construct with specified host name and service name for a given protocol. -: 166: /** -: 167: * This constructor is typically used to perform name resolution for -: 168: * communication with remote hosts. -: 169: * -: 170: * @param protocol A protocol object, normally representing either the IPv4 or -: 171: * IPv6 version of an internet protocol. -: 172: * -: 173: * @param host A string identifying a location. May be a descriptive name or -: 174: * a numeric address string. If an empty string and the passive flag has been -: 175: * specified, the resolved endpoints are suitable for local service binding. -: 176: * If an empty string and passive is not specified, the resolved endpoints -: 177: * will use the loopback address. -: 178: * -: 179: * @param service A string identifying the requested service. This may be a -: 180: * descriptive name or a numeric string corresponding to a port number. May -: 181: * be an empty string, in which case all resolved endpoints will have a port -: 182: * number of 0. -: 183: * -: 184: * @param resolve_flags A set of flags that determine how name resolution -: 185: * should be performed. The default flags are suitable for communication with -: 186: * remote hosts. -: 187: * -: 188: * @note On POSIX systems, host names may be locally defined in the file -: 189: * /etc/hosts. On Windows, host names may be defined in the file -: 190: * c:\\windows\\system32\\drivers\\etc\\hosts. Remote host name -: 191: * resolution is performed using DNS. Operating systems may use additional -: 192: * locations when resolving host names (such as NETBIOS names on Windows). -: 193: * -: 194: * On POSIX systems, service names are typically defined in the file -: 195: * /etc/services. On Windows, service names may be found in the file -: 196: * c:\\windows\\system32\\drivers\\etc\\services. Operating systems -: 197: * may use additional locations when resolving service names. -: 198: */ -: 199: basic_resolver_query(const protocol_type& protocol, -: 200: const std::string& host, const std::string& service, -: 201: resolver_query_base::flags resolve_flags = address_configured) -: 202: : hints_(), -: 203: host_name_(host), -: 204: service_name_(service) -: 205: { -: 206: hints_.ai_flags = static_cast(resolve_flags); -: 207: hints_.ai_family = protocol.family(); -: 208: hints_.ai_socktype = protocol.type(); -: 209: hints_.ai_protocol = protocol.protocol(); -: 210: hints_.ai_addrlen = 0; -: 211: hints_.ai_canonname = 0; -: 212: hints_.ai_addr = 0; -: 213: hints_.ai_next = 0; -: 214: } -: 215: -: 216: /// Get the hints associated with the query. 1: 217: const boost::asio::detail::addrinfo_type& hints() const -: 218: { 1: 219: return hints_; call 0 returned 100% -: 220: } -: 221: -: 222: /// Get the host name associated with the query. 2: 223: std::string host_name() const -: 224: { 4: 225: return host_name_; 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) -: 226: } -: 227: -: 228: /// Get the service name associated with the query. 2: 229: std::string service_name() const -: 230: { 3: 231: return service_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% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) -: 232: } -: 233: -: 234:private: -: 235: boost::asio::detail::addrinfo_type hints_; -: 236: std::string host_name_; -: 237: std::string service_name_; -: 238:}; -: 239: -: 240:} // namespace ip -: 241:} // namespace asio -: 242:} // namespace boost -: 243: -: 244:#include -: 245: -: 246:#endif // BOOST_ASIO_IP_BASIC_RESOLVER_QUERY_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#utils#thread_utils#semaphore.cpp.gcov -: 0:Source:src/lib/utils/thread_utils/semaphore.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_thread_utils_semaphore.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_thread_utils_semaphore.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Semaphore -: 3:* (C) 2013 Joel Low -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9: -: 10:// Based on code by Pierre Gaston (http://p9as.blogspot.com/2012/06/c11-semaphores.html) -: 11: -: 12:namespace Botan { -: 13: function _ZN5Botan9Semaphore7releaseEm called 922 returned 100% blocks executed 89% 922: 14:void Semaphore::release(size_t n) -: 15: { 5526: 16: for(size_t i = 0; i != n; ++i) branch 0 taken 83% (fallthrough) branch 1 taken 17% -: 17: { 9208: 18: std::lock_guard lock(m_mutex); call 0 returned 100% -: 19: 4604: 20: if(m_value++ < 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 21: { #####: 22: ++m_wakeups; #####: 23: m_cond.notify_one(); call 0 never executed -: 24: } -: 25: } 922: 26: } -: 27: function _ZN5Botan9Semaphore7acquireEv called 4604 returned 100% blocks executed 50% 4604: 28:void Semaphore::acquire() -: 29: { 4604: 30: std::unique_lock lock(m_mutex); call 0 returned 100% 4604: 31: if(m_value-- <= 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 32: { #####: 33: m_cond.wait(lock, [this] { return m_wakeups > 0; }); branch 0 never executed branch 1 never executed #####: 34: --m_wakeups; -: 35: } 4604: 36: } -: 37: -: 38:} <<<<<< 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:2960 -: 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#tests#main.cpp.gcov -: 0:Source:src/tests/main.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/main.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/main.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2015 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "../cli/argparse.h" -: 8:#include "test_runner.h" -: 9:#include "tests.h" -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14: -: 15:#include -: 16: -: 17:namespace { -: 18: function _ZN12_GLOBAL__N_19help_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 19:std::string help_text(const std::string& spec) -: 20: { #####: 21: std::ostringstream err; call 0 never executed call 1 never executed -: 22: #####: 23: err << "Usage: " << spec << "\n\n" call 0 never executed branch 1 never executed branch 2 never executed -: 24: << "Available test suites\n" #####: 25: << "----------------\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 branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed -: 26: #####: 27: size_t line_len = 0; -: 28: #####: 29: for(auto const& test : Botan_Tests::Test::registered_tests()) 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 -: 30: { #####: 31: err << test << " "; call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 32: line_len += test.size() + 1; branch 0 never executed branch 1 never executed -: 33: #####: 34: if(line_len > 64) branch 0 never executed branch 1 never executed -: 35: { #####: 36: err << "\n"; call 0 never executed branch 1 never executed branch 2 never executed -: 37: line_len = 0; -: 38: } -: 39: } -: 40: #####: 41: if(line_len > 0) branch 0 never executed branch 1 never executed -: 42: { #####: 43: err << "\n"; call 0 never executed branch 1 never executed branch 2 never executed -: 44: } -: 45: #####: 46: return err.str(); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 47: } -: 48: -: 49:} -: 50: function main called 1 returned 100% blocks executed 34% 1: 51:int main(int argc, char* argv[]) -: 52: { 1: 53: std::cerr << Botan::runtime_version_check(BOTAN_VERSION_MAJOR, BOTAN_VERSION_MINOR, BOTAN_VERSION_PATCH); 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% call 6 never executed -: 54: 1: 55: try -: 56: { 1: 57: const std::string arg_spec = -: 58: "botan-test --verbose --help --data-dir= --pkcs11-lib= --provider= " -: 59: "--log-success --abort-on-first-fail --no-avoid-undefined --skip-tests= " -: 60: "--test-threads=0 --run-long-tests --run-online-tests --test-runs=1 --drbg-seed= " 2: 61: "*suites"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 62: 3: 63: Botan_CLI::Argument_Parser parser(arg_spec); 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% call 7 never executed branch 8 never executed branch 9 never executed -: 64: 1: 65: parser.parse_args(std::vector(argv + 1, argv + argc)); 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% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 never executed -: 66: 2: 67: if(parser.flag_set("help")) 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% -: 68: { #####: 69: std::cout << help_text(arg_spec); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 70: return 0; -: 71: } -: 72: -: 73:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_HAS_THREAD_UTILS) -: 74: /* -: 75: The mlock pool becomes a major contention point when many threads are running, -: 76: so disable it unless it was explicitly asked for via setting the env variable -: 77: */ 1: 78: if(parser.get_arg_sz("test-threads") != 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) branch 6 taken 0% (fallthrough) branch 7 taken 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% -: 79: { 1: 80: ::setenv("BOTAN_MLOCK_POOL_SIZE", "0", /*overwrite=*/0); call 0 returned 100% -: 81: } -: 82:#endif -: 83: 1: 84: const Botan_Tests::Test_Options opts( 2: 85: parser.get_arg_list("suites"), 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 returned 100% branch 9 never executed branch 10 never executed 2: 86: parser.get_arg_list("skip-tests"), 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 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed 2: 87: parser.get_arg_or("data-dir", "src/tests/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) 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 taken 100% (fallthrough) branch 14 taken 0% branch 15 never executed branch 16 never executed 2: 88: parser.get_arg("pkcs11-lib"), 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 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed 1: 89: parser.get_arg("provider"), 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 2: 90: parser.get_arg("drbg-seed"), 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 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed -: 91: parser.get_arg_sz("test-runs"), -: 92: parser.get_arg_sz("test-threads"), 1: 93: parser.flag_set("verbose"), branch 0 taken 0% (fallthrough) branch 1 taken 100% 1: 94: parser.flag_set("log-success"), branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 95: parser.flag_set("run-online-tests"), branch 0 taken 0% (fallthrough) branch 1 taken 100% 1: 96: parser.flag_set("run-long-tests"), branch 0 taken 100% (fallthrough) branch 1 taken 0% 9: 97: parser.flag_set("abort-on-first-fail")); 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) 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) branch 30 taken 0% (fallthrough) branch 31 taken 100% branch 32 taken 0% (fallthrough) branch 33 taken 100% call 34 returned 100% call 35 never executed -: 98: 1: 99: Botan_Tests::Test_Runner tests(std::cout); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 100: 1: 101: return tests.run(opts); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 102: } =====: 103: catch(std::exception& e) call 0 never executed call 1 never executed -: 104: { =====: 105: std::cerr << "Exiting with error: " << e.what() << std::endl; call 0 never executed branch 1 never executed branch 2 never executed call 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 -: 106: } =====: 107: catch(...) call 0 never executed call 1 never executed -: 108: { =====: 109: std::cerr << "Exiting with unknown exception" << std::endl; 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 -: 110: } -: 111: return 2; -: 112: } <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#basic_ios.h.gcov -: 0:Source:/usr/include/c++/9/bits/basic_ios.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_data_src.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_data_src.gcda -: 0:Runs:2960 -: 1:// Iostreams base classes -*- C++ -*- -: 2: -: 3:// Copyright (C) 1997-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/basic_ios.h -: 26: * This is an internal header file, included by other library headers. -: 27: * Do not attempt to use it directly. @headername{ios} -: 28: */ -: 29: -: 30:#ifndef _BASIC_IOS_H -: 31:#define _BASIC_IOS_H 1 -: 32: -: 33:#pragma GCC system_header -: 34: -: 35:#include -: 36:#include -: 37:#include -: 38:#include -: 39:#include -: 40: -: 41:namespace std _GLIBCXX_VISIBILITY(default) -: 42:{ -: 43:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 44: -: 45: template -: 46: inline const _Facet& -: 47: __check_facet(const _Facet* __f) -: 48: { -: 49: if (!__f) -: 50: __throw_bad_cast(); -: 51: return *__f; -: 52: } -: 53: -: 54: /** -: 55: * @brief Template class basic_ios, virtual base class for all -: 56: * stream classes. -: 57: * @ingroup io -: 58: * -: 59: * @tparam _CharT Type of character stream. -: 60: * @tparam _Traits Traits for character type, defaults to -: 61: * char_traits<_CharT>. -: 62: * -: 63: * Most of the member functions called dispatched on stream objects -: 64: * (e.g., @c std::cout.foo(bar);) are consolidated in this class. -: 65: */ -: 66: template -: 67: class basic_ios : public ios_base -: 68: { -: 69: public: -: 70: //@{ -: 71: /** -: 72: * These are standard types. They permit a standardized way of -: 73: * referring to names of (or names dependent on) the template -: 74: * parameters, which are specific to the implementation. -: 75: */ -: 76: typedef _CharT char_type; -: 77: typedef typename _Traits::int_type int_type; -: 78: typedef typename _Traits::pos_type pos_type; -: 79: typedef typename _Traits::off_type off_type; -: 80: typedef _Traits traits_type; -: 81: //@} -: 82: -: 83: //@{ -: 84: /** -: 85: * These are non-standard types. -: 86: */ -: 87: typedef ctype<_CharT> __ctype_type; -: 88: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > -: 89: __num_put_type; -: 90: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > -: 91: __num_get_type; -: 92: //@} -: 93: -: 94: // Data members: -: 95: protected: -: 96: basic_ostream<_CharT, _Traits>* _M_tie; -: 97: mutable char_type _M_fill; -: 98: mutable bool _M_fill_init; -: 99: basic_streambuf<_CharT, _Traits>* _M_streambuf; -: 100: -: 101: // Cached use_facet, which is based on the current locale info. -: 102: const __ctype_type* _M_ctype; -: 103: // For ostream. -: 104: const __num_put_type* _M_num_put; -: 105: // For istream. -: 106: const __num_get_type* _M_num_get; -: 107: -: 108: public: -: 109: //@{ -: 110: /** -: 111: * @brief The quick-and-easy status check. -: 112: * -: 113: * This allows you to write constructs such as -: 114: * if (!a_stream) ... and while (a_stream) ... -: 115: */ -: 116:#if __cplusplus >= 201103L -: 117: explicit operator bool() const -: 118: { return !this->fail(); } -: 119:#else -: 120: operator void*() const -: 121: { return this->fail() ? 0 : const_cast(this); } -: 122:#endif -: 123: -: 124: bool -: 125: operator!() const -: 126: { return this->fail(); } -: 127: //@} -: 128: -: 129: /** -: 130: * @brief Returns the error state of the stream buffer. -: 131: * @return A bit pattern (well, isn't everything?) -: 132: * -: 133: * See std::ios_base::iostate for the possible bit values. Most -: 134: * users will call one of the interpreting wrappers, e.g., good(). -: 135: */ -: 136: iostate 6427484*: 137: rdstate() const -: 138: { return _M_streambuf_state; } -: 139: -: 140: /** -: 141: * @brief [Re]sets the error state. -: 142: * @param __state The new state flag(s) to set. -: 143: * -: 144: * See std::ios_base::iostate for the possible bit values. Most -: 145: * users will not need to pass an argument. -: 146: */ -: 147: void -: 148: clear(iostate __state = goodbit); -: 149: -: 150: /** -: 151: * @brief Sets additional flags in the error state. -: 152: * @param __state The additional state flag(s) to set. -: 153: * -: 154: * See std::ios_base::iostate for the possible bit values. -: 155: */ -: 156: void -: 157: setstate(iostate __state) -: 158: { this->clear(this->rdstate() | __state); } -: 159: -: 160: // Flip the internal state on for the proper state bits, then -: 161: // rethrows the propagated exception if bit also set in -: 162: // exceptions(). -: 163: void -: 164: _M_setstate(iostate __state) -: 165: { -: 166: // 27.6.1.2.1 Common requirements. -: 167: // Turn this on without causing an ios::failure to be thrown. -: 168: _M_streambuf_state |= __state; -: 169: if (this->exceptions() & __state) -: 170: __throw_exception_again; -: 171: } -: 172: -: 173: /** -: 174: * @brief Fast error checking. -: 175: * @return True if no error flags are set. -: 176: * -: 177: * A wrapper around rdstate. -: 178: */ -: 179: bool 16180: 180: good() const 3779: 181: { return this->rdstate() == 0; } branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 182: -: 183: /** -: 184: * @brief Fast error checking. -: 185: * @return True if the eofbit is set. -: 186: * -: 187: * Note that other iostate flags may also be set. -: 188: */ -: 189: bool 6399: 190: eof() const 6399: 191: { return (this->rdstate() & eofbit) != 0; } branch 0 taken 23% (fallthrough) branch 1 taken 77% -: 192: -: 193: /** -: 194: * @brief Fast error checking. -: 195: * @return True if either the badbit or the failbit is set. -: 196: * -: 197: * Checking the badbit in fail() is historical practice. -: 198: * Note that other iostate flags may also be set. -: 199: */ -: 200: bool -: 201: fail() const -: 202: { return (this->rdstate() & (badbit | failbit)) != 0; } -: 203: -: 204: /** -: 205: * @brief Fast error checking. -: 206: * @return True if the badbit is set. -: 207: * -: 208: * Note that other iostate flags may also be set. -: 209: */ -: 210: bool 6404905*: 211: bad() const 6404905*: 212: { return (this->rdstate() & badbit) != 0; } branch 0 never executed branch 1 never executed branch 2 taken 0% (fallthrough) branch 3 taken 100% branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 213: -: 214: /** -: 215: * @brief Throwing exceptions on errors. -: 216: * @return The current exceptions mask. -: 217: * -: 218: * This changes nothing in the stream. See the one-argument version -: 219: * of exceptions(iostate) for the meaning of the return value. -: 220: */ -: 221: iostate -: 222: exceptions() const -: 223: { return _M_exception; } -: 224: -: 225: /** -: 226: * @brief Throwing exceptions on errors. -: 227: * @param __except The new exceptions mask. -: 228: * -: 229: * By default, error flags are set silently. You can set an -: 230: * exceptions mask for each stream; if a bit in the mask becomes set -: 231: * in the error flags, then an exception of type -: 232: * std::ios_base::failure is thrown. -: 233: * -: 234: * If the error flag is already set when the exceptions mask is -: 235: * added, the exception is immediately thrown. Try running the -: 236: * following under GCC 3.1 or later: -: 237: * @code -: 238: * #include -: 239: * #include -: 240: * #include -: 241: * -: 242: * int main() -: 243: * { -: 244: * std::set_terminate (__gnu_cxx::__verbose_terminate_handler); -: 245: * -: 246: * std::ifstream f ("/etc/motd"); -: 247: * -: 248: * std::cerr << "Setting badbit\n"; -: 249: * f.setstate (std::ios_base::badbit); -: 250: * -: 251: * std::cerr << "Setting exception mask\n"; -: 252: * f.exceptions (std::ios_base::badbit); -: 253: * } -: 254: * @endcode -: 255: */ -: 256: void -: 257: exceptions(iostate __except) -: 258: { -: 259: _M_exception = __except; -: 260: this->clear(_M_streambuf_state); -: 261: } -: 262: -: 263: // Constructor/destructor: -: 264: /** -: 265: * @brief Constructor performs initialization. -: 266: * -: 267: * The parameter is passed by derived streams. -: 268: */ -: 269: explicit -: 270: basic_ios(basic_streambuf<_CharT, _Traits>* __sb) -: 271: : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), -: 272: _M_ctype(0), _M_num_put(0), _M_num_get(0) -: 273: { this->init(__sb); } -: 274: -: 275: /** -: 276: * @brief Empty. -: 277: * -: 278: * The destructor does nothing. More specifically, it does not -: 279: * destroy the streambuf held by rdbuf(). -: 280: */ -: 281: virtual -: 282: ~basic_ios() { } -: 283: -: 284: // Members: -: 285: /** -: 286: * @brief Fetches the current @e tied stream. -: 287: * @return A pointer to the tied stream, or NULL if the stream is -: 288: * not tied. -: 289: * -: 290: * A stream may be @e tied (or synchronized) to a second output -: 291: * stream. When this stream performs any I/O, the tied stream is -: 292: * first flushed. For example, @c std::cin is tied to @c std::cout. -: 293: */ -: 294: basic_ostream<_CharT, _Traits>* -: 295: tie() const -: 296: { return _M_tie; } -: 297: -: 298: /** -: 299: * @brief Ties this stream to an output stream. -: 300: * @param __tiestr The output stream. -: 301: * @return The previously tied output stream, or NULL if the stream -: 302: * was not tied. -: 303: * -: 304: * This sets up a new tie; see tie() for more. -: 305: */ -: 306: basic_ostream<_CharT, _Traits>* -: 307: tie(basic_ostream<_CharT, _Traits>* __tiestr) -: 308: { -: 309: basic_ostream<_CharT, _Traits>* __old = _M_tie; -: 310: _M_tie = __tiestr; -: 311: return __old; -: 312: } -: 313: -: 314: /** -: 315: * @brief Accessing the underlying buffer. -: 316: * @return The current stream buffer. -: 317: * -: 318: * This does not change the state of the stream. -: 319: */ -: 320: basic_streambuf<_CharT, _Traits>* -: 321: rdbuf() const -: 322: { return _M_streambuf; } -: 323: -: 324: /** -: 325: * @brief Changing the underlying buffer. -: 326: * @param __sb The new stream buffer. -: 327: * @return The previous stream buffer. -: 328: * -: 329: * Associates a new buffer with the current stream, and clears the -: 330: * error state. -: 331: * -: 332: * Due to historical accidents which the LWG refuses to correct, the -: 333: * I/O library suffers from a design error: this function is hidden -: 334: * in derived classes by overrides of the zero-argument @c rdbuf(), -: 335: * which is non-virtual for hysterical raisins. As a result, you -: 336: * must use explicit qualifications to access this function via any -: 337: * derived class. For example: -: 338: * -: 339: * @code -: 340: * std::fstream foo; // or some other derived type -: 341: * std::streambuf* p = .....; -: 342: * -: 343: * foo.ios::rdbuf(p); // ios == basic_ios -: 344: * @endcode -: 345: */ -: 346: basic_streambuf<_CharT, _Traits>* -: 347: rdbuf(basic_streambuf<_CharT, _Traits>* __sb); -: 348: -: 349: /** -: 350: * @brief Copies fields of __rhs into this. -: 351: * @param __rhs The source values for the copies. -: 352: * @return Reference to this object. -: 353: * -: 354: * All fields of __rhs are copied into this object except that rdbuf() -: 355: * and rdstate() remain unchanged. All values in the pword and iword -: 356: * arrays are copied. Before copying, each callback is invoked with -: 357: * erase_event. After copying, each (new) callback is invoked with -: 358: * copyfmt_event. The final step is to copy exceptions(). -: 359: */ -: 360: basic_ios& -: 361: copyfmt(const basic_ios& __rhs); -: 362: -: 363: /** -: 364: * @brief Retrieves the @a empty character. -: 365: * @return The current fill character. -: 366: * -: 367: * It defaults to a space (' ') in the current locale. -: 368: */ -: 369: char_type -: 370: fill() const -: 371: { -: 372: if (!_M_fill_init) -: 373: { -: 374: _M_fill = this->widen(' '); -: 375: _M_fill_init = true; -: 376: } -: 377: return _M_fill; -: 378: } -: 379: -: 380: /** -: 381: * @brief Sets a new @a empty character. -: 382: * @param __ch The new character. -: 383: * @return The previous fill character. -: 384: * -: 385: * The fill character is used to fill out space when P+ characters -: 386: * have been requested (e.g., via setw), Q characters are actually -: 387: * used, and Qfill(); -: 393: _M_fill = __ch; -: 394: return __old; -: 395: } -: 396: -: 397: // Locales: -: 398: /** -: 399: * @brief Moves to a new locale. -: 400: * @param __loc The new locale. -: 401: * @return The previous locale. -: 402: * -: 403: * Calls @c ios_base::imbue(loc), and if a stream buffer is associated -: 404: * with this stream, calls that buffer's @c pubimbue(loc). -: 405: * -: 406: * Additional l10n notes are at -: 407: * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html -: 408: */ -: 409: locale -: 410: imbue(const locale& __loc); -: 411: -: 412: /** -: 413: * @brief Squeezes characters. -: 414: * @param __c The character to narrow. -: 415: * @param __dfault The character to narrow. -: 416: * @return The narrowed character. -: 417: * -: 418: * Maps a character of @c char_type to a character of @c char, -: 419: * if possible. -: 420: * -: 421: * Returns the result of -: 422: * @code -: 423: * std::use_facet >(getloc()).narrow(c,dfault) -: 424: * @endcode -: 425: * -: 426: * Additional l10n notes are at -: 427: * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html -: 428: */ -: 429: char -: 430: narrow(char_type __c, char __dfault) const -: 431: { return __check_facet(_M_ctype).narrow(__c, __dfault); } -: 432: -: 433: /** -: 434: * @brief Widens characters. -: 435: * @param __c The character to widen. -: 436: * @return The widened character. -: 437: * -: 438: * Maps a character of @c char to a character of @c char_type. -: 439: * -: 440: * Returns the result of -: 441: * @code -: 442: * std::use_facet >(getloc()).widen(c) -: 443: * @endcode -: 444: * -: 445: * Additional l10n notes are at -: 446: * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html -: 447: */ -: 448: char_type -: 449: widen(char __c) const -: 450: { return __check_facet(_M_ctype).widen(__c); } -: 451: -: 452: protected: -: 453: // 27.4.5.1 basic_ios constructors -: 454: /** -: 455: * @brief Empty. -: 456: * -: 457: * The default constructor does nothing and is not normally -: 458: * accessible to users. -: 459: */ -: 460: basic_ios() -: 461: : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), -: 462: _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) -: 463: { } -: 464: -: 465: /** -: 466: * @brief All setup is performed here. -: 467: * -: 468: * This is called from the public constructor. It is not virtual and -: 469: * cannot be redefined. -: 470: */ -: 471: void -: 472: init(basic_streambuf<_CharT, _Traits>* __sb); -: 473: -: 474:#if __cplusplus >= 201103L -: 475: basic_ios(const basic_ios&) = delete; -: 476: basic_ios& operator=(const basic_ios&) = delete; -: 477: -: 478: void -: 479: move(basic_ios& __rhs) -: 480: { -: 481: ios_base::_M_move(__rhs); -: 482: _M_cache_locale(_M_ios_locale); -: 483: this->tie(__rhs.tie(nullptr)); -: 484: _M_fill = __rhs._M_fill; -: 485: _M_fill_init = __rhs._M_fill_init; -: 486: _M_streambuf = nullptr; -: 487: } -: 488: -: 489: void -: 490: move(basic_ios&& __rhs) -: 491: { this->move(__rhs); } -: 492: -: 493: void -: 494: swap(basic_ios& __rhs) noexcept -: 495: { -: 496: ios_base::_M_swap(__rhs); -: 497: _M_cache_locale(_M_ios_locale); -: 498: __rhs._M_cache_locale(__rhs._M_ios_locale); -: 499: std::swap(_M_tie, __rhs._M_tie); -: 500: std::swap(_M_fill, __rhs._M_fill); -: 501: std::swap(_M_fill_init, __rhs._M_fill_init); -: 502: } -: 503: -: 504: void -: 505: set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb) -: 506: { _M_streambuf = __sb; } -: 507:#endif -: 508: -: 509: void -: 510: _M_cache_locale(const locale& __loc); -: 511: }; -: 512: -: 513:_GLIBCXX_END_NAMESPACE_VERSION -: 514:} // namespace -: 515: -: 516:#include -: 517: -: 518:#endif /* _BASIC_IOS_H */ <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#mac#cmac#cmac.cpp.gcov -: 0:Source:src/lib/mac/cmac/cmac.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/mac_cmac.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/mac_cmac.gcda -: 0:Runs:2960 -: 1:/* -: 2:* CMAC -: 3:* (C) 1999-2007,2014 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: -: 14:/* -: 15:* Perform CMAC's multiplication in GF(2^n) -: 16:*/ function _ZN5Botan4CMAC11poly_doubleERKSt6vectorIhNS_16secure_allocatorIhEEE called 0 returned 0% blocks executed 0% #####: 17:secure_vector CMAC::poly_double(const secure_vector& in) -: 18: { #####: 19: secure_vector out(in.size()); call 0 never executed #####: 20: poly_double_n(out.data(), in.data(), out.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 21: return out; -: 22: } -: 23: -: 24:/* -: 25:* Update an CMAC Calculation -: 26:*/ function _ZN5Botan4CMAC8add_dataEPKhm called 965249 returned 100% blocks executed 100% 965249: 27:void CMAC::add_data(const uint8_t input[], size_t length) -: 28: { 965249: 29: const size_t bs = output_length(); call 0 returned 100% -: 30: 965249: 31: buffer_insert(m_buffer, m_position, input, length); call 0 returned 100% 965249: 32: if(m_position + length > bs) branch 0 taken 1% (fallthrough) branch 1 taken 99% -: 33: { 10070: 34: xor_buf(m_state, m_buffer, bs); call 0 returned 100% 10070: 35: m_cipher->encrypt(m_state); call 0 returned 85% 8580: 36: input += (bs - m_position); 8580: 37: length -= (bs - m_position); 25007: 38: while(length > bs) branch 0 taken 66% (fallthrough) branch 1 taken 34% -: 39: { 16427: 40: xor_buf(m_state, input, bs); call 0 returned 100% 16427: 41: m_cipher->encrypt(m_state); call 0 returned 100% 16427: 42: input += bs; 16427: 43: length -= bs; -: 44: } 8580: 45: copy_mem(m_buffer.data(), input, length); call 0 returned 100% 8580: 46: m_position = 0; -: 47: } 963759: 48: m_position += length; 963759: 49: } -: 50: -: 51:/* -: 52:* Finalize an CMAC Calculation -: 53:*/ function _ZN5Botan4CMAC12final_resultEPh called 883736 returned 100% blocks executed 100% 883736: 54:void CMAC::final_result(uint8_t mac[]) -: 55: { 883736: 56: xor_buf(m_state, m_buffer, m_position); call 0 returned 100% -: 57: 883736: 58: if(m_position == output_length()) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 59: { 876295: 60: xor_buf(m_state, m_B, output_length()); call 0 returned 100% -: 61: } -: 62: else -: 63: { 7441: 64: m_state[m_position] ^= 0x80; call 0 returned 100% 7441: 65: xor_buf(m_state, m_P, output_length()); call 0 returned 100% -: 66: } -: 67: 883736: 68: m_cipher->encrypt(m_state); call 0 returned 100% -: 69: 881725: 70: copy_mem(mac, m_state.data(), output_length()); call 0 returned 100% -: 71: 881725: 72: zeroise(m_state); branch 0 taken 100% (fallthrough) branch 1 taken 0% 881725: 73: zeroise(m_buffer); branch 0 taken 100% (fallthrough) branch 1 taken 0% 881725: 74: m_position = 0; 881725: 75: } -: 76: -: 77:/* -: 78:* CMAC Key Schedule -: 79:*/ function _ZN5Botan4CMAC12key_scheduleEPKhm called 2155 returned 100% blocks executed 100% 2155: 80:void CMAC::key_schedule(const uint8_t key[], size_t length) -: 81: { 2155: 82: clear(); call 0 returned 100% 2155: 83: m_cipher->set_key(key, length); call 0 returned 100% 2155: 84: m_cipher->encrypt(m_B); call 0 returned 100% 2155: 85: poly_double_n(m_B.data(), m_B.size()); call 0 returned 100% 2155: 86: poly_double_n(m_P.data(), m_B.data(), m_P.size()); call 0 returned 100% 2155: 87: } -: 88: -: 89:/* -: 90:* Clear memory of sensitive data -: 91:*/ function _ZN5Botan4CMAC5clearEv called 3259 returned 100% blocks executed 100% 3259: 92:void CMAC::clear() -: 93: { 3259: 94: m_cipher->clear(); call 0 returned 100% 3259: 95: zeroise(m_state); branch 0 taken 100% (fallthrough) branch 1 taken 0% 3259: 96: zeroise(m_buffer); branch 0 taken 100% (fallthrough) branch 1 taken 0% 3259: 97: zeroise(m_B); branch 0 taken 100% (fallthrough) branch 1 taken 0% 3259: 98: zeroise(m_P); branch 0 taken 100% (fallthrough) branch 1 taken 0% 3259: 99: m_position = 0; 3259: 100: } -: 101: -: 102:/* -: 103:* Return the name of this type -: 104:*/ function _ZNK5Botan4CMAC4nameB5cxx11Ev called 1195 returned 100% blocks executed 39% 1195: 105:std::string CMAC::name() const -: 106: { 2390: 107: return "CMAC(" + m_cipher->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) branch 7 taken 0% (fallthrough) branch 8 taken 100% branch 9 never executed branch 10 never executed -: 108: } -: 109: -: 110:/* -: 111:* Return a clone of this object -: 112:*/ function _ZNK5Botan4CMAC5cloneEv called 430 returned 100% blocks executed 83% 430: 113:MessageAuthenticationCode* CMAC::clone() const -: 114: { 430: 115: return new CMAC(m_cipher->clone()); call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 never executed -: 116: } -: 117: -: 118:/* -: 119:* CMAC Constructor -: 120:*/ function _ZN5Botan4CMACC2EPNS_11BlockCipherE called 2966 returned 100% blocks executed 14% 2966: 121:CMAC::CMAC(BlockCipher* cipher) : -: 122: m_cipher(cipher), 2966: 123: m_block_size(m_cipher->block_size()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 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 -: 124: { 2966*: 125: if(poly_double_supported_size(m_block_size) == false) branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 126: { #####: 127: throw Invalid_Argument("CMAC cannot use the " + branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 128: std::to_string(m_block_size * 8) + 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 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 #####: 129: " bit cipher " + m_cipher->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 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 -: 130: } -: 131: 2966: 132: m_state.resize(output_length()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2966: 133: m_buffer.resize(output_length()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2966: 134: m_B.resize(output_length()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2966: 135: m_P.resize(output_length()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2966: 136: m_position = 0; 2966: 137: } -: 138: -: 139:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#tls#tls_blocking.cpp.gcov -: 0:Source:src/lib/tls/tls_blocking.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/tls_blocking.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/tls_blocking.gcda -: 0:Runs:2960 -: 1:/* -: 2:* TLS Blocking API -: 3:* (C) 2013 Jack Lloyd -: 4:* 2016 Matthias Gierlings -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10: -: 11:namespace Botan { -: 12: -: 13:namespace TLS { -: 14: function _ZN5Botan3TLS15Blocking_ClientC2ESt8functionIFmPhmEES2_IFvPKhmEERNS0_15Session_ManagerERNS_19Credentials_ManagerERKNS0_6PolicyERNS_21RandomNumberGeneratorERKNS0_18Server_InformationERKNS0_16Protocol_VersionERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISV_EE called 0 returned 0% blocks executed 0% #####: 15:Blocking_Client::Blocking_Client(read_fn reader, -: 16: write_fn writer, -: 17: Session_Manager& session_manager, -: 18: Credentials_Manager& creds, -: 19: const Policy& policy, -: 20: RandomNumberGenerator& rng, -: 21: const Server_Information& server_info, -: 22: const Protocol_Version& offer_version, #####: 23: const std::vector& next) : -: 24: m_read(reader), -: 25: m_callbacks(new TLS::Compat_Callbacks( -: 26: /* -: 27: we are ok using deprecated features here because the whole Blocking_Client class -: 28: is also deprecated, so just silence the warning. -: 29: */ -: 30: TLS::Compat_Callbacks::SILENCE_DEPRECATION_WARNING::PLEASE, -: 31: writer, #####: 32: std::bind(&Blocking_Client::data_cb, this, std::placeholders::_1, std::placeholders::_2), call 0 never executed branch 1 never executed branch 2 never executed #####: 33: std::function(std::bind(&Blocking_Client::alert_cb, this, std::placeholders::_1)), call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 34: std::bind(&Blocking_Client::handshake_cb, this, std::placeholders::_1) call 0 never executed branch 1 never executed branch 2 never executed #####: 35: )), 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 #####: 36: m_channel(*m_callbacks.get(), -: 37: session_manager, -: 38: creds, -: 39: policy, -: 40: rng, -: 41: server_info, -: 42: offer_version, #####: 43: next) 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 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 call 30 never executed branch 31 never executed branch 32 never executed -: 44: { #####: 45: } -: 46: function _ZN5Botan3TLS15Blocking_Client12handshake_cbERKNS0_7SessionE called 0 returned 0% blocks executed 0% #####: 47:bool Blocking_Client::handshake_cb(const Session& session) -: 48: { #####: 49: return this->handshake_complete(session); call 0 never executed -: 50: } -: 51: function _ZN5Botan3TLS15Blocking_Client8alert_cbERKNS0_5AlertE called 0 returned 0% blocks executed 0% #####: 52:void Blocking_Client::alert_cb(const Alert& alert) -: 53: { #####: 54: this->alert_notification(alert); call 0 never executed #####: 55: } -: 56: function _ZN5Botan3TLS15Blocking_Client7data_cbEPKhm called 0 returned 0% blocks executed 0% #####: 57:void Blocking_Client::data_cb(const uint8_t data[], size_t data_len) -: 58: { #####: 59: m_plaintext.insert(m_plaintext.end(), data, data + data_len); call 0 never executed #####: 60: } -: 61: function _ZN5Botan3TLS15Blocking_Client12do_handshakeEv called 0 returned 0% blocks executed 0% #####: 62:void Blocking_Client::do_handshake() -: 63: { #####: 64: std::vector readbuf(4096); call 0 never executed -: 65: #####: 66: while(!m_channel.is_closed() && !m_channel.is_active()) 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 branch 8 never executed branch 9 never executed -: 67: { #####: 68: const size_t from_socket = m_read(readbuf.data(), readbuf.size()); branch 0 never executed branch 1 never executed #####: 69: m_channel.received_data(readbuf.data(), from_socket); call 0 never executed branch 1 never executed branch 2 never executed -: 70: } #####: 71: } -: 72: function _ZN5Botan3TLS15Blocking_Client4readEPhm called 0 returned 0% blocks executed 0% #####: 73:size_t Blocking_Client::read(uint8_t buf[], size_t buf_len) -: 74: { #####: 75: std::vector readbuf(4096); call 0 never executed -: 76: #####: 77: while(m_plaintext.empty() && !m_channel.is_closed()) branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed -: 78: { #####: 79: const size_t from_socket = m_read(readbuf.data(), readbuf.size()); branch 0 never executed branch 1 never executed #####: 80: m_channel.received_data(readbuf.data(), from_socket); call 0 never executed branch 1 never executed branch 2 never executed -: 81: } -: 82: #####: 83: const size_t returned = std::min(buf_len, m_plaintext.size()); branch 0 never executed branch 1 never executed -: 84: #####: 85: for(size_t i = 0; i != returned; ++i) branch 0 never executed branch 1 never executed #####: 86: buf[i] = m_plaintext[i]; #####: 87: m_plaintext.erase(m_plaintext.begin(), m_plaintext.begin() + returned); call 0 never executed -: 88: #####: 89: BOTAN_ASSERT_IMPLICATION(returned == 0, m_channel.is_closed(), branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed call 7 never executed -: 90: "Only return zero if channel is closed"); -: 91: #####: 92: return returned; branch 0 never executed branch 1 never executed -: 93: } -: 94: -: 95:} -: 96: -: 97:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#tests#test_os_utils.cpp.gcov -: 0:Source:src/tests/test_os_utils.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_os_utils.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_os_utils.gcda -: 0:Runs:1 -: 1:/* -: 2:* Testing operating system specific wrapper code -: 3:* (C) 2017 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include "tests.h" -: 9:#include -: 10: -: 11:// For __ud2 intrinsic -: 12:#if defined(BOTAN_TARGET_COMPILER_IS_MSVC) -: 13:#include -: 14:#endif -: 15: -: 16:namespace Botan_Tests { -: 17: -: 18:namespace { -: 19: -: 20:/* -: 21:uint32_t get_process_id(); -: 22:uint64_t get_cpu_cycle_counter(); -: 23:uint64_t get_system_timestamp_ns(); -: 24:size_t get_memory_locking_limit(); -: 25:void* allocate_locked_pages(size_t length); -: 26:void free_locked_pages(void* ptr, size_t length); -: 27:int run_cpu_instruction_probe(std::function probe_fn); -: 28:*/ -: 29: 1: 30:class OS_Utils_Tests final : public Test -: 31: { -: 32: public: function _ZN11Botan_Tests12_GLOBAL__N_114OS_Utils_Tests3runEv called 1 returned 100% blocks executed 61% 1: 33: std::vector run() override -: 34: { 1: 35: std::vector results; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 36: 2: 37: results.push_back(test_get_process_id()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 38: results.push_back(test_get_cpu_cycle_counter()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 39: results.push_back(test_get_high_resolution_clock()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 40: results.push_back(test_get_cpu_numbers()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 41: results.push_back(test_get_system_timestamp()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 42: results.push_back(test_memory_locking()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 2: 43: results.push_back(test_cpu_instruction_probe()); 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 -: 44: 1: 45: return results; -: 46: } -: 47: -: 48: private: -: 49: -: 50: Test::Result test_get_process_id() -: 51: { -: 52: Test::Result result("OS::get_process_id"); -: 53: -: 54: uint32_t pid1 = Botan::OS::get_process_id(); -: 55: uint32_t pid2 = Botan::OS::get_process_id(); -: 56: -: 57: result.test_eq("PID same across calls", static_cast(pid1), static_cast(pid2)); -: 58: -: 59:#if defined(BOTAN_TARGET_OS_IS_INCLUDEOS) || defined(BOTAN_TARGET_OS_IS_LLVM) -: 60: result.test_eq("PID is expected to be zero on this platform", pid1, size_t(0)); -: 61:#else -: 62: result.test_ne("PID is non-zero on systems with processes", pid1, 0); -: 63:#endif -: 64: -: 65: return result; -: 66: } -: 67: -: 68: Test::Result test_get_cpu_cycle_counter() -: 69: { -: 70: const size_t max_trials = 1024; -: 71: const size_t max_repeats = 32; -: 72: -: 73: Test::Result result("OS::get_cpu_cycle_counter"); -: 74: -: 75: const uint64_t proc_ts1 = Botan::OS::get_cpu_cycle_counter(); -: 76: -: 77: if(proc_ts1 == 0) -: 78: { -: 79: const uint64_t proc_ts2 = Botan::OS::get_cpu_cycle_counter(); -: 80: result.test_is_eq("Disabled processor timestamp stays at zero", proc_ts1, proc_ts2); -: 81: return result; -: 82: } -: 83: -: 84: size_t counts = 0; -: 85: while(counts < max_trials && (Botan::OS::get_cpu_cycle_counter() == proc_ts1)) -: 86: ++counts; -: 87: -: 88: result.test_lt("CPU cycle counter eventually changes value", counts, max_repeats); -: 89: -: 90: return result; -: 91: } -: 92: -: 93: Test::Result test_get_high_resolution_clock() -: 94: { -: 95: const size_t max_trials = 1024; -: 96: const size_t max_repeats = 128; -: 97: -: 98: Test::Result result("OS::get_high_resolution_clock"); -: 99: -: 100: // TODO better tests -: 101: const uint64_t hr_ts1 = Botan::OS::get_high_resolution_clock(); -: 102: result.confirm("high resolution timestamp value is never zero", hr_ts1 != 0); -: 103: -: 104: size_t counts = 0; -: 105: while(counts < max_trials && (Botan::OS::get_high_resolution_clock() == hr_ts1)) -: 106: ++counts; -: 107: -: 108: result.test_lt("high resolution clock eventually changes value", counts, max_repeats); -: 109: -: 110: return result; -: 111: } -: 112: -: 113: Test::Result test_get_cpu_numbers() -: 114: { -: 115: Test::Result result("OS::get_cpu_total/OS::get_cpu_available"); -: 116: -: 117: size_t tt = Botan::OS::get_cpu_total(); -: 118: size_t ta = Botan::OS::get_cpu_available(); -: 119: -: 120: result.test_lte("get_cpu_available not greater than total", ta, tt); -: 121: -: 122: return result; -: 123: } -: 124: -: 125: Test::Result test_get_system_timestamp() -: 126: { -: 127: // TODO better tests -: 128: Test::Result result("OS::get_system_timestamp_ns"); -: 129: -: 130: uint64_t sys_ts1 = Botan::OS::get_system_timestamp_ns(); -: 131: result.confirm("System timestamp value is never zero", sys_ts1 != 0); -: 132: -: 133: // do something that consumes a little time -: 134: Botan::OS::get_process_id(); -: 135: -: 136: uint64_t sys_ts2 = Botan::OS::get_system_timestamp_ns(); -: 137: -: 138: result.confirm("System time moves forward", sys_ts1 <= sys_ts2); -: 139: -: 140: return result; -: 141: } -: 142: -: 143: Test::Result test_memory_locking() -: 144: { -: 145: Test::Result result("OS memory locked pages"); -: 146: -: 147: // TODO any tests... -: 148: -: 149: return result; -: 150: } -: 151: -: 152: Test::Result test_cpu_instruction_probe() -: 153: { -: 154: Test::Result result("OS::run_cpu_instruction_probe"); -: 155: -: 156: // OS::run_cpu_instruction_probe only implemented for Unix signals or Windows SEH -: 157: 1: 158: std::function ok_fn = []() noexcept -> int { return 5; }; -: 159: const int run_rc = Botan::OS::run_cpu_instruction_probe(ok_fn); -: 160: -: 161: if(run_rc == -3) -: 162: { -: 163: result.test_note("run_cpu_instruction_probe not implemented on this platform"); -: 164: return {result}; -: 165: } -: 166: -: 167: result.confirm("Correct result returned by working probe fn", run_rc == 5); -: 168: -: 169: std::function crash_probe; -: 170: -: 171:#if defined(BOTAN_TARGET_COMPILER_IS_MSVC) -: 172: crash_probe = []() noexcept -> int { __ud2(); return 3; }; -: 173: -: 174:#elif defined(BOTAN_USE_GCC_INLINE_ASM) -: 175: -: 176:#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) 1*: 177: crash_probe = []() noexcept -> int { asm volatile("ud2"); return 3; }; call 0 returned 0% -: 178: -: 179:#elif defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY) -: 180: //ARM: asm volatile (".word 0xf7f0a000\n"); -: 181: // illegal instruction in both ARM and Thumb modes -: 182: crash_probe = []() noexcept -> int { asm volatile(".word 0xe7f0def0\n"); return 3; }; -: 183: -: 184:#else -: 185: /* -: 186: PPC: "The instruction with primary opcode 0, when the instruction does not consist -: 187: entirely of binary zeros" -: 188: Others ? -: 189: */ -: 190:#endif -: 191: -: 192:#endif -: 193: -: 194: if(crash_probe) -: 195: { -: 196: const int crash_rc = Botan::OS::run_cpu_instruction_probe(crash_probe); -: 197: result.confirm("Result for function executing undefined opcode", crash_rc < 0); -: 198: } -: 199: -: 200: return result; -: 201: } -: 202: }; -: 203: -: 204:BOTAN_REGISTER_TEST("utils", "os_utils", OS_Utils_Tests); -: 205: -: 206:} -: 207: -: 208:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#tls_channel.h.gcov -: 0:Source:build/include/botan/tls_channel.h -: 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:2960 -: 1:/* -: 2:* TLS Channel -: 3:* (C) 2011,2012,2014,2015 Jack Lloyd -: 4:* 2016 Matthias Gierlings -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#ifndef BOTAN_TLS_CHANNEL_H_ -: 10:#define BOTAN_TLS_CHANNEL_H_ -: 11: -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18:#include -: 19:#include -: 20:#include -: 21: -: 22:namespace Botan { -: 23: -: 24:namespace TLS { -: 25: -: 26:class Connection_Cipher_State; -: 27:class Connection_Sequence_Numbers; -: 28:class Handshake_State; -: 29:class Handshake_Message; -: 30:class Client_Hello; -: 31:class Server_Hello; -: 32:class Policy; -: 33: -: 34:/** -: 35:* Generic interface for TLS endpoint -: 36:*/ -: 37:class BOTAN_PUBLIC_API(2,0) Channel -: 38: { -: 39: public: -: 40: typedef std::function output_fn; -: 41: typedef std::function data_cb; -: 42: typedef std::function alert_cb; -: 43: typedef std::function handshake_cb; -: 44: typedef std::function handshake_msg_cb; -: 45: static size_t IO_BUF_DEFAULT_SIZE; -: 46: -: 47: /** -: 48: * Set up a new TLS session -: 49: * -: 50: * @param callbacks contains a set of callback function references -: 51: * required by the TLS endpoint. -: 52: * @param session_manager manages session state -: 53: * @param rng a random number generator -: 54: * @param policy specifies other connection policy information -: 55: * @param is_server whether this is a server session or not -: 56: * @param is_datagram whether this is a DTLS session -: 57: * @param io_buf_sz This many bytes of memory will -: 58: * be preallocated for the read and write buffers. Smaller -: 59: * values just mean reallocations and copies are more likely. -: 60: */ -: 61: Channel(Callbacks& callbacks, -: 62: Session_Manager& session_manager, -: 63: RandomNumberGenerator& rng, -: 64: const Policy& policy, -: 65: bool is_server, -: 66: bool is_datagram, -: 67: size_t io_buf_sz = IO_BUF_DEFAULT_SIZE); -: 68: -: 69: /** -: 70: * DEPRECATED. This constructor is only provided for backward -: 71: * compatibility and should not be used in new implementations. -: 72: * (Not marked deprecated since it is only called internally, by -: 73: * other deprecated constructors) -: 74: */ -: 75: Channel(output_fn out, -: 76: data_cb app_data_cb, -: 77: alert_cb alert_cb, -: 78: handshake_cb hs_cb, -: 79: handshake_msg_cb hs_msg_cb, -: 80: Session_Manager& session_manager, -: 81: RandomNumberGenerator& rng, -: 82: const Policy& policy, -: 83: bool is_server, -: 84: bool is_datagram, -: 85: size_t io_buf_sz = IO_BUF_DEFAULT_SIZE); -: 86: -: 87: Channel(const Channel&) = delete; -: 88: -: 89: Channel& operator=(const Channel&) = delete; -: 90: -: 91: virtual ~Channel(); -: 92: -: 93: /** -: 94: * Inject TLS traffic received from counterparty -: 95: * @return a hint as the how many more bytes we need to process the -: 96: * current record (this may be 0 if on a record boundary) -: 97: */ -: 98: size_t received_data(const uint8_t buf[], size_t buf_size); -: 99: -: 100: /** -: 101: * Inject TLS traffic received from counterparty -: 102: * @return a hint as the how many more bytes we need to process the -: 103: * current record (this may be 0 if on a record boundary) -: 104: */ -: 105: size_t received_data(const std::vector& buf); -: 106: -: 107: /** -: 108: * Inject plaintext intended for counterparty -: 109: * Throws an exception if is_active() is false -: 110: */ -: 111: void send(const uint8_t buf[], size_t buf_size); -: 112: -: 113: /** -: 114: * Inject plaintext intended for counterparty -: 115: * Throws an exception if is_active() is false -: 116: */ -: 117: void send(const std::string& val); -: 118: -: 119: /** -: 120: * Inject plaintext intended for counterparty -: 121: * Throws an exception if is_active() is false -: 122: */ -: 123: template -: 124: void send(const std::vector& val) -: 125: { -: 126: send(val.data(), val.size()); -: 127: } -: 128: -: 129: /** -: 130: * Send a TLS alert message. If the alert is fatal, the internal -: 131: * state (keys, etc) will be reset. -: 132: * @param alert the Alert to send -: 133: */ -: 134: void send_alert(const Alert& alert); -: 135: -: 136: /** -: 137: * Send a warning alert -: 138: */ #####: 139: void send_warning_alert(Alert::Type type) { send_alert(Alert(type, false)); } call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed call 4 never executed -: 140: -: 141: /** -: 142: * Send a fatal alert -: 143: */ -: 144: void send_fatal_alert(Alert::Type type) { send_alert(Alert(type, true)); } -: 145: -: 146: /** -: 147: * Send a close notification alert -: 148: */ -: 149: void close() { send_warning_alert(Alert::CLOSE_NOTIFY); } -: 150: -: 151: /** -: 152: * @return true iff the connection is active for sending application data -: 153: */ -: 154: bool is_active() const; -: 155: -: 156: /** -: 157: * @return true iff the connection has been definitely closed -: 158: */ -: 159: bool is_closed() const; -: 160: -: 161: /** -: 162: * @return certificate chain of the peer (may be empty) -: 163: */ -: 164: std::vector peer_cert_chain() const; -: 165: -: 166: /** -: 167: * Key material export (RFC 5705) -: 168: * @param label a disambiguating label string -: 169: * @param context a per-association context value -: 170: * @param length the length of the desired key in bytes -: 171: * @return key of length bytes -: 172: */ -: 173: SymmetricKey key_material_export(const std::string& label, -: 174: const std::string& context, -: 175: size_t length) const; -: 176: -: 177: /** -: 178: * Attempt to renegotiate the session -: 179: * @param force_full_renegotiation if true, require a full renegotiation, -: 180: * otherwise allow session resumption -: 181: */ -: 182: void renegotiate(bool force_full_renegotiation = false); -: 183: -: 184: /** -: 185: * @return true iff the counterparty supports the secure -: 186: * renegotiation extensions. -: 187: */ -: 188: bool secure_renegotiation_supported() const; -: 189: -: 190: /** -: 191: * Perform a handshake timeout check. This does nothing unless -: 192: * this is a DTLS channel with a pending handshake state, in -: 193: * which case we check for timeout and potentially retransmit -: 194: * handshake packets. -: 195: */ -: 196: bool timeout_check(); -: 197: -: 198: virtual std::string application_protocol() const = 0; -: 199: -: 200: protected: -: 201: -: 202: virtual void process_handshake_msg(const Handshake_State* active_state, -: 203: Handshake_State& pending_state, -: 204: Handshake_Type type, -: 205: const std::vector& contents, -: 206: bool epoch0_restart) = 0; -: 207: -: 208: virtual void initiate_handshake(Handshake_State& state, -: 209: bool force_full_renegotiation) = 0; -: 210: -: 211: virtual std::vector -: 212: get_peer_cert_chain(const Handshake_State& state) const = 0; -: 213: -: 214: virtual Handshake_State* new_handshake_state(class Handshake_IO* io) = 0; -: 215: -: 216: Handshake_State& create_handshake_state(Protocol_Version version); -: 217: -: 218: void inspect_handshake_message(const Handshake_Message& msg); -: 219: -: 220: void activate_session(); -: 221: -: 222: void change_cipher_spec_reader(Connection_Side side); -: 223: -: 224: void change_cipher_spec_writer(Connection_Side side); -: 225: -: 226: /* secure renegotiation handling */ -: 227: -: 228: void secure_renegotiation_check(const Client_Hello* client_hello); -: 229: void secure_renegotiation_check(const Server_Hello* server_hello); -: 230: -: 231: std::vector secure_renegotiation_data_for_client_hello() const; -: 232: std::vector secure_renegotiation_data_for_server_hello() const; -: 233: 3370: 234: RandomNumberGenerator& rng() { return m_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% 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) -: 235: 1697*: 236: Session_Manager& session_manager() { return m_session_manager; } call 0 never executed 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 1% (throw) -: 237: 13780: 238: const Policy& policy() const { return m_policy; } call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% (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% call 19 returned 100% branch 20 taken 100% (fallthrough) branch 21 taken 0% (throw) call 22 returned 100% branch 23 taken 100% (fallthrough) branch 24 taken 0% (throw) call 25 returned 99% call 26 returned 100% branch 27 taken 62% (fallthrough) branch 28 taken 38% (throw) call 29 returned 100% call 30 returned 100% call 31 returned 100% call 32 returned 100% call 33 returned 100% call 34 returned 100% call 35 returned 100% branch 36 taken 99% (fallthrough) branch 37 taken 1% (throw) call 38 returned 100% branch 39 taken 100% (fallthrough) branch 40 taken 0% (throw) -: 239: -: 240: bool save_session(const Session& session); -: 241: 7481: 242: Callbacks& callbacks() const { return m_callbacks; } 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% branch 8 taken 62% (fallthrough) branch 9 taken 38% (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) call 19 returned 100% -: 243: -: 244: void reset_active_association_state(); -: 245: -: 246: private: -: 247: void init(size_t io_buf_sze); -: 248: -: 249: void send_record(uint8_t record_type, const std::vector& record); -: 250: -: 251: void send_record_under_epoch(uint16_t epoch, uint8_t record_type, -: 252: const std::vector& record); -: 253: -: 254: void send_record_array(uint16_t epoch, uint8_t record_type, -: 255: const uint8_t input[], size_t length); -: 256: -: 257: void write_record(Connection_Cipher_State* cipher_state, -: 258: uint16_t epoch, uint8_t type, const uint8_t input[], size_t length); -: 259: -: 260: void reset_state(); -: 261: -: 262: Connection_Sequence_Numbers& sequence_numbers() const; -: 263: -: 264: std::shared_ptr read_cipher_state_epoch(uint16_t epoch) const; -: 265: -: 266: std::shared_ptr write_cipher_state_epoch(uint16_t epoch) const; -: 267: -: 268: const Handshake_State* active_state() const { return m_active_state.get(); } -: 269: -: 270: const Handshake_State* pending_state() const { return m_pending_state.get(); } -: 271: -: 272: /* methods to handle incoming traffic through Channel::receive_data. */ -: 273: void process_handshake_ccs(const secure_vector& record, -: 274: uint64_t record_sequence, -: 275: Record_Type record_type, -: 276: Protocol_Version record_version, -: 277: bool epoch0_restart); -: 278: -: 279: void process_application_data(uint64_t req_no, const secure_vector& record); -: 280: -: 281: void process_alert(const secure_vector& record); -: 282: -: 283: const bool m_is_server; -: 284: const bool m_is_datagram; -: 285: -: 286: /* callbacks */ -: 287: std::unique_ptr m_compat_callbacks; -: 288: Callbacks& m_callbacks; -: 289: -: 290: /* external state */ -: 291: Session_Manager& m_session_manager; -: 292: const Policy& m_policy; -: 293: RandomNumberGenerator& m_rng; -: 294: -: 295: /* sequence number state */ -: 296: std::unique_ptr m_sequence_numbers; -: 297: -: 298: /* pending and active connection states */ -: 299: std::unique_ptr m_active_state; -: 300: std::unique_ptr m_pending_state; -: 301: -: 302: /* cipher states for each epoch */ -: 303: std::map> m_write_cipher_states; -: 304: std::map> m_read_cipher_states; -: 305: -: 306: /* I/O buffers */ -: 307: secure_vector m_writebuf; -: 308: secure_vector m_readbuf; -: 309: secure_vector m_record_buf; -: 310: -: 311: bool m_has_been_closed; -: 312: }; -: 313: -: 314:} -: 315: -: 316:} -: 317: -: 318:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#internal#sha3_round.h.gcov -: 0:Source:build/include/botan/internal/sha3_round.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash_sha3.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash_sha3.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2010,2016,2021 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#ifndef BOTAN_SHA3_ROUND_H_ -: 8:#define BOTAN_SHA3_ROUND_H_ -: 9: -: 10:#include -: 11:#include -: 12: -: 13:/* -: 14:A bug in Clang 12 and XCode 13 cause a miscompilation of SHA3_round -: 15:with optimization levels -O2 and higher. -: 16: -: 17:For details -: 18: https://github.com/randombit/botan/issues/2802 and -: 19: https://bugs.llvm.org/show_bug.cgi?id=51957 -: 20:*/ -: 21: -: 22:#if defined(__clang__) && \ -: 23: (( defined(__apple_build_version__) && __clang_major__ == 13) || \ -: 24: (!defined(__apple_build_version__) && __clang_major__ == 12)) -: 25: #define BOTAN_HAS_BROKEN_CLANG_SHA3 -: 26:#endif -: 27: -: 28:#if defined(BOTAN_HAS_BROKEN_CLANG_SHA3) -: 29: #include -: 30:#endif -: 31: -: 32:namespace Botan { -: 33: -: 34:#if defined(BOTAN_HAS_BROKEN_CLANG_SHA3) -: 35: -: 36:namespace { -: 37: -: 38:__attribute__((noinline)) std::tuple -: 39: xor_CNs(const uint64_t A[25]) -: 40: { -: 41: return std::tuple( -: 42: A[0] ^ A[5] ^ A[10] ^ A[15] ^ A[20], -: 43: A[1] ^ A[6] ^ A[11] ^ A[16] ^ A[21], -: 44: A[2] ^ A[7] ^ A[12] ^ A[17] ^ A[22], -: 45: A[3] ^ A[8] ^ A[13] ^ A[18] ^ A[23], -: 46: A[4] ^ A[9] ^ A[14] ^ A[19] ^ A[24]); -: 47: } -: 48: -: 49:} -: 50: -: 51:#endif -: 52: function _ZN5Botan10SHA3_roundEPmPKmm called 173712 returned 100% blocks executed 100% 173712: 53:inline void SHA3_round(uint64_t T[25], const uint64_t A[25], uint64_t RC) -: 54: { -: 55:#if defined(BOTAN_HAS_BROKEN_CLANG_SHA3) -: 56: const auto C_tup = xor_CNs(A); -: 57: const uint64_t C0 = std::get<0>(C_tup); -: 58: const uint64_t C1 = std::get<1>(C_tup); -: 59: const uint64_t C2 = std::get<2>(C_tup); -: 60: const uint64_t C3 = std::get<3>(C_tup); -: 61: const uint64_t C4 = std::get<4>(C_tup); -: 62:#else 173712: 63: const uint64_t C0 = A[0] ^ A[5] ^ A[10] ^ A[15] ^ A[20]; 173712: 64: const uint64_t C1 = A[1] ^ A[6] ^ A[11] ^ A[16] ^ A[21]; 173712: 65: const uint64_t C2 = A[2] ^ A[7] ^ A[12] ^ A[17] ^ A[22]; 173712: 66: const uint64_t C3 = A[3] ^ A[8] ^ A[13] ^ A[18] ^ A[23]; 173712: 67: const uint64_t C4 = A[4] ^ A[9] ^ A[14] ^ A[19] ^ A[24]; -: 68:#endif -: 69: 173712: 70: const uint64_t D0 = rotl<1>(C0) ^ C3; 173712: 71: const uint64_t D1 = rotl<1>(C1) ^ C4; 173712: 72: const uint64_t D2 = rotl<1>(C2) ^ C0; 173712: 73: const uint64_t D3 = rotl<1>(C3) ^ C1; 173712: 74: const uint64_t D4 = rotl<1>(C4) ^ C2; -: 75: 173712: 76: const uint64_t B00 = A[ 0] ^ D1; 173712: 77: const uint64_t B01 = rotl<44>(A[ 6] ^ D2); 173712: 78: const uint64_t B02 = rotl<43>(A[12] ^ D3); 173712: 79: const uint64_t B03 = rotl<21>(A[18] ^ D4); 173712: 80: const uint64_t B04 = rotl<14>(A[24] ^ D0); 173712: 81: T[ 0] = B00 ^ (~B01 & B02) ^ RC; 173712: 82: T[ 1] = B01 ^ (~B02 & B03); 173712: 83: T[ 2] = B02 ^ (~B03 & B04); 173712: 84: T[ 3] = B03 ^ (~B04 & B00); 173712: 85: T[ 4] = B04 ^ (~B00 & B01); -: 86: 173712: 87: const uint64_t B05 = rotl<28>(A[ 3] ^ D4); 173712: 88: const uint64_t B06 = rotl<20>(A[ 9] ^ D0); 173712: 89: const uint64_t B07 = rotl< 3>(A[10] ^ D1); 173712: 90: const uint64_t B08 = rotl<45>(A[16] ^ D2); 173712: 91: const uint64_t B09 = rotl<61>(A[22] ^ D3); 173712: 92: T[ 5] = B05 ^ (~B06 & B07); 173712: 93: T[ 6] = B06 ^ (~B07 & B08); 173712: 94: T[ 7] = B07 ^ (~B08 & B09); 173712: 95: T[ 8] = B08 ^ (~B09 & B05); 173712: 96: T[ 9] = B09 ^ (~B05 & B06); -: 97: 173712: 98: const uint64_t B10 = rotl< 1>(A[ 1] ^ D2); 173712: 99: const uint64_t B11 = rotl< 6>(A[ 7] ^ D3); 173712: 100: const uint64_t B12 = rotl<25>(A[13] ^ D4); 173712: 101: const uint64_t B13 = rotl< 8>(A[19] ^ D0); 173712: 102: const uint64_t B14 = rotl<18>(A[20] ^ D1); 173712: 103: T[10] = B10 ^ (~B11 & B12); 173712: 104: T[11] = B11 ^ (~B12 & B13); 173712: 105: T[12] = B12 ^ (~B13 & B14); 173712: 106: T[13] = B13 ^ (~B14 & B10); 173712: 107: T[14] = B14 ^ (~B10 & B11); -: 108: 173712: 109: const uint64_t B15 = rotl<27>(A[ 4] ^ D0); 173712: 110: const uint64_t B16 = rotl<36>(A[ 5] ^ D1); 173712: 111: const uint64_t B17 = rotl<10>(A[11] ^ D2); 173712: 112: const uint64_t B18 = rotl<15>(A[17] ^ D3); 173712: 113: const uint64_t B19 = rotl<56>(A[23] ^ D4); 173712: 114: T[15] = B15 ^ (~B16 & B17); 173712: 115: T[16] = B16 ^ (~B17 & B18); 173712: 116: T[17] = B17 ^ (~B18 & B19); 173712: 117: T[18] = B18 ^ (~B19 & B15); 173712: 118: T[19] = B19 ^ (~B15 & B16); -: 119: 173712: 120: const uint64_t B20 = rotl<62>(A[ 2] ^ D3); 173712: 121: const uint64_t B21 = rotl<55>(A[ 8] ^ D4); 173712: 122: const uint64_t B22 = rotl<39>(A[14] ^ D0); 173712: 123: const uint64_t B23 = rotl<41>(A[15] ^ D1); 173712: 124: const uint64_t B24 = rotl< 2>(A[21] ^ D2); 173712: 125: T[20] = B20 ^ (~B21 & B22); 173712: 126: T[21] = B21 ^ (~B22 & B23); 173712: 127: T[22] = B22 ^ (~B23 & B24); 173712: 128: T[23] = B23 ^ (~B24 & B20); 173712: 129: T[24] = B24 ^ (~B20 & B21); 173712: 130: } -: 131: -: 132:} -: 133: -: 134:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#mac.h.gcov -: 0:Source:build/include/botan/mac.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/mac_gmac.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/mac_gmac.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Base class for message authentiction codes -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_MESSAGE_AUTH_CODE_BASE_H_ -: 9:#define BOTAN_MESSAGE_AUTH_CODE_BASE_H_ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15: -: 16:namespace Botan { -: 17: -: 18:/** -: 19:* This class represents Message Authentication Code (MAC) objects. -: 20:*/ -: 21:class BOTAN_PUBLIC_API(2,0) MessageAuthenticationCode : public Buffered_Computation, -: 22: public SymmetricAlgorithm -: 23: { -: 24: public: -: 25: /** -: 26: * Create an instance based on a name -: 27: * If provider is empty then best available is chosen. -: 28: * @param algo_spec algorithm name -: 29: * @param provider provider implementation to use -: 30: * @return a null pointer if the algo/provider combination cannot be found -: 31: */ -: 32: static std::unique_ptr -: 33: create(const std::string& algo_spec, -: 34: const std::string& provider = ""); -: 35: -: 36: /* -: 37: * Create an instance based on a name -: 38: * If provider is empty then best available is chosen. -: 39: * @param algo_spec algorithm name -: 40: * @param provider provider implementation to use -: 41: * Throws a Lookup_Error if algo/provider combination cannot be found -: 42: */ -: 43: static std::unique_ptr -: 44: create_or_throw(const std::string& algo_spec, -: 45: const std::string& provider = ""); -: 46: -: 47: /** -: 48: * @return list of available providers for this algorithm, empty if not available -: 49: */ -: 50: static std::vector providers(const std::string& algo_spec); -: 51: 180: 52: virtual ~MessageAuthenticationCode() = default; -: 53: -: 54: /** -: 55: * Prepare for processing a message under the specified nonce -: 56: * -: 57: * Most MACs neither require nor support a nonce; for these algorithms -: 58: * calling `start_msg` is optional and calling it with anything other than -: 59: * an empty string is an error. One MAC which *requires* a per-message -: 60: * nonce be specified is GMAC. -: 61: * -: 62: * @param nonce the message nonce bytes -: 63: * @param nonce_len the size of len in bytes -: 64: * Default implementation simply rejects all non-empty nonces -: 65: * since most hash/MAC algorithms do not support randomization -: 66: */ -: 67: virtual void start_msg(const uint8_t nonce[], size_t nonce_len); -: 68: -: 69: /** -: 70: * Begin processing a message with a nonce -: 71: * -: 72: * @param nonce the per message nonce -: 73: */ -: 74: template -: 75: void start(const std::vector& nonce) -: 76: { -: 77: start_msg(nonce.data(), nonce.size()); -: 78: } -: 79: -: 80: /** -: 81: * Begin processing a message. -: 82: * @param nonce the per message nonce -: 83: * @param nonce_len length of nonce -: 84: */ -: 85: void start(const uint8_t nonce[], size_t nonce_len) -: 86: { -: 87: start_msg(nonce, nonce_len); -: 88: } -: 89: -: 90: /** -: 91: * Begin processing a message. -: 92: */ -: 93: void start() -: 94: { -: 95: return start_msg(nullptr, 0); -: 96: } -: 97: -: 98: /** -: 99: * Verify a MAC. -: 100: * @param in the MAC to verify as a byte array -: 101: * @param length the length of param in -: 102: * @return true if the MAC is valid, false otherwise -: 103: */ -: 104: virtual bool verify_mac(const uint8_t in[], size_t length); -: 105: -: 106: /** -: 107: * Verify a MAC. -: 108: * @param in the MAC to verify as a byte array -: 109: * @return true if the MAC is valid, false otherwise -: 110: */ function _ZN5Botan25MessageAuthenticationCode10verify_macERKSt6vectorIhSaIhEE called 0 returned 0% blocks executed 0% #####: 111: virtual bool verify_mac(const std::vector& in) -: 112: { #####: 113: return verify_mac(in.data(), in.size()); call 0 never executed -: 114: } -: 115: -: 116: /** -: 117: * Verify a MAC. -: 118: * @param in the MAC to verify as a byte array -: 119: * @return true if the MAC is valid, false otherwise -: 120: */ function _ZN5Botan25MessageAuthenticationCode10verify_macERKSt6vectorIhNS_16secure_allocatorIhEEE called 0 returned 0% blocks executed 0% #####: 121: virtual bool verify_mac(const secure_vector& in) -: 122: { #####: 123: return verify_mac(in.data(), in.size()); call 0 never executed -: 124: } -: 125: -: 126: /** -: 127: * Get a new object representing the same algorithm as *this -: 128: */ -: 129: virtual MessageAuthenticationCode* clone() const = 0; -: 130: -: 131: /** -: 132: * @return provider information about this implementation. Default is "base", -: 133: * might also return "sse2", "avx2", "openssl", or some other arbitrary string. -: 134: */ function _ZNK5Botan25MessageAuthenticationCode8providerB5cxx11Ev called 0 returned 0% blocks executed 0% #####: 135: virtual std::string provider() const { return "base"; } call 0 never executed -: 136: -: 137: }; -: 138: -: 139:typedef MessageAuthenticationCode MAC; -: 140: -: 141:} -: 142: -: 143:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#cli#zfec.cpp.gcov -: 0:Source:src/cli/zfec.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/zfec.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/zfec.gcda -: 0:Runs:723 -: 1:/* -: 2:* (C) 2021 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "cli.h" -: 8: -: 9:#if defined(BOTAN_HAS_ZFEC) && defined(BOTAN_HAS_SHA2_64) -: 10: #include -: 11: #include -: 12: #include -: 13: #include -: 14: #include -: 15:#endif -: 16: -: 17:namespace Botan_CLI { -: 18: -: 19:#if defined(BOTAN_HAS_ZFEC) && defined(BOTAN_HAS_SHA2_64) -: 20: -: 21:static const uint32_t FEC_MAGIC = 0xFECC0DEC; -: 22:const char* FEC_SHARE_HASH = "SHA-512-256"; -: 23: 44*: 24:class FEC_Share final call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed call 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% 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% call 14 returned 100% branch 15 taken 100% (fallthrough) branch 16 taken 0% (throw) branch 17 taken 100% (fallthrough) branch 18 taken 0% branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 taken 100% (fallthrough) branch 24 taken 0% branch 25 never executed branch 26 never executed -: 25: { -: 26: public: -: 27: FEC_Share() : -: 28: m_share(0), -: 29: m_k(0), -: 30: m_n(0), -: 31: m_padding(0), -: 32: m_bits() -: 33: {} -: 34: 15: 35: FEC_Share(size_t share, size_t k, size_t n, -: 36: size_t padding, 5: 37: const uint8_t bits[], size_t len) : -: 38: m_share(share), -: 39: m_k(k), -: 40: m_n(n), -: 41: m_padding(padding), 30: 42: m_bits(bits, bits + len) -: 43: { -: 44: } -: 45: 8: 46: size_t share_id() const { return m_share; } 10: 47: size_t k() const { return m_k; } 10: 48: size_t n() const { return m_n; } 5: 49: size_t padding() const { return m_padding; } 3: 50: size_t share_size() const { return m_bits.size(); } branch 0 taken 0% (fallthrough) branch 1 taken 100% 3: 51: const uint8_t* share_data() const { return m_bits.data(); } -: 52: function _ZN9Botan_CLI9FEC_Share11deserializeEPKhmRN5Botan12HashFunctionE called 10 returned 100% blocks executed 22% 10: 53: static FEC_Share deserialize(const uint8_t bits[], size_t len, -: 54: Botan::HashFunction& hash) -: 55: { 10: 56: const size_t hash_len = hash.output_length(); call 0 returned 100% -: 57: 10: 58: if(len < FEC_SHARE_HEADER_LEN + hash_len) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 59: throw CLI_Error("FEC share is too short to be valid"); 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 -: 60: 10: 61: if(Botan::load_be(bits, 0) != FEC_MAGIC) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 62: throw CLI_Error("FEC share does not have expected magic bytes"); 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 -: 63: -: 64: // verify that reserved bytes are zero 50: 65: for(size_t i = 8; i != 12; ++i) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 66: { 40: 67: if(bits[i] != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 68: throw CLI_Error("FEC share has reserved header bytes 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 -: 69: } -: 70: 10: 71: size_t share_id = bits[4]; 10: 72: size_t k = bits[5]; 10: 73: size_t n = bits[6]; 10: 74: size_t padding = bits[7]; -: 75: 10: 76: if(share_id >= n || k >= n || padding >= k) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 77: throw CLI_Error("FEC share has invalid k/n/padding fields"); 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 -: 78: 10: 79: hash.update(bits, len - hash_len); call 0 returned 100% 10: 80: auto share_hash = hash.final(); call 0 returned 100% -: 81: 20: 82: const bool digest_ok = Botan::same_mem( 10: 83: share_hash.data(), &bits[len - hash_len], hash_len); -: 84: 10: 85: if(!digest_ok) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 86: throw CLI_Error("FEC share has invalid hash"); 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 -: 87: 10: 88: return FEC_Share(share_id, k, n, padding, -: 89: bits + FEC_SHARE_HEADER_LEN, 20: 90: len - (FEC_SHARE_HEADER_LEN + hash_len)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 91: } -: 92: function _ZNK9Botan_CLI9FEC_Share12serialize_toERN5Botan12HashFunctionERSo called 5 returned 100% blocks executed 79% 5: 93: void serialize_to(Botan::HashFunction& hash, std::ostream& out) const -: 94: { 5: 95: uint8_t header[FEC_SHARE_HEADER_LEN] = { 0 }; -: 96: 5: 97: Botan::store_be(FEC_MAGIC, header); call 0 returned 100% 5: 98: header[4] = static_cast(m_share); 5: 99: header[5] = static_cast(m_k); 5: 100: header[6] = static_cast(m_n); 5: 101: header[7] = static_cast(m_padding); -: 102: // bytes 8..12 left as zero/reserved -: 103: 5: 104: out.write(reinterpret_cast(header), sizeof(header)); call 0 returned 100% 5: 105: out.write(reinterpret_cast(m_bits.data()), m_bits.size()); call 0 returned 100% -: 106: 5: 107: hash.update(header, sizeof(header)); call 0 returned 100% 5: 108: hash.update(m_bits); call 0 returned 100% 5: 109: auto digest = hash.final(); call 0 returned 100% -: 110: 5: 111: out.write(reinterpret_cast(digest.data()), digest.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 112: } -: 113: -: 114: private: -: 115: static const size_t FEC_SHARE_HEADER_LEN = 12; -: 116: -: 117: size_t m_share; -: 118: size_t m_k; -: 119: size_t m_n; -: 120: size_t m_padding; -: 121: std::vector m_bits; -: 122: }; -: 123: -: 124:class FEC_Encode final : public Command -: 125: { -: 126: public: function _ZN9Botan_CLI10FEC_EncodeC2Ev called 2 returned 100% blocks executed 64% 4: 127: FEC_Encode() : Command("fec_encode --suffix=fec --prefix= --output-dir= k n input") {} 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) -: 128: function _ZNK9Botan_CLI10FEC_Encode5groupB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 129: std::string group() const override -: 130: { 1: 131: return "fec"; call 0 returned 100% -: 132: } -: 133: function _ZNK9Botan_CLI10FEC_Encode11descriptionB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 134: std::string description() const override -: 135: { 1: 136: return "Forward error encode a file"; call 0 returned 100% -: 137: } -: 138: function _ZN9Botan_CLI10FEC_Encode2goEv called 1 returned 100% blocks executed 38% 1: 139: void go() override -: 140: { 1: 141: const size_t k = get_arg_sz("k"); 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: 142: const size_t n = get_arg_sz("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) branch 6 taken 0% (fallthrough) branch 7 taken 100% call 8 never executed -: 143: 1: 144: const std::string suffix = get_arg("suffix"); 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: 145: const std::string prefix = get_arg("prefix"); 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: 146: const std::string input = get_arg("input"); 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: 147: const std::string output_dir = get_arg("output-dir"); 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% -: 148: 2: 149: Botan::ZFEC fec(k, n); // checks k/n for validity call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 150: 3: 151: auto hash = Botan::HashFunction::create_or_throw(FEC_SHARE_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% -: 152: 3: 153: auto input_data = slurp_file(get_arg("input")); 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% branch 13 never executed branch 14 never executed -: 154: -: 155: // append a hash of the input 1: 156: hash->update(input_data); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 157: const auto hash_of_input = hash->final(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 1: 158: input_data.insert(input_data.end(), -: 159: hash_of_input.begin(), 1: 160: hash_of_input.end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 161: -: 162: // add padding 0x00 bytes as needed to round up to k multiple 1: 163: size_t padding = 0; 2: 164: while(input_data.size() % k != 0) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 165: { 1: 166: padding += 1; 1: 167: input_data.push_back(0x00); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 168: } -: 169: function _ZZN9Botan_CLI10FEC_Encode2goEvENKUlmPKhmE_clEmS2_m called 5 returned 100% blocks executed 69% 6: 170: auto encoder_fn = [&](size_t share, -: 171: const uint8_t bits[], size_t len) -: 172: { 10: 173: std::ostringstream output_fsname; call 0 returned 100% call 1 returned 100% -: 174: 5: 175: if(!output_dir.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% 5: 176: output_fsname << output_dir << "/"; 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) -: 177: 5: 178: if(!prefix.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% 5: 179: output_fsname << prefix; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 180: else #####: 181: output_fsname << input; call 0 never executed branch 1 never executed branch 2 never executed -: 182: 5: 183: output_fsname << "." << (share + 1) << "_" << 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) -: 184: 5: 185: if(!suffix.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% 5: 186: output_fsname << "." << suffix; 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) -: 187: 5: 188: std::ofstream output(output_fsname.str(), std::ios::binary); 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 -: 189: 10: 190: FEC_Share fec_share(share, k, n, padding, bits, len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 5: 191: fec_share.serialize_to(*hash, output); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 192: }; -: 193: 2: 194: fec.encode(input_data.data(), input_data.size(), encoder_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 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed 1: 195: } -: 196: }; -: 197: function _ZNK9Botan_CLIUlvE_clEv.isra.0 called 2 returned 100% blocks executed 83% 2: 198:BOTAN_REGISTER_COMMAND("fec_encode", FEC_Encode); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 199: -: 200:class FEC_Decode final : public Command -: 201: { -: 202: public: function _ZN9Botan_CLI10FEC_DecodeC2Ev called 3 returned 100% blocks executed 64% 6: 203: FEC_Decode() : Command("fec_decode *shares") {} 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) -: 204: function _ZNK9Botan_CLI10FEC_Decode5groupB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 205: std::string group() const override -: 206: { 1: 207: return "fec"; call 0 returned 100% -: 208: } -: 209: function _ZNK9Botan_CLI10FEC_Decode11descriptionB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 210: std::string description() const override -: 211: { 1: 212: return "Recover data from FEC shares"; call 0 returned 100% -: 213: } -: 214: function _ZN9Botan_CLI10FEC_Decode2goEv called 2 returned 100% blocks executed 45% 2: 215: void go() override -: 216: { 5: 217: auto hash = Botan::HashFunction::create_or_throw(FEC_SHARE_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed 2: 218: const size_t hash_len = hash->output_length(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 219: 3: 220: std::vector shares; 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 never executed -: 221: 7: 222: for(auto share_fsname: get_arg_list("shares")) 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 71% (fallthrough) branch 9 taken 29% call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% (throw) call 13 returned 100% call 14 never executed -: 223: { 10: 224: const auto share_bits = slurp_file(share_fsname); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 225: 5: 226: try -: 227: { 5: 228: auto share = FEC_Share::deserialize(share_bits.data(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 229: share_bits.size(), 10: 230: *hash); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 231: shares.push_back(share); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 232: } =====: 233: catch(std::exception& e) call 0 never executed call 1 never executed call 2 never executed -: 234: { =====: 235: error_output() << "Ignoring invalid share '" << share_fsname call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed =====: 236: << "': " << 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 -: 237: } -: 238: } -: 239: 2: 240: if(shares.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 241: { #####: 242: error_output() << "Must provide a list of at least k shares\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 #####: 243: this->set_return_code(1); 1*: 244: return; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 245: } -: 246: 2: 247: size_t k = 0; 2: 248: size_t n = 0; 2: 249: size_t padding = 0; 2: 250: size_t share_size = 0; -: 251: 7: 252: for(auto share: shares) branch 0 taken 71% (fallthrough) branch 1 taken 29% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 253: { 5: 254: if(k == 0 && n == 0 && padding == 0) branch 0 taken 40% (fallthrough) branch 1 taken 60% -: 255: { 2: 256: k = share.k(); 2: 257: n = share.n(); 2: 258: padding = share.padding(); 2: 259: share_size = share.share_size(); -: 260: } -: 261: else -: 262: { 6: 263: if(share.k() != k || 3: 264: share.n() != n || branch 0 taken 100% (fallthrough) branch 1 taken 0% 6: 265: share.padding() != padding || branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% 3: 266: share.share_size() != share_size) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 267: { #####: 268: error_output() << "Shares have mismatched k/n/padding/size values\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 #####: 269: this->set_return_code(2); branch 0 never executed branch 1 never executed #####: 270: return; branch 0 never executed branch 1 never executed -: 271: } -: 272: } -: 273: } -: 274: 2: 275: if(shares.size() < k) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 276: { 1: 277: error_output() << "At least " << k << " shares are required for recovery\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: 278: this->set_return_code(2); 1: 279: return; -: 280: } -: 281: 2: 282: Botan::ZFEC fec(k, n); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 283: 2: 284: std::vector decoded(share_size * k); 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 -: 285: 4: 286: auto decoder_fn = [&](size_t share, -: 287: const uint8_t bits[], size_t len) -: 288: { 3: 289: std::memcpy(&decoded[share * share_size], -: 290: bits, len); 1: 291: }; -: 292: 2: 293: std::map share_ptrs; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 294: 4: 295: for(auto& share: shares) branch 0 taken 75% (fallthrough) branch 1 taken 25% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 3: 296: share_ptrs[share.share_id()] = share.share_data(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 297: 1: 298: fec.decode_shares(share_ptrs, share_size, decoder_fn); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 299: 1: 300: auto decoded_digest = hash->process( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 301: decoded.data(), decoded.size() - (hash_len + padding)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 302: 1: 303: if(!Botan::same_mem(decoded_digest.data(), branch 0 taken 0% (fallthrough) branch 1 taken 100% 1: 304: &decoded[decoded.size() - (hash_len + padding)], -: 305: hash_len)) #####: 306: throw CLI_Error("Recovered data failed digest check"); 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 -: 307: 2: 308: for(size_t i = 0; i != padding; ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% 1: 309: if(decoded[decoded.size() - padding + i] != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 310: throw CLI_Error("Recovered data had non-zero padding bytes"); 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 -: 311: 1: 312: output().write(reinterpret_cast(decoded.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) 1: 313: decoded.size() - (hash_len + padding)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 314: } -: 315: }; -: 316: function _ZNK9Botan_CLIUlvE0_clEv.isra.0 called 3 returned 100% blocks executed 83% 3: 317:BOTAN_REGISTER_COMMAND("fec_decode", FEC_Decode); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 318: -: 319:class FEC_Info final : public Command -: 320: { -: 321: public: function _ZN9Botan_CLI8FEC_InfoC2Ev called 6 returned 100% blocks executed 45% 12: 322: FEC_Info() : Command("fec_info share") {} 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) -: 323: function _ZNK9Botan_CLI8FEC_Info5groupB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 324: std::string group() const override -: 325: { 1: 326: return "fec"; call 0 returned 100% -: 327: } -: 328: function _ZNK9Botan_CLI8FEC_Info11descriptionB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 329: std::string description() const override -: 330: { 1: 331: return "Display information about a FEC share"; call 0 returned 100% -: 332: } -: 333: function _ZN9Botan_CLI8FEC_Info2goEv called 5 returned 100% blocks executed 40% 5: 334: void go() override -: 335: { 10: 336: auto hash = Botan::HashFunction::create_or_throw(FEC_SHARE_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 never executed -: 337: 10: 338: const std::string share_fsname = get_arg("share"); 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% 10: 339: const auto share_bits = slurp_file(share_fsname); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 340: 5: 341: try -: 342: { 5: 343: auto share = FEC_Share::deserialize(share_bits.data(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 344: share_bits.size(), 10: 345: *hash); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 346: output() << "FEC share " << share.share_id() + 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) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) 5: 347: << share.n() << " with " << share.k() 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: 348: << " needed for recovery\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 349: } =====: 350: catch(std::exception& e) call 0 never executed call 1 never executed call 2 never executed -: 351: { =====: 352: error_output() << "Invalid share '" << share_fsname call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed =====: 353: << "': " << 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 -: 354: } 5: 355: } -: 356: }; -: 357: function _ZNK9Botan_CLIUlvE1_clEv.isra.0 called 6 returned 100% blocks executed 83% 6: 358:BOTAN_REGISTER_COMMAND("fec_info", FEC_Info); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 359: -: 360:#endif -: 361: -: 362:} <<<<<< 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/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:2960 -: 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:namespace Botan { -: 76: -: 77:std::unique_ptr function _ZN5Botan15load_public_keyERKNS_19AlgorithmIdentifierERKSt6vectorIhSaIhEE called 12167 returned 90% blocks executed 83% 12167: 78:load_public_key(const AlgorithmIdentifier& alg_id, -: 79: const std::vector& key_bits) -: 80: { 23104: 81: const std::string oid_str = alg_id.get_oid().to_formatted_string(); call 0 returned 100% 24334: 82: 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% 24334: 83: 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% -: 84: -: 85:#if defined(BOTAN_HAS_RSA) 12167: 86: if(alg_name == "RSA") call 0 returned 100% branch 1 taken 75% (fallthrough) branch 2 taken 25% 9146: 87: 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% -: 88:#endif -: 89: -: 90:#if defined(BOTAN_HAS_CURVE_25519) 3021: 91: if(alg_name == "Curve25519") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 23: 92: 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 -: 93:#endif -: 94: -: 95:#if defined(BOTAN_HAS_MCELIECE) 2998: 96: if(alg_name == "McEliece") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% 4: 97: 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 -: 98:#endif -: 99: -: 100:#if defined(BOTAN_HAS_ECDSA) 2994: 101: if(alg_name == "ECDSA") call 0 returned 100% branch 1 taken 56% (fallthrough) branch 2 taken 44% 1666: 102: 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% -: 103:#endif -: 104: -: 105:#if defined(BOTAN_HAS_ECDH) 1328: 106: if(alg_name == "ECDH") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 19: 107: 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% -: 108:#endif -: 109: -: 110:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 1309: 111: if(alg_name == "DH") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 15: 112: 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% -: 113:#endif -: 114: -: 115:#if defined(BOTAN_HAS_DSA) 1294: 116: if(alg_name == "DSA") call 0 returned 100% branch 1 taken 20% (fallthrough) branch 2 taken 80% 264: 117: 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 53% (fallthrough) branch 5 taken 47% (throw) call 6 returned 100% -: 118:#endif -: 119: -: 120:#if defined(BOTAN_HAS_ELGAMAL) 1030: 121: if(alg_name == "ElGamal") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 6: 122: 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 -: 123:#endif -: 124: -: 125:#if defined(BOTAN_HAS_ECGDSA) 1024: 126: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% 65: 127: 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 -: 128:#endif -: 129: -: 130:#if defined(BOTAN_HAS_ECKCDSA) 959: 131: if(alg_name == "ECKCDSA") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% 56: 132: 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 -: 133:#endif -: 134: -: 135:#if defined(BOTAN_HAS_ED25519) 903: 136: if(alg_name == "Ed25519") call 0 returned 100% branch 1 taken 81% (fallthrough) branch 2 taken 19% 729: 137: 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 -: 138:#endif -: 139: -: 140:#if defined(BOTAN_HAS_GOST_34_10_2001) 467: 141: 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: 142: 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 -: 143:#endif -: 144: -: 145:#if defined(BOTAN_HAS_SM2) 323: 146: 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: 147: 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 -: 148:#endif -: 149: -: 150:#if defined(BOTAN_HAS_XMSS_RFC8391) 102: 151: if(alg_name == "XMSS") call 0 returned 100% branch 1 taken 21% branch 2 taken 79% 10937: 152: 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 -: 153:#endif -: 154: 162: 155: 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 -: 156: } -: 157: -: 158:std::unique_ptr function _ZN5Botan16load_private_keyERKNS_19AlgorithmIdentifierERKSt6vectorIhNS_16secure_allocatorIhEEE called 2158 returned 71% blocks executed 84% 2158: 159:load_private_key(const AlgorithmIdentifier& alg_id, -: 160: const secure_vector& key_bits) -: 161: { 3683: 162: const std::string alg_name = alg_id.get_oid().to_formatted_string(); call 0 returned 100% -: 163: -: 164:#if defined(BOTAN_HAS_RSA) 2158: 165: if(alg_name == "RSA") call 0 returned 100% branch 1 taken 47% (fallthrough) branch 2 taken 53% 1022: 166: 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% -: 167:#endif -: 168: -: 169:#if defined(BOTAN_HAS_CURVE_25519) 1136: 170: if(alg_name == "Curve25519") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% 28: 171: 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% -: 172:#endif -: 173: -: 174:#if defined(BOTAN_HAS_ECDSA) 1108: 175: if(alg_name == "ECDSA") call 0 returned 100% branch 1 taken 55% (fallthrough) branch 2 taken 45% 611: 176: 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% -: 177:#endif -: 178: -: 179:#if defined(BOTAN_HAS_ECDH) 497: 180: if(alg_name == "ECDH") call 0 returned 100% branch 1 taken 19% (fallthrough) branch 2 taken 81% 96: 181: 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% -: 182:#endif -: 183: -: 184:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 401: 185: if(alg_name == "DH") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% 18: 186: 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% -: 187:#endif -: 188: -: 189:#if defined(BOTAN_HAS_DSA) 383: 190: if(alg_name == "DSA") call 0 returned 100% branch 1 taken 55% (fallthrough) branch 2 taken 45% 211: 191: 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% -: 192:#endif -: 193: -: 194:#if defined(BOTAN_HAS_MCELIECE) 172: 195: if(alg_name == "McEliece") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% 4: 196: 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 -: 197:#endif -: 198: -: 199:#if defined(BOTAN_HAS_ECGDSA) 168: 200: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 11% (fallthrough) branch 2 taken 89% 18: 201: 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 -: 202:#endif -: 203: -: 204:#if defined(BOTAN_HAS_ECKCDSA) 150: 205: if(alg_name == "ECKCDSA") call 0 returned 100% branch 1 taken 12% (fallthrough) branch 2 taken 88% 18: 206: 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 -: 207:#endif -: 208: -: 209:#if defined(BOTAN_HAS_ED25519) 132: 210: if(alg_name == "Ed25519") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% 4: 211: 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% -: 212:#endif -: 213: -: 214:#if defined(BOTAN_HAS_GOST_34_10_2001) 372: 215: 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: 216: 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 -: 217:#endif -: 218: -: 219:#if defined(BOTAN_HAS_SM2) 308: 220: 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: 221: 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 -: 222:#endif -: 223: -: 224:#if defined(BOTAN_HAS_ELGAMAL) 96: 225: if(alg_name == "ElGamal") call 0 returned 100% branch 1 taken 15% branch 2 taken 85% 14: 226: 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 -: 227:#endif -: 228: -: 229:#if defined(BOTAN_HAS_XMSS_RFC8391) 82: 230: if(alg_name == "XMSS") call 0 returned 100% branch 1 taken 12% (fallthrough) branch 2 taken 88% 1525: 231: 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 -: 232:#endif -: 233: 144: 234: 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 -: 235: } -: 236: -: 237:#if defined(BOTAN_HAS_ECC_GROUP) -: 238: -: 239:namespace { -: 240: function _ZN5Botan12_GLOBAL__N_120default_ec_group_forERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 9 returned 100% blocks executed 80% 9: 241:std::string default_ec_group_for(const std::string& alg_name) -: 242: { 27: 243: 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% #####: 244: return "sm2p256v1"; call 0 never executed 18: 245: 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% #####: 246: return "gost_256A"; call 0 never executed 9: 247: if(alg_name == "GOST-34.10-2012-512") call 0 returned 100% branch 1 taken 0% branch 2 taken 100% #####: 248: return "gost_512A"; call 0 never executed 9: 249: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 250: return "brainpool256r1"; call 0 never executed 9: 251: return "secp256r1"; call 0 returned 100% -: 252: -: 253: } -: 254: -: 255:} -: 256: -: 257:#endif -: 258: -: 259:std::unique_ptr function _ZN5Botan18create_private_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_21RandomNumberGeneratorES7_S7_ called 201 returned 100% blocks executed 54% 201: 260:create_private_key(const std::string& alg_name, -: 261: RandomNumberGenerator& rng, -: 262: const std::string& params, -: 263: const std::string& provider) -: 264: { -: 265: /* -: 266: * Default paramaters are chosen for work factor > 2**128 where possible -: 267: */ -: 268: -: 269:#if defined(BOTAN_HAS_CURVE_25519) 201: 270: if(alg_name == "Curve25519") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 3: 271: 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 -: 272:#endif -: 273: -: 274:#if defined(BOTAN_HAS_RSA) 198: 275: if(alg_name == "RSA") call 0 returned 100% branch 1 taken 17% (fallthrough) branch 2 taken 83% -: 276: { 33: 277: const size_t rsa_bits = (params.empty() ? 3072 : to_u32bit(params)); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% 33: 278: 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 -: 279: } -: 280:#endif -: 281: -: 282:#if defined(BOTAN_HAS_MCELIECE) 165: 283: if(alg_name == "McEliece") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 284: { 3: 285: std::vector mce_param = branch 0 taken 0% (fallthrough) branch 1 taken 100% 9*: 286: 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 -: 287: 3: 288: if(mce_param.size() != 2) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 289: 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 -: 290: 3: 291: 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: 292: size_t mce_t = Botan::to_u32bit(mce_param[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 293: 3: 294: 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 -: 295: } -: 296:#endif -: 297: -: 298:#if defined(BOTAN_HAS_XMSS_RFC8391) 162: 299: if(alg_name == "XMSS") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 300: { 3: 301: return std::unique_ptr( branch 0 taken 33% (fallthrough) branch 1 taken 67% 8: 302: 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 -: 303: } -: 304:#endif -: 305: -: 306:#if defined(BOTAN_HAS_ED25519) 159: 307: if(alg_name == "Ed25519") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 308: { 3: 309: 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 -: 310: } -: 311:#endif -: 312: -: 313: // ECC crypto -: 314:#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO) -: 315: 156: 316: if(alg_name == "ECDSA" || call 0 returned 100% 129: 317: alg_name == "ECDH" || branch 0 taken 74% (fallthrough) branch 1 taken 26% 95: 318: alg_name == "ECKCDSA" || branch 0 taken 82% (fallthrough) branch 1 taken 18% 78: 319: alg_name == "ECGDSA" || branch 0 taken 78% (fallthrough) branch 1 taken 22% 61: 320: alg_name == "SM2" || branch 0 taken 93% (fallthrough) branch 1 taken 7% 57: 321: alg_name == "SM2_Sig" || branch 0 taken 88% (fallthrough) branch 1 taken 12% 50: 322: alg_name == "SM2_Enc" || branch 0 taken 98% (fallthrough) branch 1 taken 2% 49: 323: alg_name == "GOST-34.10" || branch 0 taken 78% (fallthrough) branch 1 taken 22% 194: 324: 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: 325: alg_name == "GOST-34.10-2012-512") branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 326: { 227*: 327: 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 -: 328: -: 329:#if defined(BOTAN_HAS_ECDSA) 118: 330: if(alg_name == "ECDSA") call 0 returned 100% branch 1 taken 23% (fallthrough) branch 2 taken 77% 27: 331: 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 -: 332:#endif -: 333: -: 334:#if defined(BOTAN_HAS_ECDH) 91: 335: if(alg_name == "ECDH") call 0 returned 100% branch 1 taken 37% (fallthrough) branch 2 taken 63% 34: 336: 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 -: 337:#endif -: 338: -: 339:#if defined(BOTAN_HAS_ECKCDSA) 57: 340: if(alg_name == "ECKCDSA") call 0 returned 100% branch 1 taken 30% (fallthrough) branch 2 taken 70% 17: 341: 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 -: 342:#endif -: 343: -: 344:#if defined(BOTAN_HAS_GOST_34_10_2001) 98: 345: 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: 346: 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 -: 347:#endif -: 348: -: 349:#if defined(BOTAN_HAS_SM2) 72: 350: 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: 351: 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 -: 352:#endif -: 353: -: 354:#if defined(BOTAN_HAS_ECGDSA) 17: 355: if(alg_name == "ECGDSA") call 0 returned 100% branch 1 taken 100% branch 2 taken 0% 17: 356: 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 -: 357:#endif -: 358: } -: 359:#endif -: 360: -: 361: // DL crypto -: 362:#if defined(BOTAN_HAS_DL_GROUP) 65: 363: 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% -: 364: { 63*: 365: 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*: 366: 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 -: 367: -: 368:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 38: 369: if(alg_name == "DH") call 0 returned 100% branch 1 taken 47% (fallthrough) branch 2 taken 53% 18: 370: 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 -: 371:#endif -: 372: -: 373:#if defined(BOTAN_HAS_DSA) 20: 374: if(alg_name == "DSA") call 0 returned 100% branch 1 taken 65% (fallthrough) branch 2 taken 35% 13: 375: 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 -: 376:#endif -: 377: -: 378:#if defined(BOTAN_HAS_ELGAMAL) 7: 379: if(alg_name == "ElGamal") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% 7: 380: 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 -: 381:#endif -: 382: } -: 383:#endif -: 384: #####: 385: BOTAN_UNUSED(alg_name, rng, params, provider); -: 386: 201*: 387: return std::unique_ptr(); -: 388: } -: 389: -: 390:std::vector function _ZN5Botan26probe_provider_private_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS5_SaIS5_EE called 29 returned 100% blocks executed 89% 29: 391:probe_provider_private_key(const std::string& alg_name, -: 392: const std::vector possible) -: 393: { 29: 394: std::vector providers; 145: 395: for(auto&& prov : possible) branch 0 taken 80% (fallthrough) branch 1 taken 20% call 2 returned 100% -: 396: { 116: 397: if(prov == "base") call 0 returned 100% branch 1 taken 25% (fallthrough) branch 2 taken 75% -: 398: { 29: 399: providers.push_back(prov); // available call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 400: } -: 401: } -: 402: 29: 403: BOTAN_UNUSED(alg_name); -: 404: 29: 405: return providers; -: 406: } -: 407:} <<<<<< 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:2960 -: 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/src#lib#math#numbertheory#numthry.cpp.gcov -: 0:Source:src/lib/math/numbertheory/numthry.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_numthry.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_numthry.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Number Theory Functions -: 3:* (C) 1999-2011,2016,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:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18: -: 19:namespace Botan { -: 20: -: 21:namespace { -: 22: function _ZN5Botan12_GLOBAL__N_17sub_absERNS_6BigIntERKS1_S4_ called 4309439 returned 100% blocks executed 82% 4309439: 23:void sub_abs(BigInt& z, const BigInt& x, const BigInt& y) -: 24: { 4309439: 25: const size_t x_sw = x.sig_words(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 4309439: 26: const size_t y_sw = y.sig_words(); branch 0 taken 100% (fallthrough) branch 1 taken 1% 4323500: 27: z.resize(std::max(x_sw, y_sw)); branch 0 taken 1% (fallthrough) branch 1 taken 100% call 2 returned 100% -: 28: 4309439: 29: bigint_sub_abs(z.mutable_data(), call 0 returned 100% -: 30: x.data(), x_sw, -: 31: y.data(), y_sw); 4309439: 32: } -: 33: -: 34:} -: 35: -: 36:/* -: 37:* Return the number of 0 bits at the end of n -: 38:*/ function _ZN5Botan13low_zero_bitsERKNS_6BigIntE called 1039556 returned 100% blocks executed 100% 1039556: 39:size_t low_zero_bits(const BigInt& n) -: 40: { 1039556: 41: size_t low_zero = 0; -: 42: 1039556: 43: auto seen_nonempty_word = CT::Mask::cleared(); -: 44: 10932129: 45: for(size_t i = 0; i != n.size(); ++i) branch 0 taken 90% (fallthrough) branch 1 taken 10% -: 46: { 9892573: 47: const word x = n.word_at(i); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 48: -: 49: // ctz(0) will return sizeof(word) 9892573: 50: const size_t tz_x = ctz(x); -: 51: -: 52: // if x > 0 we want to count tz_x in total but not any -: 53: // further words, so set the mask after the addition 9892573: 54: low_zero += seen_nonempty_word.if_not_set_return(tz_x); -: 55: 9892573: 56: seen_nonempty_word |= CT::Mask::expand(x); -: 57: } -: 58: -: 59: // if we saw no words with x > 0 then n == 0 and the value we have -: 60: // computed is meaningless. Instead return 0 in that case. 1039556: 61: return seen_nonempty_word.if_set_return(low_zero); -: 62: } -: 63: -: 64:namespace { -: 65: 21401: 66:size_t safegcd_loop_bound(size_t f_bits, size_t g_bits) -: 67: { 21401: 68: const size_t d = std::max(f_bits, g_bits); branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 69: 21401: 70: if(d < 46) branch 0 taken 50% (fallthrough) branch 1 taken 50% 10705: 71: return (49*d + 80) / 17; -: 72: else 10696: 73: return (49*d + 57) / 17; -: 74: } -: 75: -: 76:} -: 77: -: 78:/* -: 79:* Calculate the GCD -: 80:*/ function _ZN5Botan3gcdERKNS_6BigIntES2_ called 21405 returned 100% blocks executed 79% 21405: 81:BigInt gcd(const BigInt& a, const BigInt& b) -: 82: { 23150: 83: if(a.is_zero()) branch 0 taken 8% (fallthrough) branch 1 taken 92% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 84: return abs(b); call 0 never executed 41541: 85: if(b.is_zero()) branch 0 taken 94% (fallthrough) branch 1 taken 6% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 86: return abs(a); call 0 never executed 42806: 87: if(a == 1 || b == 1) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% branch 3 taken 0% (fallthrough) branch 4 taken 100% 4: 88: return 1; call 0 returned 100% -: 89: -: 90: // See https://gcd.cr.yp.to/safegcd-20190413.pdf fig 1.2 -: 91: 42806: 92: BigInt f = a; call 0 returned 100% 42802: 93: BigInt g = b; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 21401: 94: f.const_time_poison(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 21401: 95: g.const_time_poison(); -: 96: 21401: 97: f.set_sign(BigInt::Positive); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 21401: 98: g.set_sign(BigInt::Positive); -: 99: 21401: 100: const size_t common2s = std::min(low_zero_bits(f), low_zero_bits(g)); 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 4% (fallthrough) branch 7 taken 96% branch 8 never executed branch 9 never executed 21401: 101: CT::unpoison(common2s); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 102: 21401: 103: f >>= common2s; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 21401: 104: g >>= common2s; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 105: 42802: 106: f.ct_cond_swap(f.is_even(), g); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 107: 21401: 108: int32_t delta = 1; -: 109: 21401: 110: const size_t loop_cnt = safegcd_loop_bound(f.bits(), g.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) -: 111: 64203: 112: BigInt newg, t; 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 4330840: 113: for(size_t i = 0; i != loop_cnt; ++i) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 114: { 4309439: 115: sub_abs(newg, f, g); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 116: 8618878: 117: const bool need_swap = (g.is_odd() && delta > 0); branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 39% (fallthrough) branch 3 taken 61% branch 4 taken 49% (fallthrough) branch 5 taken 51% -: 118: -: 119: // if(need_swap) { delta *= -1 } else { delta *= 1 } 4309439: 120: delta *= CT::Mask::expand(need_swap).if_not_set_return(2) - 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4309439: 121: f.ct_cond_swap(need_swap, g); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4309439: 122: g.ct_cond_swap(need_swap, newg); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 123: 4309439: 124: delta += 1; -: 125: 8618878: 126: g.ct_cond_add(g.is_odd(), f); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 4309439: 127: g >>= 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 128: } -: 129: 21401: 130: f <<= common2s; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 131: 21401: 132: f.const_time_unpoison(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 21401: 133: g.const_time_unpoison(); -: 134: 42802*: 135: BOTAN_ASSERT_NOMSG(g.is_zero()); branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% call 4 never executed -: 136: 21401: 137: return f; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 138: } -: 139: -: 140:/* -: 141:* Calculate the LCM -: 142:*/ function _ZN5Botan3lcmERKNS_6BigIntES2_ called 486 returned 100% blocks executed 61% 486: 143:BigInt lcm(const BigInt& a, const BigInt& b) -: 144: { 1458: 145: return ct_divide(a * b, gcd(a, b)); 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 100% (fallthrough) branch 8 taken 0% branch 9 never executed branch 10 never executed -: 146: } -: 147: -: 148:/* -: 149:* Modular Exponentiation -: 150:*/ function _ZN5Botan9power_modERKNS_6BigIntES2_S2_ called 25906 returned 100% blocks executed 60% 25906: 151:BigInt power_mod(const BigInt& base, const BigInt& exp, const BigInt& mod) -: 152: { 51812: 153: if(mod.is_negative() || mod == 1) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 154: { #####: 155: return 0; call 0 never executed -: 156: } -: 157: 52936: 158: if(base.is_zero() || mod.is_zero()) branch 0 taken 4% (fallthrough) branch 1 taken 96% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 159: { #####: 160: if(exp.is_zero()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 161: return 1; call 0 never executed #####: 162: return 0; call 0 never executed -: 163: } -: 164: 25906: 165: Modular_Reducer reduce_mod(mod); call 0 returned 100% call 1 never executed -: 166: 25906: 167: const size_t exp_bits = exp.bits(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 168: 51812: 169: if(mod.is_odd()) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 1% -: 170: { 25900: 171: const size_t powm_window = 4; -: 172: 51800: 173: auto monty_mod = std::make_shared(mod, reduce_mod); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 103600: 174: auto powm_base_mod = monty_precompute(monty_mod, reduce_mod.reduce(base), powm_window); 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 100% (fallthrough) branch 9 taken 0% branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed 25900: 175: return monty_execute(*powm_base_mod, exp, exp_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 176: } -: 177: -: 178: /* -: 179: Support for even modulus is just a convenience and not considered -: 180: cryptographically important, so this implementation is slow ... -: 181: */ 25912: 182: BigInt accum = 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 12: 183: BigInt g = reduce_mod.reduce(base); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 12: 184: BigInt t; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 185: 302: 186: for(size_t i = 0; i != exp_bits; ++i) branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 187: { 296: 188: t = reduce_mod.multiply(g, accum); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 98% (fallthrough) branch 4 taken 2% 296: 189: g = reduce_mod.square(g); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 592: 190: accum.ct_cond_assign(exp.get_bit(i), t); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 191: } 6: 192: return accum; branch 0 taken 83% (fallthrough) branch 1 taken 17% -: 193: } -: 194: -: 195: function _ZN5Botan17is_perfect_squareERKNS_6BigIntE called 707 returned 100% blocks executed 55% 707: 196:BigInt is_perfect_square(const BigInt& C) -: 197: { 707: 198: if(C < 1) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 199: throw Invalid_Argument("is_perfect_square requires C >= 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 707: 200: if(C == 1) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 201: return 1; call 0 never executed -: 202: 707: 203: const size_t n = C.bits(); call 0 returned 100% 707: 204: const size_t m = (n + 1) / 2; 1414: 205: const BigInt B = C + BigInt::power_of_2(m); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) -: 206: 2121: 207: BigInt X = BigInt::power_of_2(m) - 1; 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% branch 7 never executed branch 8 never executed 1414: 208: BigInt X2 = (X*X); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 91% (fallthrough) branch 4 taken 9% -: 209: 1684: 210: for(;;) -: 211: { 5052: 212: X = (X2 + C) / (2*X); 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 taken 100% (fallthrough) branch 14 taken 0% branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed 1684: 213: X2 = (X*X); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 214: 1684: 215: if(X2 < B) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 58% (fallthrough) branch 4 taken 42% -: 216: break; -: 217: } -: 218: 707: 219: if(X2 == C) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 9% (fallthrough) branch 4 taken 91% 707: 220: return X; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 221: else 644: 222: return 0; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 223: } -: 224: -: 225:/* -: 226:* Test for primality using Miller-Rabin -: 227:*/ function _ZN5Botan8is_primeERKNS_6BigIntERNS_21RandomNumberGeneratorEmb called 52630 returned 100% blocks executed 92% 52630: 228:bool is_prime(const BigInt& n, -: 229: RandomNumberGenerator& rng, -: 230: size_t prob, -: 231: bool is_random) -: 232: { 52630: 233: if(n == 2) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% -: 234: return true; 105256: 235: if(n <= 1 || n.is_even()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% branch 3 taken 100% (fallthrough) branch 4 taken 1% -: 236: return false; -: 237: 52626: 238: const size_t n_bits = n.bits(); call 0 returned 100% -: 239: -: 240: // Fast path testing for small numbers (<= 65521) 52626: 241: if(n_bits <= 16) branch 0 taken 62% (fallthrough) branch 1 taken 38% -: 242: { 32793: 243: const uint16_t num = static_cast(n.word_at(0)); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 244: 32793: 245: return std::binary_search(PRIMES, PRIMES + PRIME_TABLE_SIZE, num); call 0 returned 100% -: 246: } -: 247: 39666: 248: Modular_Reducer mod_n(n); call 0 returned 100% call 1 returned 100% call 2 never executed -: 249: 19833: 250: if(rng.is_seeded()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 251: { 19833: 252: const size_t t = miller_rabin_test_iterations(n_bits, prob, is_random); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 253: 19833: 254: if(is_miller_rabin_probable_prime(n, mod_n, rng, t) == false) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 17% (fallthrough) branch 4 taken 83% -: 255: return false; -: 256: 3365: 257: if(is_random) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 258: return true; -: 259: else 3176: 260: return is_lucas_probable_prime(n, mod_n); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 261: } -: 262: else -: 263: { #####: 264: return is_bailie_psw_probable_prime(n, mod_n); call 0 never executed branch 1 never executed branch 2 never executed -: 265: } -: 266: } -: 267: -: 268:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#date_time#constrained_value.hpp.gcov -: 0:Source:/usr/include/boost/date_time/constrained_value.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcda -: 0:Runs:2960 -: 1:#ifndef CONSTRAINED_VALUE_HPP___ -: 2:#define CONSTRAINED_VALUE_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 -: 9: * $Date$ -: 10: */ -: 11: -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18: -: 19:namespace boost { -: 20: -: 21://! Namespace containing constrained_value template and types -: 22:namespace CV { -: 23: //! Represent a min or max violation type -: 24: enum violation_enum {min_violation, max_violation}; -: 25: -: 26: //! A template to specify a constrained basic value type -: 27: /*! This template provides a quick way to generate -: 28: * an integer type with a constrained range. The type -: 29: * provides for the ability to specify the min, max, and -: 30: * and error handling policy. -: 31: * -: 32: * value policies -: 33: * A class that provides the range limits via the min and -: 34: * max functions as well as a function on_error that -: 35: * determines how errors are handled. A common strategy -: 36: * would be to assert or throw and exception. The on_error -: 37: * is passed both the current value and the new value that -: 38: * is in error. -: 39: * -: 40: */ -: 41: template -: 42: class BOOST_SYMBOL_VISIBLE constrained_value { -: 43: public: -: 44: typedef typename value_policies::value_type value_type; -: 45: // typedef except_type exception_type; #####: 46: constrained_value(value_type value) : value_((min)()) -: 47: { #####: 48: assign(value); -: 49: } -: 50: constrained_value& operator=(value_type v) -: 51: { -: 52: assign(v); -: 53: return *this; -: 54: } -: 55: //! Return the max allowed value (traits method) #####: 56: static value_type max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::max)();} -: 57: //! Return the min allowed value (traits method) #####: 58: static value_type min BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::min)();} -: 59: //! Coerce into the representation type -: 60: operator value_type() const {return value_;} -: 61: protected: -: 62: value_type value_; -: 63: private: #####: 64: void assign(value_type value) -: 65: { -: 66: //adding 1 below gets rid of a compiler warning which occurs when the -: 67: //min_value is 0 and the type is unsigned.... #####: 68: if (value+1 < (min)()+1) { #####: 69: value_policies::on_error(value_, value, min_violation); -: 70: return; -: 71: } #####: 72: if (value > (max)()) { #####: 73: value_policies::on_error(value_, value, max_violation); -: 74: return; -: 75: } #####: 76: value_ = value; -: 77: } ------------------ _ZN5boost2CV17constrained_valueINS0_23simple_exception_policyItLt1ELt12ENS_9gregorian9bad_monthEEEE6assignEt: function _ZN5boost2CV17constrained_valueINS0_23simple_exception_policyItLt1ELt12ENS_9gregorian9bad_monthEEEE6assignEt called 0 returned 0% blocks executed 0% #####: 64: void assign(value_type value) -: 65: { -: 66: //adding 1 below gets rid of a compiler warning which occurs when the -: 67: //min_value is 0 and the type is unsigned.... #####: 68: if (value+1 < (min)()+1) { #####: 69: value_policies::on_error(value_, value, min_violation); call 0 never executed -: 70: return; -: 71: } #####: 72: if (value > (max)()) { #####: 73: value_policies::on_error(value_, value, max_violation); call 0 never executed -: 74: return; -: 75: } #####: 76: value_ = value; -: 77: } ------------------ _ZN5boost2CV17constrained_valueINS0_23simple_exception_policyItLt1400ELt9999ENS_9gregorian8bad_yearEEEE6assignEt: function _ZN5boost2CV17constrained_valueINS0_23simple_exception_policyItLt1400ELt9999ENS_9gregorian8bad_yearEEEE6assignEt called 0 returned 0% blocks executed 0% #####: 64: void assign(value_type value) -: 65: { -: 66: //adding 1 below gets rid of a compiler warning which occurs when the -: 67: //min_value is 0 and the type is unsigned.... #####: 68: if (value+1 < (min)()+1) { #####: 69: value_policies::on_error(value_, value, min_violation); call 0 never executed -: 70: return; -: 71: } #####: 72: if (value > (max)()) { #####: 73: value_policies::on_error(value_, value, max_violation); call 0 never executed -: 74: return; -: 75: } #####: 76: value_ = value; -: 77: } ------------------ _ZN5boost2CV17constrained_valueINS0_23simple_exception_policyItLt1ELt31ENS_9gregorian16bad_day_of_monthEEEE6assignEt: function _ZN5boost2CV17constrained_valueINS0_23simple_exception_policyItLt1ELt31ENS_9gregorian16bad_day_of_monthEEEE6assignEt called 0 returned 0% blocks executed 0% #####: 64: void assign(value_type value) -: 65: { -: 66: //adding 1 below gets rid of a compiler warning which occurs when the -: 67: //min_value is 0 and the type is unsigned.... #####: 68: if (value+1 < (min)()+1) { #####: 69: value_policies::on_error(value_, value, min_violation); call 0 never executed -: 70: return; -: 71: } #####: 72: if (value > (max)()) { #####: 73: value_policies::on_error(value_, value, max_violation); call 0 never executed -: 74: return; -: 75: } #####: 76: value_ = value; -: 77: } ------------------ -: 78:}; -: 79: -: 80: //! Template to shortcut the constrained_value policy creation process -: 81: template -: 83: class BOOST_SYMBOL_VISIBLE simple_exception_policy -: 84: { -: 85: struct BOOST_SYMBOL_VISIBLE exception_wrapper : public exception_type -: 86: { -: 87: // In order to support throw_exception mechanism in the BOOST_NO_EXCEPTIONS mode, -: 88: // we'll have to provide a way to acquire std::exception from the exception being thrown. -: 89: // However, we cannot derive from it, since it would make it interceptable by this class, -: 90: // which might not be what the user wanted. -: 91: operator std::out_of_range () const -: 92: { -: 93: // TODO: Make the message more descriptive by using arguments to on_error -: 94: return std::out_of_range("constrained value boundary has been violated"); -: 95: } -: 96: }; -: 97: -: 98: typedef typename mpl::if_< -: 99: is_base_of< std::exception, exception_type >, -: 100: exception_type, -: 101: exception_wrapper -: 102: >::type actual_exception_type; -: 103: -: 104: public: -: 105: typedef rep_type value_type; #####: 106: static rep_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return min_value; } call 0 never executed call 1 never executed call 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 #####: 107: static rep_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { return max_value; } branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed #####: 108: static void on_error(rep_type, rep_type, violation_enum) -: 109: { #####: 110: boost::throw_exception(actual_exception_type()); -: 111: } -: 112: }; -: 113: -: 114: -: 115: -: 116:} } //namespace CV -: 117: -: 118: -: 119: -: 120: -: 121:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#atomic_count.hpp.gcov -: 0:Source:/usr/include/boost/asio/detail/atomic_count.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcda -: 0:Runs:2960 -: 1:// -: 2:// detail/atomic_count.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_ATOMIC_COUNT_HPP -: 12:#define BOOST_ASIO_DETAIL_ATOMIC_COUNT_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: -: 20:#if !defined(BOOST_ASIO_HAS_THREADS) -: 21:// Nothing to include. -: 22:#elif defined(BOOST_ASIO_HAS_STD_ATOMIC) -: 23:# include -: 24:#else // defined(BOOST_ASIO_HAS_STD_ATOMIC) -: 25:# include -: 26:#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC) -: 27: -: 28:namespace boost { -: 29:namespace asio { -: 30:namespace detail { -: 31: -: 32:#if !defined(BOOST_ASIO_HAS_THREADS) -: 33:typedef long atomic_count; -: 34:inline void increment(atomic_count& a, long b) { a += b; } -: 35:#elif defined(BOOST_ASIO_HAS_STD_ATOMIC) -: 36:typedef std::atomic atomic_count; #####: 37:inline void increment(atomic_count& a, long b) { a += b; } -: 38:#else // defined(BOOST_ASIO_HAS_STD_ATOMIC) -: 39:typedef boost::detail::atomic_count atomic_count; -: 40:inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; } -: 41:#endif // defined(BOOST_ASIO_HAS_STD_ATOMIC) -: 42: -: 43:} // namespace detail -: 44:} // namespace asio -: 45:} // namespace boost -: 46: -: 47:#endif // BOOST_ASIO_DETAIL_ATOMIC_COUNT_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#modes#cbc#cbc.cpp.gcov -: 0:Source:src/lib/modes/cbc/cbc.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/modes_cbc.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/modes_cbc.gcda -: 0:Runs:2960 -: 1:/* -: 2:* CBC Mode -: 3:* (C) 1999-2007,2013,2017 Jack Lloyd -: 4:* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity -: 5:* (C) 2018 Ribose Inc -: 6:* -: 7:* Botan is released under the Simplified BSD License (see license.txt) -: 8:*/ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: function _ZN5Botan8CBC_ModeC2EPNS_11BlockCipherEPNS_28BlockCipherModePaddingMethodE called 4491 returned 100% blocks executed 9% 4491: 16:CBC_Mode::CBC_Mode(BlockCipher* cipher, BlockCipherModePaddingMethod* padding) : -: 17: m_cipher(cipher), -: 18: m_padding(padding), 4491: 19: m_block_size(cipher->block_size()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed -: 20: { 4491: 21: if(m_padding && !m_padding->valid_blocksize(m_block_size)) branch 0 taken 97% (fallthrough) branch 1 taken 3% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 0% (fallthrough) branch 6 taken 100% #####: 22: throw Invalid_Argument("Padding " + m_padding->name() + 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 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 #####: 23: " cannot be used 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 #####: 24: cipher->name() + "/CBC"); 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 4491: 25: } -: 26: function _ZN5Botan8CBC_Mode5clearEv called 660 returned 100% blocks executed 100% 660: 27:void CBC_Mode::clear() -: 28: { 660: 29: m_cipher->clear(); call 0 returned 100% 660: 30: reset(); call 0 returned 100% 660: 31: } -: 32: function _ZN5Botan8CBC_Mode5resetEv called 1976 returned 100% blocks executed 100% 1976: 33:void CBC_Mode::reset() -: 34: { 1976: 35: m_state.clear(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1976: 36: } -: 37: function _ZNK5Botan8CBC_Mode4nameB5cxx11Ev called 1317 returned 100% blocks executed 39% 1317: 38:std::string CBC_Mode::name() const -: 39: { 1317: 40: if(m_padding) branch 0 taken 85% (fallthrough) branch 1 taken 15% 2250: 41: return cipher().name() + "/CBC/" + padding().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% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) branch 10 taken 0% (fallthrough) branch 11 taken 100% branch 12 taken 0% (fallthrough) branch 13 taken 100% branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed call 18 never executed -: 42: else 576: 43: return cipher().name() + "/CBC/CTS"; call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 44: } -: 45: function _ZNK5Botan8CBC_Mode18update_granularityEv called 3400 returned 100% blocks executed 100% 3400: 46:size_t CBC_Mode::update_granularity() const -: 47: { 3400: 48: return cipher().parallel_bytes(); call 0 returned 100% -: 49: } -: 50: function _ZNK5Botan8CBC_Mode8key_specEv called 5433 returned 100% blocks executed 100% 5433: 51:Key_Length_Specification CBC_Mode::key_spec() const -: 52: { 5433: 53: return cipher().key_spec(); call 0 returned 100% -: 54: } -: 55: function _ZNK5Botan8CBC_Mode20default_nonce_lengthEv called 848 returned 100% blocks executed 100% 848: 56:size_t CBC_Mode::default_nonce_length() const -: 57: { 848: 58: return block_size(); -: 59: } -: 60: function _ZNK5Botan8CBC_Mode18valid_nonce_lengthEm called 17380 returned 100% blocks executed 100% 17380: 61:bool CBC_Mode::valid_nonce_length(size_t n) const -: 62: { 17380: 63: return (n == 0 || n == block_size()); branch 0 taken 100% (fallthrough) branch 1 taken 1% branch 2 taken 94% (fallthrough) branch 3 taken 6% -: 64: } -: 65: function _ZN5Botan8CBC_Mode12key_scheduleEPKhm called 5044 returned 100% blocks executed 100% 5044: 66:void CBC_Mode::key_schedule(const uint8_t key[], size_t length) -: 67: { 5044: 68: m_cipher->set_key(key, length); call 0 returned 100% 5044: 69: m_state.clear(); branch 0 taken 4% (fallthrough) branch 1 taken 96% 5044: 70: } -: 71: function _ZN5Botan8CBC_Mode9start_msgEPKhm called 16672 returned 96% blocks executed 77% 16672: 72:void CBC_Mode::start_msg(const uint8_t nonce[], size_t nonce_len) -: 73: { 16672: 74: if(!valid_nonce_length(nonce_len)) call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% 1316: 75: throw Invalid_IV_Length(name(), nonce_len); 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 -: 76: -: 77: /* -: 78: * A nonce of zero length means carry the last ciphertext value over -: 79: * as the new IV, as unfortunately some protocols require this. If -: 80: * this is the first message then we use an IV of all zeros. -: 81: */ 16014: 82: if(nonce_len) branch 0 taken 100% (fallthrough) branch 1 taken 1% 15994: 83: m_state.assign(nonce, nonce + nonce_len); call 0 returned 100% 20: 84: else if(m_state.empty()) branch 0 taken 70% (fallthrough) branch 1 taken 30% 14: 85: m_state.resize(m_cipher->block_size()); call 0 returned 100% call 1 returned 100% -: 86: // else leave the state alone 16014: 87: } -: 88: function _ZNK5Botan14CBC_Encryption18minimum_final_sizeEv called 284 returned 100% blocks executed 100% 284: 89:size_t CBC_Encryption::minimum_final_size() const -: 90: { 284: 91: return 0; -: 92: } -: 93: function _ZNK5Botan14CBC_Encryption13output_lengthEm called 283 returned 100% blocks executed 86% 283: 94:size_t CBC_Encryption::output_length(size_t input_length) const -: 95: { 283: 96: if(input_length == 0) branch 0 taken 1% (fallthrough) branch 1 taken 99% 4: 97: return block_size(); -: 98: else 279: 99: return round_up(input_length, block_size()); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 100: } -: 101: function _ZN5Botan14CBC_Encryption7processEPhm called 8296 returned 88% blocks executed 93% 8296: 102:size_t CBC_Encryption::process(uint8_t buf[], size_t sz) -: 103: { 8296: 104: BOTAN_STATE_CHECK(state().empty() == false); branch 0 taken 12% (fallthrough) branch 1 taken 88% call 2 returned 0% 7309: 105: const size_t BS = block_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 106: 7309*: 107: BOTAN_ASSERT(sz % BS == 0, "CBC input is full blocks"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 7309: 108: const size_t blocks = sz / BS; -: 109: 7309: 110: if(blocks > 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 111: { 7283: 112: xor_buf(&buf[0], state_ptr(), BS); call 0 returned 100% 7283: 113: cipher().encrypt(&buf[0]); call 0 returned 100% -: 114: 317958: 115: for(size_t i = 1; i != blocks; ++i) call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% -: 116: { 310675: 117: xor_buf(&buf[BS*i], &buf[BS*(i-1)], BS); call 0 returned 100% 310675: 118: cipher().encrypt(&buf[BS*i]); call 0 returned 100% -: 119: } -: 120: 7283: 121: state().assign(&buf[BS*(blocks-1)], &buf[BS*blocks]); call 0 returned 100% -: 122: } -: 123: 7309: 124: return sz; -: 125: } -: 126: function _ZN5Botan14CBC_Encryption6finishERSt6vectorIhNS_16secure_allocatorIhEEEm called 1447 returned 42% blocks executed 73% 1447: 127:void CBC_Encryption::finish(secure_vector& buffer, size_t offset) -: 128: { 1447: 129: BOTAN_STATE_CHECK(state().empty() == false); branch 0 taken 58% (fallthrough) branch 1 taken 42% call 2 returned 0% 604*: 130: BOTAN_ASSERT(buffer.size() >= offset, "Offset is sane"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 131: 604: 132: const size_t BS = block_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 133: 604: 134: const size_t bytes_in_final_block = (buffer.size()-offset) % BS; branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 135: 604: 136: padding().add_padding(buffer, bytes_in_final_block, BS); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% -: 137: 604*: 138: BOTAN_ASSERT_EQUAL(buffer.size() % BS, offset % BS, "Padded to block boundary"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 139: 604: 140: update(buffer, offset); call 0 returned 100% 604: 141: } -: 142: function _ZNK5Botan14CTS_Encryption18valid_nonce_lengthEm called 308 returned 100% blocks executed 100% 308: 143:bool CTS_Encryption::valid_nonce_length(size_t n) const -: 144: { 308: 145: return (n == block_size()); -: 146: } -: 147: function _ZNK5Botan14CTS_Encryption18minimum_final_sizeEv called 48 returned 100% blocks executed 100% 48: 148:size_t CTS_Encryption::minimum_final_size() const -: 149: { 48: 150: return block_size() + 1; -: 151: } -: 152: function _ZNK5Botan14CTS_Encryption13output_lengthEm called 48 returned 100% blocks executed 100% 48: 153:size_t CTS_Encryption::output_length(size_t input_length) const -: 154: { 48: 155: return input_length; // no ciphertext expansion in CTS -: 156: } -: 157: function _ZN5Botan14CTS_Encryption6finishERSt6vectorIhNS_16secure_allocatorIhEEEm called 212 returned 32% blocks executed 50% 212: 158:void CTS_Encryption::finish(secure_vector& buffer, size_t offset) -: 159: { 212: 160: BOTAN_STATE_CHECK(state().empty() == false); branch 0 taken 68% (fallthrough) branch 1 taken 32% call 2 returned 0% 68*: 161: BOTAN_ASSERT(buffer.size() >= offset, "Offset is sane"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 68: 162: uint8_t* buf = buffer.data() + offset; branch 0 taken 0% (fallthrough) branch 1 taken 100% 68: 163: const size_t sz = buffer.size() - offset; branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 164: 68: 165: const size_t BS = block_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 166: 68: 167: if(sz < BS + 1) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 168: throw Encoding_Error(name() + ": insufficient data to encrypt"); 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 -: 169: 68: 170: if(sz % BS == 0) branch 0 taken 15% (fallthrough) branch 1 taken 85% -: 171: { 10: 172: update(buffer, offset); -: 173: -: 174: // swap last two blocks 114: 175: for(size_t i = 0; i != BS; ++i) call 0 returned 100% branch 1 taken 91% (fallthrough) branch 2 taken 9% 104: 176: std::swap(buffer[buffer.size()-BS+i], buffer[buffer.size()-2*BS+i]); -: 177: } -: 178: else -: 179: { 58: 180: const size_t full_blocks = ((sz / BS) - 1) * BS; 58: 181: const size_t final_bytes = sz - full_blocks; 58*: 182: BOTAN_ASSERT(final_bytes > BS && final_bytes < 2*BS, "Left over size in expected range"); branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% call 4 never executed -: 183: 116: 184: secure_vector last(buf + full_blocks, buf + full_blocks + final_bytes); call 0 returned 100% 58: 185: buffer.resize(full_blocks + offset); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 58: 186: update(buffer, offset); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 187: 58: 188: xor_buf(last.data(), state_ptr(), BS); call 0 returned 100% 58: 189: cipher().encrypt(last.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 190: 294: 191: for(size_t i = 0; i != final_bytes - BS; ++i) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 192: { 236: 193: last[i] ^= last[i + BS]; 236: 194: last[i + BS] ^= last[i]; -: 195: } -: 196: 58: 197: cipher().encrypt(last.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 198: 58: 199: buffer += last; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 200: } 68: 201: } -: 202: function _ZNK5Botan14CBC_Decryption13output_lengthEm called 331 returned 100% blocks executed 100% 331: 203:size_t CBC_Decryption::output_length(size_t input_length) const -: 204: { 331: 205: return input_length; // precise for CTS, worst case otherwise -: 206: } -: 207: function _ZNK5Botan14CBC_Decryption18minimum_final_sizeEv called 282 returned 100% blocks executed 100% 282: 208:size_t CBC_Decryption::minimum_final_size() const -: 209: { 282: 210: return block_size(); -: 211: } -: 212: function _ZN5Botan14CBC_Decryption7processEPhm called 9110 returned 89% blocks executed 93% 9110: 213:size_t CBC_Decryption::process(uint8_t buf[], size_t sz) -: 214: { 9110: 215: BOTAN_STATE_CHECK(state().empty() == false); branch 0 taken 11% (fallthrough) branch 1 taken 89% call 2 returned 0% -: 216: 8123: 217: const size_t BS = block_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 218: 8123*: 219: BOTAN_ASSERT(sz % BS == 0, "Input is full blocks"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 8123: 220: size_t blocks = sz / BS; -: 221: 35176: 222: while(blocks) branch 0 taken 77% (fallthrough) branch 1 taken 23% -: 223: { 27053: 224: const size_t to_proc = std::min(BS * blocks, m_tempbuf.size()); branch 0 taken 70% (fallthrough) branch 1 taken 30% -: 225: 27053: 226: cipher().decrypt_n(buf, m_tempbuf.data(), to_proc / BS); call 0 returned 100% -: 227: 27053: 228: xor_buf(m_tempbuf.data(), state_ptr(), BS); call 0 returned 100% 27053: 229: xor_buf(&m_tempbuf[BS], buf, to_proc - BS); call 0 returned 100% 27053: 230: copy_mem(state_ptr(), buf + (to_proc - BS), BS); call 0 returned 100% -: 231: 27053: 232: copy_mem(buf, m_tempbuf.data(), to_proc); call 0 returned 100% -: 233: 27053: 234: buf += to_proc; 27053: 235: blocks -= to_proc / BS; -: 236: } -: 237: 8123: 238: return sz; -: 239: } -: 240: function _ZN5Botan14CBC_Decryption6finishERSt6vectorIhNS_16secure_allocatorIhEEEm called 1398 returned 40% blocks executed 45% 1398: 241:void CBC_Decryption::finish(secure_vector& buffer, size_t offset) -: 242: { 1398: 243: BOTAN_STATE_CHECK(state().empty() == false); branch 0 taken 60% (fallthrough) branch 1 taken 40% call 2 returned 0% 555*: 244: BOTAN_ASSERT(buffer.size() >= offset, "Offset is sane"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 555: 245: const size_t sz = buffer.size() - offset; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 246: 555: 247: const size_t BS = block_size(); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 248: 555: 249: if(sz == 0 || sz % BS) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 250: throw Decoding_Error(name() + ": Ciphertext not a multiple of block 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 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 -: 251: 555: 252: update(buffer, offset); call 0 returned 100% -: 253: 555: 254: const size_t pad_bytes = BS - padding().unpad(&buffer[buffer.size()-BS], BS); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% 555: 255: buffer.resize(buffer.size() - pad_bytes); // remove padding call 0 returned 100% 582: 256: if(pad_bytes == 0 && padding().name() != "NoPadding") branch 0 taken 5% (fallthrough) branch 1 taken 95% branch 2 taken 0% (fallthrough) branch 3 taken 100% call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 96% (fallthrough) branch 9 taken 4% branch 10 taken 5% (fallthrough) branch 11 taken 95% branch 12 taken 1% (fallthrough) branch 13 taken 100% call 14 never executed -: 257: { 2: 258: throw Decoding_Error("Invalid CBC padding"); 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 -: 259: } 554: 260: } -: 261: function _ZN5Botan14CBC_Decryption5resetEv called 987 returned 100% blocks executed 100% 987: 262:void CBC_Decryption::reset() -: 263: { 987: 264: CBC_Mode::reset(); call 0 returned 100% 987: 265: zeroise(m_tempbuf); branch 0 taken 100% (fallthrough) branch 1 taken 0% 987: 266: } -: 267: function _ZNK5Botan14CTS_Decryption18valid_nonce_lengthEm called 308 returned 100% blocks executed 100% 308: 268:bool CTS_Decryption::valid_nonce_length(size_t n) const -: 269: { 308: 270: return (n == block_size()); -: 271: } -: 272: function _ZNK5Botan14CTS_Decryption18minimum_final_sizeEv called 48 returned 100% blocks executed 100% 48: 273:size_t CTS_Decryption::minimum_final_size() const -: 274: { 48: 275: return block_size() + 1; -: 276: } -: 277: function _ZN5Botan14CTS_Decryption6finishERSt6vectorIhNS_16secure_allocatorIhEEEm called 212 returned 32% blocks executed 51% 212: 278:void CTS_Decryption::finish(secure_vector& buffer, size_t offset) -: 279: { 212: 280: BOTAN_STATE_CHECK(state().empty() == false); branch 0 taken 68% (fallthrough) branch 1 taken 32% call 2 returned 0% 68*: 281: BOTAN_ASSERT(buffer.size() >= offset, "Offset is sane"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 68: 282: const size_t sz = buffer.size() - offset; branch 0 taken 0% (fallthrough) branch 1 taken 100% 68: 283: uint8_t* buf = buffer.data() + offset; branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 284: 68: 285: const size_t BS = block_size(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 286: 68: 287: if(sz < BS + 1) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 288: throw Encoding_Error(name() + ": insufficient data to decrypt"); 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 -: 289: 68: 290: if(sz % BS == 0) branch 0 taken 15% (fallthrough) branch 1 taken 85% -: 291: { -: 292: // swap last two blocks -: 293: 114: 294: for(size_t i = 0; i != BS; ++i) branch 0 taken 91% (fallthrough) branch 1 taken 9% 104: 295: std::swap(buffer[buffer.size()-BS+i], buffer[buffer.size()-2*BS+i]); -: 296: 10: 297: update(buffer, offset); call 0 returned 100% -: 298: } -: 299: else -: 300: { 58: 301: const size_t full_blocks = ((sz / BS) - 1) * BS; 58: 302: const size_t final_bytes = sz - full_blocks; 58*: 303: BOTAN_ASSERT(final_bytes > BS && final_bytes < 2*BS, "Left over size in expected range"); branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% call 4 never executed -: 304: 116: 305: secure_vector last(buf + full_blocks, buf + full_blocks + final_bytes); call 0 returned 100% 58: 306: buffer.resize(full_blocks + offset); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 58: 307: update(buffer, offset); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 308: 58: 309: cipher().decrypt(last.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 310: 58: 311: xor_buf(last.data(), &last[BS], final_bytes - BS); call 0 returned 100% -: 312: 294: 313: for(size_t i = 0; i != final_bytes - BS; ++i) call 0 returned 100% branch 1 taken 80% (fallthrough) branch 2 taken 20% 236: 314: std::swap(last[i], last[i + BS]); -: 315: 58: 316: cipher().decrypt(last.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 58: 317: xor_buf(last.data(), state_ptr(), BS); call 0 returned 100% -: 318: 58: 319: buffer += last; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 320: } 68: 321: } -: 322: -: 323:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#date_time#posix_time#ptime.hpp.gcov -: 0:Source:/usr/include/boost/date_time/posix_time/ptime.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket.gcda -: 0:Runs:2960 -: 1:#ifndef POSIX_PTIME_HPP___ -: 2:#define POSIX_PTIME_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 -: 9: * $Date$ -: 10: */ -: 11: -: 12:#include -: 13:#include -: 14:#include -: 15: -: 16:namespace boost { -: 17: -: 18:namespace posix_time { -: 19: -: 20: //bring special enum values into the namespace -: 21: using date_time::special_values; -: 22: using date_time::not_special; -: 23: using date_time::neg_infin; -: 24: using date_time::pos_infin; -: 25: using date_time::not_a_date_time; -: 26: using date_time::max_date_time; -: 27: using date_time::min_date_time; -: 28: -: 29: //! Time type with no timezone or other adjustments -: 30: /*! \ingroup time_basics -: 31: */ -: 32: class BOOST_SYMBOL_VISIBLE ptime : public date_time::base_time -: 33: { -: 34: public: -: 35: typedef posix_time_system time_system_type; -: 36: typedef time_system_type::time_rep_type time_rep_type; -: 37: typedef time_system_type::time_duration_type time_duration_type; -: 38: typedef ptime time_type; -: 39: //! Construct with date and offset in day #####: 40: ptime(gregorian::date d,time_duration_type td) : date_time::base_time(d,td) call 0 never executed -: 41: {} -: 42: //! Construct a time at start of the given day (midnight) -: 43: explicit ptime(gregorian::date d) : date_time::base_time(d,time_duration_type(0,0,0)) -: 44: {} -: 45: //! Copy from time_rep -: 46: ptime(const time_rep_type& rhs): -: 47: date_time::base_time(rhs) -: 48: {} -: 49: //! Construct from special value -: 50: ptime(const special_values sv) : date_time::base_time(sv) -: 51: {} -: 52:#if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR) -: 53: // Default constructor constructs to not_a_date_time -: 54: ptime() : date_time::base_time(gregorian::date(not_a_date_time), time_duration_type(not_a_date_time)) -: 55: {} -: 56:#endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR -: 57: -: 58: }; -: 59: -: 60: -: 61: -: 62:} }//namespace posix_time -: 63: -: 64: -: 65:#endif -: 66: <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#internal#mp_asmi.h.gcov -: 0:Source:build/include/botan/internal/mp_asmi.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/math_mp_monty.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_mp_monty.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Lowest Level MPI Algorithms -: 3:* (C) 1999-2010 Jack Lloyd -: 4:* 2006 Luca Piccarreta -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#ifndef BOTAN_MP_ASM_INTERNAL_H_ -: 10:#define BOTAN_MP_ASM_INTERNAL_H_ -: 11: -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 17: -: 18:#define ADDSUB2_OP(OPERATION, INDEX) \ -: 19: ASM("movl 4*" #INDEX "(%[y]), %[carry]") \ -: 20: ASM(OPERATION " %[carry], 4*" #INDEX "(%[x])") \ -: 21: -: 22:#define ADDSUB3_OP(OPERATION, INDEX) \ -: 23: ASM("movl 4*" #INDEX "(%[x]), %[carry]") \ -: 24: ASM(OPERATION " 4*" #INDEX "(%[y]), %[carry]") \ -: 25: ASM("movl %[carry], 4*" #INDEX "(%[z])") \ -: 26: -: 27:#define LINMUL_OP(WRITE_TO, INDEX) \ -: 28: ASM("movl 4*" #INDEX "(%[x]),%%eax") \ -: 29: ASM("mull %[y]") \ -: 30: ASM("addl %[carry],%%eax") \ -: 31: ASM("adcl $0,%%edx") \ -: 32: ASM("movl %%edx,%[carry]") \ -: 33: ASM("movl %%eax, 4*" #INDEX "(%[" WRITE_TO "])") -: 34: -: 35:#define MULADD_OP(IGNORED, INDEX) \ -: 36: ASM("movl 4*" #INDEX "(%[x]),%%eax") \ -: 37: ASM("mull %[y]") \ -: 38: ASM("addl %[carry],%%eax") \ -: 39: ASM("adcl $0,%%edx") \ -: 40: ASM("addl 4*" #INDEX "(%[z]),%%eax") \ -: 41: ASM("adcl $0,%%edx") \ -: 42: ASM("movl %%edx,%[carry]") \ -: 43: ASM("movl %%eax, 4*" #INDEX " (%[z])") -: 44: -: 45:#define ADD_OR_SUBTRACT(CORE_CODE) \ -: 46: ASM("rorl %[carry]") \ -: 47: CORE_CODE \ -: 48: ASM("sbbl %[carry],%[carry]") \ -: 49: ASM("negl %[carry]") -: 50: -: 51:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 52: -: 53:#define ADDSUB2_OP(OPERATION, INDEX) \ -: 54: ASM("movq 8*" #INDEX "(%[y]), %[carry]") \ -: 55: ASM(OPERATION " %[carry], 8*" #INDEX "(%[x])") \ -: 56: -: 57:#define ADDSUB3_OP(OPERATION, INDEX) \ -: 58: ASM("movq 8*" #INDEX "(%[x]), %[carry]") \ -: 59: ASM(OPERATION " 8*" #INDEX "(%[y]), %[carry]") \ -: 60: ASM("movq %[carry], 8*" #INDEX "(%[z])") \ -: 61: -: 62:#define LINMUL_OP(WRITE_TO, INDEX) \ -: 63: ASM("movq 8*" #INDEX "(%[x]),%%rax") \ -: 64: ASM("mulq %[y]") \ -: 65: ASM("addq %[carry],%%rax") \ -: 66: ASM("adcq $0,%%rdx") \ -: 67: ASM("movq %%rdx,%[carry]") \ -: 68: ASM("movq %%rax, 8*" #INDEX "(%[" WRITE_TO "])") -: 69: -: 70:#define MULADD_OP(IGNORED, INDEX) \ -: 71: ASM("movq 8*" #INDEX "(%[x]),%%rax") \ -: 72: ASM("mulq %[y]") \ -: 73: ASM("addq %[carry],%%rax") \ -: 74: ASM("adcq $0,%%rdx") \ -: 75: ASM("addq 8*" #INDEX "(%[z]),%%rax") \ -: 76: ASM("adcq $0,%%rdx") \ -: 77: ASM("movq %%rdx,%[carry]") \ -: 78: ASM("movq %%rax, 8*" #INDEX " (%[z])") -: 79: -: 80:#define ADD_OR_SUBTRACT(CORE_CODE) \ -: 81: ASM("rorq %[carry]") \ -: 82: CORE_CODE \ -: 83: ASM("sbbq %[carry],%[carry]") \ -: 84: ASM("negq %[carry]") -: 85: -: 86:#endif -: 87: -: 88:#if defined(ADD_OR_SUBTRACT) -: 89: -: 90:#define ASM(x) x "\n\t" -: 91: -: 92:#define DO_8_TIMES(MACRO, ARG) \ -: 93: MACRO(ARG, 0) \ -: 94: MACRO(ARG, 1) \ -: 95: MACRO(ARG, 2) \ -: 96: MACRO(ARG, 3) \ -: 97: MACRO(ARG, 4) \ -: 98: MACRO(ARG, 5) \ -: 99: MACRO(ARG, 6) \ -: 100: MACRO(ARG, 7) -: 101: -: 102:#endif -: 103: -: 104:/* -: 105:* Word Addition -: 106:*/ -: 107:inline word word_add(word x, word y, word* carry) -: 108: { -: 109:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 110: asm( -: 111: ADD_OR_SUBTRACT(ASM("adcl %[y],%[x]")) -: 112: : [x]"=r"(x), [carry]"=r"(*carry) -: 113: : "0"(x), [y]"rm"(y), "1"(*carry) -: 114: : "cc"); -: 115: return x; -: 116: -: 117:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 118: -: 119: asm( -: 120: ADD_OR_SUBTRACT(ASM("adcq %[y],%[x]")) -: 121: : [x]"=r"(x), [carry]"=r"(*carry) -: 122: : "0"(x), [y]"rm"(y), "1"(*carry) -: 123: : "cc"); -: 124: return x; -: 125: -: 126:#else -: 127: word z = x + y; -: 128: word c1 = (z < x); -: 129: z += *carry; -: 130: *carry = c1 | (z < *carry); -: 131: return z; -: 132:#endif -: 133: } -: 134: -: 135:/* -: 136:* Eight Word Block Addition, Two Argument -: 137:*/ -: 138:inline word word8_add2(word x[8], const word y[8], word carry) -: 139: { -: 140:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 141: asm( -: 142: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "adcl")) -: 143: : [carry]"=r"(carry) -: 144: : [x]"r"(x), [y]"r"(y), "0"(carry) -: 145: : "cc", "memory"); -: 146: return carry; -: 147: -: 148:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 149: -: 150: asm( -: 151: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "adcq")) -: 152: : [carry]"=r"(carry) -: 153: : [x]"r"(x), [y]"r"(y), "0"(carry) -: 154: : "cc", "memory"); -: 155: return carry; -: 156: -: 157:#else -: 158: x[0] = word_add(x[0], y[0], &carry); -: 159: x[1] = word_add(x[1], y[1], &carry); -: 160: x[2] = word_add(x[2], y[2], &carry); -: 161: x[3] = word_add(x[3], y[3], &carry); -: 162: x[4] = word_add(x[4], y[4], &carry); -: 163: x[5] = word_add(x[5], y[5], &carry); -: 164: x[6] = word_add(x[6], y[6], &carry); -: 165: x[7] = word_add(x[7], y[7], &carry); -: 166: return carry; -: 167:#endif -: 168: } -: 169: -: 170:/* -: 171:* Eight Word Block Addition, Three Argument -: 172:*/ -: 173:inline word word8_add3(word z[8], const word x[8], -: 174: const word y[8], word carry) -: 175: { -: 176:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 177: asm( -: 178: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "adcl")) -: 179: : [carry]"=r"(carry) -: 180: : [x]"r"(x), [y]"r"(y), [z]"r"(z), "0"(carry) -: 181: : "cc", "memory"); -: 182: return carry; -: 183: -: 184:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 185: -: 186: asm( -: 187: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "adcq")) -: 188: : [carry]"=r"(carry) -: 189: : [x]"r"(x), [y]"r"(y), [z]"r"(z), "0"(carry) -: 190: : "cc", "memory"); -: 191: return carry; -: 192: -: 193:#else -: 194: z[0] = word_add(x[0], y[0], &carry); -: 195: z[1] = word_add(x[1], y[1], &carry); -: 196: z[2] = word_add(x[2], y[2], &carry); -: 197: z[3] = word_add(x[3], y[3], &carry); -: 198: z[4] = word_add(x[4], y[4], &carry); -: 199: z[5] = word_add(x[5], y[5], &carry); -: 200: z[6] = word_add(x[6], y[6], &carry); -: 201: z[7] = word_add(x[7], y[7], &carry); -: 202: return carry; -: 203:#endif -: 204: } -: 205: -: 206:/* -: 207:* Word Subtraction -: 208:*/ 172314007: 209:inline word word_sub(word x, word y, word* carry) -: 210: { -: 211:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 212: asm( -: 213: ADD_OR_SUBTRACT(ASM("sbbl %[y],%[x]")) -: 214: : [x]"=r"(x), [carry]"=r"(*carry) -: 215: : "0"(x), [y]"rm"(y), "1"(*carry) -: 216: : "cc"); -: 217: return x; -: 218: -: 219:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 220: 172314007: 221: asm( -: 222: ADD_OR_SUBTRACT(ASM("sbbq %[y],%[x]")) -: 223: : [x]"=r"(x), [carry]"=r"(*carry) -: 224: : "0"(x), [y]"rm"(y), "1"(*carry) 172314007: 225: : "cc"); 172314007: 226: return x; -: 227: -: 228:#else -: 229: word t0 = x - y; -: 230: word c1 = (t0 > x); -: 231: word z = t0 - *carry; -: 232: *carry = c1 | (z > t0); -: 233: return z; -: 234:#endif -: 235: } -: 236: -: 237:/* -: 238:* Eight Word Block Subtraction, Two Argument -: 239:*/ -: 240:inline word word8_sub2(word x[8], const word y[8], word carry) -: 241: { -: 242:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 243: asm( -: 244: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "sbbl")) -: 245: : [carry]"=r"(carry) -: 246: : [x]"r"(x), [y]"r"(y), "0"(carry) -: 247: : "cc", "memory"); -: 248: return carry; -: 249: -: 250:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 251: -: 252: asm( -: 253: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB2_OP, "sbbq")) -: 254: : [carry]"=r"(carry) -: 255: : [x]"r"(x), [y]"r"(y), "0"(carry) -: 256: : "cc", "memory"); -: 257: return carry; -: 258: -: 259:#else -: 260: x[0] = word_sub(x[0], y[0], &carry); -: 261: x[1] = word_sub(x[1], y[1], &carry); -: 262: x[2] = word_sub(x[2], y[2], &carry); -: 263: x[3] = word_sub(x[3], y[3], &carry); -: 264: x[4] = word_sub(x[4], y[4], &carry); -: 265: x[5] = word_sub(x[5], y[5], &carry); -: 266: x[6] = word_sub(x[6], y[6], &carry); -: 267: x[7] = word_sub(x[7], y[7], &carry); -: 268: return carry; -: 269:#endif -: 270: } -: 271: -: 272:/* -: 273:* Eight Word Block Subtraction, Two Argument -: 274:*/ -: 275:inline word word8_sub2_rev(word x[8], const word y[8], word carry) -: 276: { -: 277:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 278: asm( -: 279: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbl")) -: 280: : [carry]"=r"(carry) -: 281: : [x]"r"(y), [y]"r"(x), [z]"r"(x), "0"(carry) -: 282: : "cc", "memory"); -: 283: return carry; -: 284: -: 285:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 286: -: 287: asm( -: 288: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq")) -: 289: : [carry]"=r"(carry) -: 290: : [x]"r"(y), [y]"r"(x), [z]"r"(x), "0"(carry) -: 291: : "cc", "memory"); -: 292: return carry; -: 293: -: 294:#else -: 295: x[0] = word_sub(y[0], x[0], &carry); -: 296: x[1] = word_sub(y[1], x[1], &carry); -: 297: x[2] = word_sub(y[2], x[2], &carry); -: 298: x[3] = word_sub(y[3], x[3], &carry); -: 299: x[4] = word_sub(y[4], x[4], &carry); -: 300: x[5] = word_sub(y[5], x[5], &carry); -: 301: x[6] = word_sub(y[6], x[6], &carry); -: 302: x[7] = word_sub(y[7], x[7], &carry); -: 303: return carry; -: 304:#endif -: 305: } -: 306: -: 307:/* -: 308:* Eight Word Block Subtraction, Three Argument -: 309:*/ -: 310:inline word word8_sub3(word z[8], const word x[8], -: 311: const word y[8], word carry) -: 312: { -: 313:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 314: asm( -: 315: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbl")) -: 316: : [carry]"=r"(carry) -: 317: : [x]"r"(x), [y]"r"(y), [z]"r"(z), "0"(carry) -: 318: : "cc", "memory"); -: 319: return carry; -: 320: -: 321:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 322: -: 323: asm( -: 324: ADD_OR_SUBTRACT(DO_8_TIMES(ADDSUB3_OP, "sbbq")) -: 325: : [carry]"=r"(carry) -: 326: : [x]"r"(x), [y]"r"(y), [z]"r"(z), "0"(carry) -: 327: : "cc", "memory"); -: 328: return carry; -: 329: -: 330:#else -: 331: z[0] = word_sub(x[0], y[0], &carry); -: 332: z[1] = word_sub(x[1], y[1], &carry); -: 333: z[2] = word_sub(x[2], y[2], &carry); -: 334: z[3] = word_sub(x[3], y[3], &carry); -: 335: z[4] = word_sub(x[4], y[4], &carry); -: 336: z[5] = word_sub(x[5], y[5], &carry); -: 337: z[6] = word_sub(x[6], y[6], &carry); -: 338: z[7] = word_sub(x[7], y[7], &carry); -: 339: return carry; -: 340:#endif -: 341: } -: 342: -: 343:/* -: 344:* Eight Word Block Linear Multiplication -: 345:*/ -: 346:inline word word8_linmul2(word x[8], word y, word carry) -: 347: { -: 348:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 349: asm( -: 350: DO_8_TIMES(LINMUL_OP, "x") -: 351: : [carry]"=r"(carry) -: 352: : [x]"r"(x), [y]"rm"(y), "0"(carry) -: 353: : "cc", "%eax", "%edx"); -: 354: return carry; -: 355: -: 356:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 357: -: 358: asm( -: 359: DO_8_TIMES(LINMUL_OP, "x") -: 360: : [carry]"=r"(carry) -: 361: : [x]"r"(x), [y]"rm"(y), "0"(carry) -: 362: : "cc", "%rax", "%rdx"); -: 363: return carry; -: 364: -: 365:#else -: 366: x[0] = word_madd2(x[0], y, &carry); -: 367: x[1] = word_madd2(x[1], y, &carry); -: 368: x[2] = word_madd2(x[2], y, &carry); -: 369: x[3] = word_madd2(x[3], y, &carry); -: 370: x[4] = word_madd2(x[4], y, &carry); -: 371: x[5] = word_madd2(x[5], y, &carry); -: 372: x[6] = word_madd2(x[6], y, &carry); -: 373: x[7] = word_madd2(x[7], y, &carry); -: 374: return carry; -: 375:#endif -: 376: } -: 377: -: 378:/* -: 379:* Eight Word Block Linear Multiplication -: 380:*/ -: 381:inline word word8_linmul3(word z[8], const word x[8], word y, word carry) -: 382: { -: 383:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 384: asm( -: 385: DO_8_TIMES(LINMUL_OP, "z") -: 386: : [carry]"=r"(carry) -: 387: : [z]"r"(z), [x]"r"(x), [y]"rm"(y), "0"(carry) -: 388: : "cc", "%eax", "%edx"); -: 389: return carry; -: 390: -: 391:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 392: asm( -: 393: DO_8_TIMES(LINMUL_OP, "z") -: 394: : [carry]"=r"(carry) -: 395: : [z]"r"(z), [x]"r"(x), [y]"rm"(y), "0"(carry) -: 396: : "cc", "%rax", "%rdx"); -: 397: return carry; -: 398: -: 399:#else -: 400: z[0] = word_madd2(x[0], y, &carry); -: 401: z[1] = word_madd2(x[1], y, &carry); -: 402: z[2] = word_madd2(x[2], y, &carry); -: 403: z[3] = word_madd2(x[3], y, &carry); -: 404: z[4] = word_madd2(x[4], y, &carry); -: 405: z[5] = word_madd2(x[5], y, &carry); -: 406: z[6] = word_madd2(x[6], y, &carry); -: 407: z[7] = word_madd2(x[7], y, &carry); -: 408: return carry; -: 409:#endif -: 410: } -: 411: -: 412:/* -: 413:* Eight Word Block Multiply/Add -: 414:*/ -: 415:inline word word8_madd3(word z[8], const word x[8], word y, word carry) -: 416: { -: 417:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 418: asm( -: 419: DO_8_TIMES(MULADD_OP, "") -: 420: : [carry]"=r"(carry) -: 421: : [z]"r"(z), [x]"r"(x), [y]"rm"(y), "0"(carry) -: 422: : "cc", "%eax", "%edx"); -: 423: return carry; -: 424: -: 425:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 426: -: 427: asm( -: 428: DO_8_TIMES(MULADD_OP, "") -: 429: : [carry]"=r"(carry) -: 430: : [z]"r"(z), [x]"r"(x), [y]"rm"(y), "0"(carry) -: 431: : "cc", "%rax", "%rdx"); -: 432: return carry; -: 433: -: 434:#else -: 435: z[0] = word_madd3(x[0], y, z[0], &carry); -: 436: z[1] = word_madd3(x[1], y, z[1], &carry); -: 437: z[2] = word_madd3(x[2], y, z[2], &carry); -: 438: z[3] = word_madd3(x[3], y, z[3], &carry); -: 439: z[4] = word_madd3(x[4], y, z[4], &carry); -: 440: z[5] = word_madd3(x[5], y, z[5], &carry); -: 441: z[6] = word_madd3(x[6], y, z[6], &carry); -: 442: z[7] = word_madd3(x[7], y, z[7], &carry); -: 443: return carry; -: 444:#endif -: 445: } -: 446: -: 447:/* -: 448:* Multiply-Add Accumulator -: 449:* (w2,w1,w0) += x * y -: 450:*/ 8036624379: 451:inline void word3_muladd(word* w2, word* w1, word* w0, word x, word y) -: 452: { -: 453:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 454: word z0 = 0, z1 = 0; -: 455: -: 456: asm("mull %[y]" -: 457: : "=a"(z0),"=d"(z1) -: 458: : "a"(x), [y]"rm"(y) -: 459: : "cc"); -: 460: -: 461: asm(R"( -: 462: addl %[z0],%[w0] -: 463: adcl %[z1],%[w1] -: 464: adcl $0,%[w2] -: 465: )" -: 466: : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2) -: 467: : [z0]"r"(z0), [z1]"r"(z1), "0"(*w0), "1"(*w1), "2"(*w2) -: 468: : "cc"); -: 469: -: 470:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 471: 8036624379: 472: word z0 = 0, z1 = 0; -: 473: 8036624379: 474: asm("mulq %[y]" -: 475: : "=a"(z0),"=d"(z1) -: 476: : "a"(x), [y]"rm"(y) 8036624379: 477: : "cc"); -: 478: 8036624379: 479: asm(R"( -: 480: addq %[z0],%[w0] -: 481: adcq %[z1],%[w1] -: 482: adcq $0,%[w2] -: 483: )" -: 484: : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2) -: 485: : [z0]"r"(z0), [z1]"r"(z1), "0"(*w0), "1"(*w1), "2"(*w2) 8036624379: 486: : "cc"); -: 487: -: 488:#else -: 489: word carry = *w0; -: 490: *w0 = word_madd2(x, y, &carry); -: 491: *w1 += carry; -: 492: *w2 += (*w1 < carry); -: 493:#endif -: 494: } -: 495: -: 496:/* -: 497:* 3-word addition -: 498:* (w2,w1,w0) += x -: 499:*/ 313929310: 500:inline void word3_add(word* w2, word* w1, word* w0, word x) -: 501: { -: 502:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 503: asm(R"( -: 504: addl %[x],%[w0] -: 505: adcl $0,%[w1] -: 506: adcl $0,%[w2] -: 507: )" -: 508: : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2) -: 509: : [x]"r"(x), "0"(*w0), "1"(*w1), "2"(*w2) -: 510: : "cc"); -: 511: -: 512:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 513: 313929310: 514: asm(R"( -: 515: addq %[x],%[w0] -: 516: adcq $0,%[w1] -: 517: adcq $0,%[w2] -: 518: )" -: 519: : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2) -: 520: : [x]"r"(x), "0"(*w0), "1"(*w1), "2"(*w2) 313929310: 521: : "cc"); -: 522: -: 523:#else -: 524: *w0 += x; -: 525: word c1 = (*w0 < x); -: 526: *w1 += c1; -: 527: word c2 = (*w1 < c1); -: 528: *w2 += c2; -: 529:#endif -: 530: } -: 531: -: 532:/* -: 533:* Multiply-Add Accumulator -: 534:* (w2,w1,w0) += 2 * x * y -: 535:*/ -: 536:inline void word3_muladd_2(word* w2, word* w1, word* w0, word x, word y) -: 537: { -: 538:#if defined(BOTAN_MP_USE_X86_32_ASM) -: 539: -: 540: word z0 = 0, z1 = 0; -: 541: -: 542: asm("mull %[y]" -: 543: : "=a"(z0),"=d"(z1) -: 544: : "a"(x), [y]"rm"(y) -: 545: : "cc"); -: 546: -: 547: asm(R"( -: 548: addl %[z0],%[w0] -: 549: adcl %[z1],%[w1] -: 550: adcl $0,%[w2] -: 551: -: 552: addl %[z0],%[w0] -: 553: adcl %[z1],%[w1] -: 554: adcl $0,%[w2] -: 555: )" -: 556: : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2) -: 557: : [z0]"r"(z0), [z1]"r"(z1), "0"(*w0), "1"(*w1), "2"(*w2) -: 558: : "cc"); -: 559: -: 560:#elif defined(BOTAN_MP_USE_X86_64_ASM) -: 561: -: 562: word z0 = 0, z1 = 0; -: 563: -: 564: asm("mulq %[y]" -: 565: : "=a"(z0),"=d"(z1) -: 566: : "a"(x), [y]"rm"(y) -: 567: : "cc"); -: 568: -: 569: asm(R"( -: 570: addq %[z0],%[w0] -: 571: adcq %[z1],%[w1] -: 572: adcq $0,%[w2] -: 573: -: 574: addq %[z0],%[w0] -: 575: adcq %[z1],%[w1] -: 576: adcq $0,%[w2] -: 577: )" -: 578: : [w0]"=r"(*w0), [w1]"=r"(*w1), [w2]"=r"(*w2) -: 579: : [z0]"r"(z0), [z1]"r"(z1), "0"(*w0), "1"(*w1), "2"(*w2) -: 580: : "cc"); -: 581: -: 582:#else -: 583: word carry = 0; -: 584: x = word_madd2(x, y, &carry); -: 585: y = carry; -: 586: -: 587: word top = (y >> (BOTAN_MP_WORD_BITS-1)); -: 588: y <<= 1; -: 589: y |= (x >> (BOTAN_MP_WORD_BITS-1)); -: 590: x <<= 1; -: 591: -: 592: carry = 0; -: 593: *w0 = word_add(*w0, x, &carry); -: 594: *w1 = word_add(*w1, y, &carry); -: 595: *w2 = word_add(*w2, top, &carry); -: 596:#endif -: 597: } -: 598: -: 599:#if defined(ASM) -: 600: #undef ASM -: 601: #undef DO_8_TIMES -: 602: #undef ADD_OR_SUBTRACT -: 603: #undef ADDSUB2_OP -: 604: #undef ADDSUB3_OP -: 605: #undef LINMUL_OP -: 606: #undef MULADD_OP -: 607:#endif -: 608: -: 609:} -: 610: -: 611:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#ext#new_allocator.h.gcov -: 0:Source:/usr/include/c++/9/ext/new_allocator.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_monty_exp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_monty_exp.gcda -: 0:Runs:2960 -: 1:// Allocator that wraps operator new -*- 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:/** @file ext/new_allocator.h -: 26: * This file is a GNU extension to the Standard C++ Library. -: 27: */ -: 28: -: 29:#ifndef _NEW_ALLOCATOR_H -: 30:#define _NEW_ALLOCATOR_H 1 -: 31: -: 32:#include -: 33:#include -: 34:#include -: 35:#include -: 36:#if __cplusplus >= 201103L -: 37:#include -: 38:#endif -: 39: -: 40:namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) -: 41:{ -: 42:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 43: -: 44: using std::size_t; -: 45: using std::ptrdiff_t; -: 46: -: 47: /** -: 48: * @brief An allocator that uses global new, as per [20.4]. -: 49: * @ingroup allocators -: 50: * -: 51: * This is precisely the allocator defined in the C++ Standard. -: 52: * - all allocation calls operator new -: 53: * - all deallocation calls operator delete -: 54: * -: 55: * @tparam _Tp Type of allocated object. -: 56: */ -: 57: template -: 58: class new_allocator -: 59: { -: 60: public: -: 61: typedef size_t size_type; -: 62: typedef ptrdiff_t difference_type; -: 63: typedef _Tp* pointer; -: 64: typedef const _Tp* const_pointer; -: 65: typedef _Tp& reference; -: 66: typedef const _Tp& const_reference; -: 67: typedef _Tp value_type; -: 68: -: 69: template -: 70: struct rebind -: 71: { typedef new_allocator<_Tp1> other; }; -: 72: -: 73:#if __cplusplus >= 201103L -: 74: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 75: // 2103. propagate_on_container_move_assignment -: 76: typedef std::true_type propagate_on_container_move_assignment; -: 77:#endif -: 78: -: 79: _GLIBCXX20_CONSTEXPR 845527*: 80: new_allocator() _GLIBCXX_USE_NOEXCEPT { } call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed branch 5 never executed branch 6 never executed call 7 returned 100% branch 8 taken 0% (fallthrough) branch 9 taken 100% call 10 never executed branch 11 never executed branch 12 never executed -: 81: -: 82: _GLIBCXX20_CONSTEXPR 211382: 83: new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 84: -: 85: template -: 86: _GLIBCXX20_CONSTEXPR -: 87: new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { } -: 88: 634144*: 89: ~new_allocator() _GLIBCXX_USE_NOEXCEPT { } call 0 returned 100% call 1 never executed call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 1% (throw) call 5 never executed call 6 never executed -: 90: -: 91: pointer -: 92: address(reference __x) const _GLIBCXX_NOEXCEPT -: 93: { return std::__addressof(__x); } -: 94: -: 95: const_pointer -: 96: address(const_reference __x) const _GLIBCXX_NOEXCEPT -: 97: { return std::__addressof(__x); } -: 98: -: 99: // NB: __n is permitted to be 0. The C++ standard says nothing -: 100: // about what the return value is when __n == 0. -: 101: _GLIBCXX_NODISCARD pointer 211382: 102: allocate(size_type __n, const void* = static_cast(0)) -: 103: { 211382: 104: if (__n > this->max_size()) -: 105: std::__throw_bad_alloc(); -: 106: -: 107:#if __cpp_aligned_new -: 108: if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) -: 109: { -: 110: std::align_val_t __al = std::align_val_t(alignof(_Tp)); -: 111: return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); -: 112: } -: 113:#endif 211382: 114: return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); -: 115: } -: 116: -: 117: // __p is not permitted to be a null pointer. -: 118: void 422763*: 119: deallocate(pointer __p, size_type) -: 120: { -: 121:#if __cpp_aligned_new -: 122: if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) -: 123: { -: 124: ::operator delete(__p, std::align_val_t(alignof(_Tp))); -: 125: return; -: 126: } -: 127:#endif 422763*: 128: ::operator delete(__p); call 0 returned 100% call 1 returned 100% call 2 never executed call 3 never executed call 4 never executed call 5 never executed call 6 returned 100% call 7 never executed call 8 never executed call 9 never executed call 10 never executed -: 129: } -: 130: -: 131: size_type 422763*: 132: max_size() const _GLIBCXX_USE_NOEXCEPT call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed branch 5 taken 0% (fallthrough) branch 6 taken 100% -: 133: { -: 134:#if __PTRDIFF_MAX__ < __SIZE_MAX__ -: 135: return size_t(__PTRDIFF_MAX__) / sizeof(_Tp); -: 136:#else -: 137: return size_t(-1) / sizeof(_Tp); -: 138:#endif -: 139: } -: 140: -: 141:#if __cplusplus >= 201103L -: 142: template -: 143: void 3040806*: 144: construct(_Up* __p, _Args&&... __args) -: 145: noexcept(noexcept(::new((void *)__p) -: 146: _Up(std::forward<_Args>(__args)...))) 3040806*: 147: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } call 0 never executed branch 1 never executed branch 2 never executed -: 148: -: 149: template -: 150: void 211381: 151: destroy(_Up* __p) -: 152: noexcept(noexcept( __p->~_Up())) 211381: 153: { __p->~_Up(); } call 0 returned 100% call 1 never executed -: 154:#else -: 155: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 156: // 402. wrong new expression in [some_] allocator::construct -: 157: void -: 158: construct(pointer __p, const _Tp& __val) -: 159: { ::new((void *)__p) _Tp(__val); } -: 160: -: 161: void -: 162: destroy(pointer __p) { __p->~_Tp(); } -: 163:#endif -: 164: -: 165: template -: 166: friend bool -: 167: operator==(const new_allocator&, const new_allocator<_Up>&) -: 168: _GLIBCXX_NOTHROW -: 169: { return true; } -: 170: -: 171: template -: 172: friend bool -: 173: operator!=(const new_allocator&, const new_allocator<_Up>&) -: 174: _GLIBCXX_NOTHROW -: 175: { return false; } -: 176: }; -: 177: -: 178:_GLIBCXX_END_NAMESPACE_VERSION -: 179:} // namespace -: 180: -: 181:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#cli#speed.cpp.gcov -: 0:Source:src/cli/speed.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/speed.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/speed.gcda -: 0:Runs:723 -: 1:/* -: 2:* (C) 2009,2010,2014,2015,2017,2018 Jack Lloyd -: 3:* (C) 2015 Simon Warta (Kullo GmbH) -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include "cli.h" -: 9:#include "../tests/test_rng.h" // FIXME -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18: -: 19:// Always available: -: 20:#include -: 21:#include -: 22:#include -: 23:#include -: 24:#include -: 25:#include -: 26: -: 27:#if defined(BOTAN_HAS_BIGINT) -: 28: #include -: 29: #include -: 30:#endif -: 31: -: 32:#if defined(BOTAN_HAS_BLOCK_CIPHER) -: 33: #include -: 34:#endif -: 35: -: 36:#if defined(BOTAN_HAS_STREAM_CIPHER) -: 37: #include -: 38:#endif -: 39: -: 40:#if defined(BOTAN_HAS_HASH) -: 41: #include -: 42:#endif -: 43: -: 44:#if defined(BOTAN_HAS_CIPHER_MODES) -: 45: #include -: 46:#endif -: 47: -: 48:#if defined(BOTAN_HAS_MAC) -: 49: #include -: 50:#endif -: 51: -: 52:#if defined(BOTAN_HAS_AUTO_SEEDING_RNG) -: 53: #include -: 54:#endif -: 55: -: 56:#if defined(BOTAN_HAS_SYSTEM_RNG) -: 57: #include -: 58:#endif -: 59: -: 60:#if defined(BOTAN_HAS_HMAC_DRBG) -: 61: #include -: 62:#endif -: 63: -: 64:#if defined(BOTAN_HAS_PROCESSOR_RNG) -: 65: #include -: 66:#endif -: 67: -: 68:#if defined(BOTAN_HAS_CHACHA_RNG) -: 69: #include -: 70:#endif -: 71: -: 72:#if defined(BOTAN_HAS_FPE_FE1) -: 73: #include -: 74:#endif -: 75: -: 76:#if defined(BOTAN_HAS_RFC3394_KEYWRAP) -: 77: #include -: 78:#endif -: 79: -: 80:#if defined(BOTAN_HAS_COMPRESSION) -: 81: #include -: 82:#endif -: 83: -: 84:#if defined(BOTAN_HAS_POLY_DBL) -: 85: #include -: 86:#endif -: 87: -: 88:#if defined(BOTAN_HAS_PUBLIC_KEY_CRYPTO) -: 89: #include -: 90: #include -: 91: #include -: 92: #include -: 93: #include -: 94:#endif -: 95: -: 96:#if defined(BOTAN_HAS_NUMBERTHEORY) -: 97: #include -: 98: #include -: 99: #include -: 100: #include -: 101:#endif -: 102: -: 103:#if defined(BOTAN_HAS_ECC_GROUP) -: 104: #include -: 105:#endif -: 106: -: 107:#if defined(BOTAN_HAS_DL_GROUP) -: 108: #include -: 109:#endif -: 110: -: 111:#if defined(BOTAN_HAS_MCELIECE) -: 112: #include -: 113:#endif -: 114: -: 115:#if defined(BOTAN_HAS_ECDSA) -: 116: #include -: 117:#endif -: 118: -: 119:#if defined(BOTAN_HAS_NEWHOPE) -: 120: #include -: 121:#endif -: 122: -: 123:#if defined(BOTAN_HAS_SCRYPT) -: 124: #include -: 125:#endif -: 126: -: 127:#if defined(BOTAN_HAS_ARGON2) -: 128: #include -: 129:#endif -: 130: -: 131:#if defined(BOTAN_HAS_BCRYPT) -: 132: #include -: 133:#endif -: 134: -: 135:#if defined(BOTAN_HAS_PASSHASH9) -: 136: #include -: 137:#endif -: 138: -: 139:#if defined(BOTAN_HAS_ZFEC) -: 140: #include -: 141:#endif -: 142: -: 143:namespace Botan_CLI { -: 144: -: 145:using Botan::Timer; -: 146: -: 147:namespace { -: 148: 1*: 149:class JSON_Output final call 0 returned 100% call 1 returned 100% call 2 never executed call 3 never executed -: 150: { -: 151: public: 2: 152: void add(const Timer& timer) { m_results.push_back(timer); } call 0 returned 100% -: 153: function _ZNK9Botan_CLI12_GLOBAL__N_111JSON_Output5printEv called 1 returned 100% blocks executed 93% 1: 154: std::string print() const -: 155: { 1: 156: std::ostringstream out; call 0 returned 100% call 1 never executed -: 157: 1: 158: out << "[\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 159: 3: 160: for(size_t i = 0; i != m_results.size(); ++i) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 161: { 2: 162: if(i != 0) branch 0 taken 50% (fallthrough) branch 1 taken 50% 1: 163: out << ","; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 164: 2: 165: const Timer& t = m_results[i]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 166: 2: 167: out << '{'; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 168: out << "\"algo\": \"" << t.get_name() << "\", "; 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) 2: 169: out << "\"op\": \"" << t.doing() << "\", "; 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) -: 170: 2: 171: out << "\"events\": " << t.events() << ", "; 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) 4: 172: if(t.cycles_consumed() > 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% 4: 173: out << "\"cycles\": " << t.cycles_consumed() << ", "; 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 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) 2: 174: if(t.buf_size() > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 175: { 2: 176: out << "\"bps\": " << static_cast(t.events() / (t.value() / 1000000000.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) 2: 177: out << "\"buf_size\": " << t.buf_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) -: 178: } -: 179: 2: 180: out << "\"nanos\": " << t.value(); 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) -: 181: 2: 182: out << "}\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 183: } 1: 184: out << "]\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 185: 1: 186: return out.str(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 187: } -: 188: private: -: 189: std::vector m_results; -: 190: }; -: 191: -: 192:class Summary final -: 193: { -: 194: public: 1: 195: Summary() {} -: 196: function _ZN9Botan_CLI12_GLOBAL__N_17Summary3addERKN5Botan5TimerE called 2 returned 100% blocks executed 80% 2: 197: void add(const Timer& t) -: 198: { 2: 199: if(t.buf_size() == 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 200: { #####: 201: m_ops_entries.push_back(t); call 0 never executed -: 202: } -: 203: else -: 204: { 2: 205: m_bps_entries[std::make_pair(t.doing(), t.get_name())].push_back(t); 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 -: 206: } 2: 207: } -: 208: function _ZN9Botan_CLI12_GLOBAL__N_17Summary5printEv called 1 returned 100% blocks executed 48% 1: 209: std::string print() -: 210: { 1: 211: const size_t name_padding = 35; 1: 212: const size_t op_name_padding = 16; 1: 213: const size_t op_padding = 16; -: 214: 1: 215: std::ostringstream result_ss; call 0 returned 100% 1: 216: result_ss << std::fixed; call 0 returned 100% -: 217: 1: 218: if(m_bps_entries.size() > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 219: { 1: 220: result_ss << "\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 221: -: 222: // add table header 1: 223: result_ss << std::setw(name_padding) << std::left << "algo" call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) 1: 224: << std::setw(op_name_padding) << std::left << "operation"; call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) -: 225: 2: 226: for(const Timer& t : m_bps_entries.begin()->second) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% -: 227: { 2: 228: result_ss << std::setw(op_padding) << std::right << (std::to_string(t.buf_size()) + " bytes"); 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 0% (fallthrough) branch 10 taken 100% branch 11 never executed branch 12 never executed call 13 never executed -: 229: } 1: 230: result_ss << "\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 231: -: 232: // add table entries 3: 233: for(const auto& entry : m_bps_entries) branch 0 taken 67% (fallthrough) branch 1 taken 33% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 234: { 2*: 235: if(entry.second.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 236: continue; -: 237: 2: 238: result_ss << std::setw(name_padding) << std::left << (entry.first.second) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) 2: 239: << std::setw(op_name_padding) << std::left << (entry.first.first); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) -: 240: 4: 241: for(const Timer& t : entry.second) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 242: { -: 243: 2: 244: if(t.events() == 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 245: { #####: 246: result_ss << std::setw(op_padding) << std::right << "N/A"; call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed -: 247: } -: 248: else -: 249: { 2: 250: result_ss << std::setw(op_padding) << std::right call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% 4: 251: << std::setprecision(2) << (t.bytes_per_second() / 1000.0); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 252: } -: 253: } -: 254: 2: 255: result_ss << "\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 256: } -: 257: 1: 258: result_ss << "\n[results are the number of 1000s bytes processed per second]\n"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 259: } -: 260: 1: 261: if(m_ops_entries.size() > 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 262: { #####: 263: result_ss << std::setprecision(6) << "\n"; call 0 never executed branch 1 never executed branch 2 never executed -: 264: -: 265: // sort entries #####: 266: std::sort(m_ops_entries.begin(), m_ops_entries.end()); call 0 never executed branch 1 never executed branch 2 never executed -: 267: -: 268: // add table header #####: 269: result_ss << std::setw(name_padding) << std::left << "algo" call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 270: << std::setw(op_name_padding) << std::left << "operation" call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 271: << std::setw(op_padding) << std::right << "sec/op" call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 272: << std::setw(op_padding) << std::right << "op/sec" call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 273: << "\n"; call 0 never executed branch 1 never executed branch 2 never executed -: 274: -: 275: // add table entries #####: 276: for(const Timer& entry : m_ops_entries) branch 0 never executed branch 1 never executed call 2 never executed -: 277: { #####: 278: result_ss << std::setw(name_padding) << std::left << entry.get_name() call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 279: << std::setw(op_name_padding) << std::left << entry.doing() call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 280: << std::setw(op_padding) << std::right << entry.seconds_per_event() 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 #####: 281: << std::setw(op_padding) << std::right << entry.events_per_second() call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 282: << "\n"; call 0 never executed branch 1 never executed branch 2 never executed -: 283: } -: 284: } -: 285: 1: 286: return result_ss.str(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 287: } -: 288: -: 289: private: -: 290: std::map, std::vector> m_bps_entries; -: 291: std::vector m_ops_entries; -: 292: }; -: 293: function _ZN9Botan_CLI12_GLOBAL__N_119unique_buffer_sizesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 34 returned 91% blocks executed 52% 34: 294:std::vector unique_buffer_sizes(const std::string& cmdline_arg) -: 295: { 34: 296: const size_t MAX_BUF_SIZE = 64*1024*1024; -: 297: 34: 298: std::set buf; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 69: 299: for(std::string size_str : Botan::split_on(cmdline_arg, ',')) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 53% (fallthrough) branch 4 taken 47% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 returned 100% call 9 returned 100% -: 300: { 35: 301: size_t x = 0; 35: 302: try -: 303: { 35: 304: size_t converted = 0; 35: 305: x = static_cast(std::stoul(size_str, &converted, 0)); call 0 returned 100% branch 1 taken 97% (fallthrough) branch 2 taken 3% (throw) -: 306: 34: 307: if(converted != size_str.size()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 308: throw CLI_Usage_Error("Invalid integer"); 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 -: 309: } 2: 310: catch(std::exception&) call 0 returned 100% call 1 returned 100% -: 311: { 3: 312: throw CLI_Usage_Error("Invalid integer value '" + size_str + "' for option buf-size"); 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 100% (fallthrough) branch 8 taken 0% 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 -: 313: } -: 314: 34: 315: if(x == 0) branch 0 taken 3% (fallthrough) branch 1 taken 97% 3: 316: throw CLI_Usage_Error("Cannot have a zero-sized buffer"); 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 -: 317: 33: 318: if(x > MAX_BUF_SIZE) branch 0 taken 3% (fallthrough) branch 1 taken 97% 3: 319: throw CLI_Usage_Error("Specified buffer size is too large"); 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 -: 320: 32: 321: buf.insert(x); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 322: } -: 323: 34: 324: return std::vector(buf.begin(), buf.end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% -: 325: } -: 326: -: 327:} -: 328: -: 329:class Speed final : public Command -: 330: { -: 331: public: function _ZN9Botan_CLI5SpeedC2Ev called 35 returned 100% blocks executed 64% 35: 332: Speed() 70: 333: : Command("speed --msec=500 --format=default --ecc-groups= --provider= --buf-size=1024 --clear-cpuid= --cpu-clock-speed=0 --cpu-clock-ratio=1.0 *algos") {} 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) -: 334: function _ZN9Botan_CLI5Speed22default_benchmark_listB5cxx11Ev called 0 returned 0% blocks executed 0% #####: 335: std::vector default_benchmark_list() -: 336: { -: 337: /* -: 338: This is not intended to be exhaustive: it just hits the high -: 339: points of the most interesting or widely used algorithms. -: 340: */ -: 341: #####: 342: return { -: 343: /* Block ciphers */ -: 344: "AES-128", -: 345: "AES-192", -: 346: "AES-256", -: 347: "ARIA-128", -: 348: "ARIA-192", -: 349: "ARIA-256", -: 350: "Blowfish", -: 351: "CAST-128", -: 352: "CAST-256", -: 353: "Camellia-128", -: 354: "Camellia-192", -: 355: "Camellia-256", -: 356: "DES", -: 357: "TripleDES", -: 358: "GOST-28147-89", -: 359: "IDEA", -: 360: "KASUMI", -: 361: "MISTY1", -: 362: "Noekeon", -: 363: "SHACAL2", -: 364: "SM4", -: 365: "Serpent", -: 366: "Threefish-512", -: 367: "Twofish", -: 368: "XTEA", -: 369: -: 370: /* Cipher modes */ -: 371: "AES-128/CBC", -: 372: "AES-128/CTR-BE", -: 373: "AES-128/EAX", -: 374: "AES-128/OCB", -: 375: "AES-128/GCM", -: 376: "AES-128/XTS", -: 377: "AES-128/SIV", -: 378: -: 379: "Serpent/CBC", -: 380: "Serpent/CTR-BE", -: 381: "Serpent/EAX", -: 382: "Serpent/OCB", -: 383: "Serpent/GCM", -: 384: "Serpent/XTS", -: 385: "Serpent/SIV", -: 386: -: 387: "ChaCha20Poly1305", -: 388: -: 389: /* Stream ciphers */ -: 390: "RC4", -: 391: "Salsa20", -: 392: "ChaCha20", -: 393: -: 394: /* Hashes */ -: 395: "SHA-160", -: 396: "SHA-256", -: 397: "SHA-512", -: 398: "SHA-3(256)", -: 399: "SHA-3(512)", -: 400: "RIPEMD-160", -: 401: "Skein-512", -: 402: "Blake2b", -: 403: "Tiger", -: 404: "Whirlpool", -: 405: -: 406: /* MACs */ -: 407: "CMAC(AES-128)", -: 408: "HMAC(SHA-256)", -: 409: -: 410: /* pubkey */ -: 411: "RSA", -: 412: "DH", -: 413: "ECDH", -: 414: "ECDSA", -: 415: "Ed25519", -: 416: "Curve25519", -: 417: "NEWHOPE", -: 418: "McEliece", #####: 419: }; 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 call 15 never executed branch 16 never executed branch 17 never executed call 18 never executed branch 19 never executed branch 20 never executed call 21 never executed branch 22 never executed branch 23 never executed call 24 never executed branch 25 never executed branch 26 never executed call 27 never executed branch 28 never executed branch 29 never executed call 30 never executed branch 31 never executed branch 32 never executed call 33 never executed branch 34 never executed branch 35 never executed call 36 never executed branch 37 never executed branch 38 never executed call 39 never executed branch 40 never executed branch 41 never executed call 42 never executed branch 43 never executed branch 44 never executed call 45 never executed branch 46 never executed branch 47 never executed call 48 never executed branch 49 never executed branch 50 never executed call 51 never executed branch 52 never executed branch 53 never executed call 54 never executed branch 55 never executed branch 56 never executed call 57 never executed branch 58 never executed branch 59 never executed call 60 never executed branch 61 never executed branch 62 never executed call 63 never executed branch 64 never executed branch 65 never executed call 66 never executed branch 67 never executed branch 68 never executed call 69 never executed branch 70 never executed branch 71 never executed call 72 never executed branch 73 never executed branch 74 never executed call 75 never executed branch 76 never executed branch 77 never executed call 78 never executed branch 79 never executed branch 80 never executed call 81 never executed branch 82 never executed branch 83 never executed call 84 never executed branch 85 never executed branch 86 never executed call 87 never executed branch 88 never executed branch 89 never executed call 90 never executed branch 91 never executed branch 92 never executed call 93 never executed branch 94 never executed branch 95 never executed call 96 never executed branch 97 never executed branch 98 never executed call 99 never executed branch 100 never executed branch 101 never executed call 102 never executed branch 103 never executed branch 104 never executed call 105 never executed branch 106 never executed branch 107 never executed call 108 never executed branch 109 never executed branch 110 never executed call 111 never executed branch 112 never executed branch 113 never executed call 114 never executed branch 115 never executed branch 116 never executed call 117 never executed branch 118 never executed branch 119 never executed call 120 never executed branch 121 never executed branch 122 never executed call 123 never executed branch 124 never executed branch 125 never executed call 126 never executed branch 127 never executed branch 128 never executed call 129 never executed branch 130 never executed branch 131 never executed call 132 never executed branch 133 never executed branch 134 never executed call 135 never executed branch 136 never executed branch 137 never executed call 138 never executed branch 139 never executed branch 140 never executed call 141 never executed branch 142 never executed branch 143 never executed call 144 never executed branch 145 never executed branch 146 never executed call 147 never executed branch 148 never executed branch 149 never executed call 150 never executed branch 151 never executed branch 152 never executed call 153 never executed branch 154 never executed branch 155 never executed call 156 never executed branch 157 never executed branch 158 never executed call 159 never executed branch 160 never executed branch 161 never executed call 162 never executed branch 163 never executed branch 164 never executed call 165 never executed branch 166 never executed branch 167 never executed call 168 never executed branch 169 never executed branch 170 never executed call 171 never executed branch 172 never executed branch 173 never executed call 174 never executed branch 175 never executed branch 176 never executed call 177 never executed branch 178 never executed branch 179 never executed call 180 never executed branch 181 never executed branch 182 never executed call 183 never executed branch 184 never executed branch 185 never executed call 186 never executed branch 187 never executed branch 188 never executed call 189 never executed branch 190 never executed branch 191 never executed branch 192 never executed branch 193 never executed branch 194 never executed branch 195 never executed branch 196 never executed branch 197 never executed branch 198 never executed branch 199 never executed -: 420: } -: 421: function _ZNK9Botan_CLI5Speed5groupB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 422: std::string group() const override -: 423: { 1: 424: return "misc"; call 0 returned 100% -: 425: } -: 426: function _ZNK9Botan_CLI5Speed11descriptionB5cxx11Ev called 1 returned 100% blocks executed 100% 1: 427: std::string description() const override -: 428: { 1: 429: return "Measures the speed of algorithms"; call 0 returned 100% -: 430: } -: 431: function _ZN9Botan_CLI5Speed2goEv called 34 returned 91% blocks executed 55% 34: 432: void go() override -: 433: { 34: 434: std::chrono::milliseconds msec(get_arg_sz("msec")); 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 34: 435: const std::string provider = get_arg("provider"); 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: 436: std::vector ecc_groups = Botan::split_on(get_arg("ecc-groups"), ','); 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 call 15 returned 100% 68: 437: const std::string format = get_arg("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% 68: 438: const std::string clock_ratio = get_arg("cpu-clock-ratio"); 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% 34: 439: m_clock_speed = get_arg_sz("cpu-clock-speed"); 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% -: 440: 34: 441: m_clock_cycle_ratio = std::strtod(clock_ratio.c_str(), nullptr); call 0 returned 100% -: 442: -: 443: /* -: 444: * This argument is intended to be the ratio between the cycle counter -: 445: * and the actual machine cycles. It is extremely unlikely that there is -: 446: * any machine where the cycle counter increments faster than the actual -: 447: * clock. -: 448: */ 34: 449: if(m_clock_cycle_ratio < 0.0 || m_clock_cycle_ratio > 1.0) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 450: throw CLI_Usage_Error("Unlikely CPU clock ratio of " + clock_ratio); 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 -: 451: 34: 452: m_clock_cycle_ratio = 1.0 / m_clock_cycle_ratio; -: 453: 34*: 454: if(m_clock_speed != 0 && Botan::OS::get_cpu_cycle_counter() != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed -: 455: { #####: 456: error_output() << "The --cpu-clock-speed option is only intended to be used on " call 0 never executed branch 1 never executed branch 2 never executed -: 457: "platforms without access to a cycle counter.\n" #####: 458: "Expected incorrect results\n\n"; call 0 never executed branch 1 never executed branch 2 never executed -: 459: } -: 460: 34: 461: if(format == "table") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% 1: 462: m_summary.reset(new Summary); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 33: 463: else if(format == "json") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% 1: 464: m_json.reset(new JSON_Output); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 32: 465: else if(format != "default") call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 466: throw CLI_Usage_Error("Unknown --format type '" + 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 branch 7 never executed branch 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 -: 467: -: 468:#if defined(BOTAN_HAS_ECC_GROUP) 34: 469: if(ecc_groups.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 470: { 272: 471: ecc_groups = { "secp256r1", "brainpool256r1", 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 0% (fallthrough) branch 22 taken 100% branch 23 never executed branch 24 never executed -: 472: "secp384r1", "brainpool384r1", 238: 473: "secp521r1", "brainpool512r1" }; branch 0 taken 86% (fallthrough) branch 1 taken 14% branch 2 never executed branch 3 never executed -: 474: } #####: 475: else if(ecc_groups.size() == 1 && ecc_groups[0] == "all") branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed -: 476: { #####: 477: auto all = Botan::EC_Group::known_named_groups(); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 478: ecc_groups.assign(all.begin(), all.end()); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 479: } -: 480:#endif -: 481: 68: 482: std::vector algos = get_arg_list("algos"); 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 returned 100% -: 483: 102: 484: const std::vector buf_sizes = unique_buffer_sizes(get_arg("buf-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 91% (fallthrough) branch 8 taken 9% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 taken 0% (fallthrough) branch 13 taken 100% -: 485: 32: 486: for(std::string cpuid_to_clear : Botan::split_on(get_arg("clear-cpuid"), ',')) 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 taken 3% (fallthrough) branch 14 taken 97% call 15 returned 100% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) call 18 returned 100% branch 19 never executed branch 20 never executed call 21 never executed -: 487: { 2: 488: auto bits = Botan::CPUID::bit_from_string(cpuid_to_clear); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 1: 489: if(bits.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 490: { 1: 491: error_output() << "Warning don't know CPUID flag '" << cpuid_to_clear << "'\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) -: 492: } -: 493: 1*: 494: for(auto bit : bits) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed branch 3 never executed branch 4 never executed -: 495: { #####: 496: Botan::CPUID::clear_cpuid_bit(bit); call 0 never executed branch 1 never executed branch 2 never executed -: 497: } -: 498: } -: 499: 31: 500: if(verbose() || m_summary) 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 3% (fallthrough) branch 6 taken 97% -: 501: { 2: 502: output() << Botan::version_string() << "\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) 3: 503: << "CPUID: " << Botan::CPUID::to_string() << "\n\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) branch 12 taken 100% (fallthrough) branch 13 taken 0% branch 14 never executed branch 15 never executed -: 504: } -: 505: 31: 506: const bool using_defaults = (algos.empty()); branch 0 taken 0% (fallthrough) branch 1 taken 100% 31: 507: if(using_defaults) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 508: { #####: 509: algos = default_benchmark_list(); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 510: } -: 511: 79: 512: for(auto algo : algos) branch 0 taken 61% (fallthrough) branch 1 taken 39% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 513: { 48: 514: using namespace std::placeholders; -: 515: 48: 516: if(false) -: 517: { -: 518: // Since everything might be disabled, need a block to else if from -: 519: } -: 520:#if defined(BOTAN_HAS_HASH) 48: 521: else if(Botan::HashFunction::providers(algo).size() > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 2% (fallthrough) branch 5 taken 98% -: 522: { 1: 523: bench_providers_of( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 524: algo, provider, msec, buf_sizes, 2: 525: std::bind(&Speed::bench_hash, this, _1, _2, _3, _4)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 526: } -: 527:#endif -: 528:#if defined(BOTAN_HAS_BLOCK_CIPHER) 47: 529: else if(Botan::BlockCipher::providers(algo).size() > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 9% (fallthrough) branch 5 taken 91% -: 530: { 4: 531: bench_providers_of( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 532: algo, provider, msec, buf_sizes, 8: 533: std::bind(&Speed::bench_block_cipher, this, _1, _2, _3, _4)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 534: } -: 535:#endif -: 536:#if defined(BOTAN_HAS_STREAM_CIPHER) 43: 537: else if(Botan::StreamCipher::providers(algo).size() > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 2% (fallthrough) branch 5 taken 98% -: 538: { 1: 539: bench_providers_of( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 540: algo, provider, msec, buf_sizes, 2: 541: std::bind(&Speed::bench_stream_cipher, this, _1, _2, _3, _4)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 542: } -: 543:#endif -: 544:#if defined(BOTAN_HAS_CIPHER_MODES) 84: 545: else if(auto enc = Botan::Cipher_Mode::create(algo, Botan::ENCRYPTION, provider)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 2% (fallthrough) branch 4 taken 98% -: 546: { 2: 547: auto dec = Botan::Cipher_Mode::create_or_throw(algo, Botan::DECRYPTION, provider); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 548: bench_cipher_mode(*enc, *dec, msec, buf_sizes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 549: } -: 550:#endif -: 551:#if defined(BOTAN_HAS_MAC) 41: 552: else if(Botan::MessageAuthenticationCode::providers(algo).size() > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 2% (fallthrough) branch 5 taken 98% -: 553: { 1: 554: bench_providers_of( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 555: algo, provider, msec, buf_sizes, 2: 556: std::bind(&Speed::bench_mac, this, _1, _2, _3, _4)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 557: } -: 558:#endif -: 559:#if defined(BOTAN_HAS_RSA) 40: 560: else if(algo == "RSA") call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% -: 561: { 1: 562: bench_rsa(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 563: } 39: 564: else if(algo == "RSA_keygen") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 565: { 1: 566: bench_rsa_keygen(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 567: } -: 568:#endif -: 569:#if defined(BOTAN_HAS_ECDSA) 38: 570: else if(algo == "ECDSA") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 571: { 1: 572: bench_ecdsa(ecc_groups, provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 573: } 37: 574: else if(algo == "ecdsa_recovery") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 575: { 1: 576: bench_ecdsa_recovery(ecc_groups, provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 577: } -: 578:#endif -: 579:#if defined(BOTAN_HAS_SM2) 36: 580: else if(algo == "SM2") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 581: { 1: 582: bench_sm2(ecc_groups, provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 583: } -: 584:#endif -: 585:#if defined(BOTAN_HAS_ECKCDSA) 35: 586: else if(algo == "ECKCDSA") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 587: { 1: 588: bench_eckcdsa(ecc_groups, provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 589: } -: 590:#endif -: 591:#if defined(BOTAN_HAS_GOST_34_10_2001) 34: 592: else if(algo == "GOST-34.10") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 593: { 1: 594: bench_gost_3410(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 595: } -: 596:#endif -: 597:#if defined(BOTAN_HAS_ECGDSA) 33: 598: else if(algo == "ECGDSA") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 599: { 1: 600: bench_ecgdsa(ecc_groups, provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 601: } -: 602:#endif -: 603:#if defined(BOTAN_HAS_ED25519) 32: 604: else if(algo == "Ed25519") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 605: { 1: 606: bench_ed25519(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 607: } -: 608:#endif -: 609:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) 31: 610: else if(algo == "DH") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 611: { 1: 612: bench_dh(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 613: } -: 614:#endif -: 615:#if defined(BOTAN_HAS_DSA) 30: 616: else if(algo == "DSA") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 617: { 1: 618: bench_dsa(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 619: } -: 620:#endif -: 621:#if defined(BOTAN_HAS_ELGAMAL) 29: 622: else if(algo == "ElGamal") call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% -: 623: { 1: 624: bench_elgamal(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 625: } -: 626:#endif -: 627:#if defined(BOTAN_HAS_ECDH) 28: 628: else if(algo == "ECDH") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 629: { 1: 630: bench_ecdh(ecc_groups, provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 631: } -: 632:#endif -: 633:#if defined(BOTAN_HAS_CURVE_25519) 27: 634: else if(algo == "Curve25519") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 635: { 1: 636: bench_curve25519(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 637: } -: 638:#endif -: 639:#if defined(BOTAN_HAS_MCELIECE) 26: 640: else if(algo == "McEliece") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 641: { 1: 642: bench_mceliece(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 643: } -: 644:#endif -: 645:#if defined(BOTAN_HAS_XMSS_RFC8391) 25: 646: else if(algo == "XMSS") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 647: { 1: 648: bench_xmss(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 649: } -: 650:#endif -: 651:#if defined(BOTAN_HAS_NEWHOPE) && defined(BOTAN_HAS_CHACHA_RNG) 24: 652: else if(algo == "NEWHOPE") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 653: { 1: 654: bench_newhope(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 655: } -: 656:#endif -: 657:#if defined(BOTAN_HAS_SCRYPT) 23: 658: else if(algo == "scrypt") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 659: { 1: 660: bench_scrypt(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 661: } -: 662:#endif -: 663:#if defined(BOTAN_HAS_ARGON2) 22: 664: else if(algo == "argon2") call 0 returned 100% branch 1 taken 5% (fallthrough) branch 2 taken 95% -: 665: { 1: 666: bench_argon2(provider, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 667: } -: 668:#endif -: 669:#if defined(BOTAN_HAS_BCRYPT) 21: 670: else if(algo == "bcrypt") call 0 returned 100% branch 1 taken 5% (fallthrough) branch 2 taken 95% -: 671: { 1: 672: bench_bcrypt(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 673: } -: 674:#endif -: 675:#if defined(BOTAN_HAS_PASSHASH9) 20: 676: else if(algo == "passhash9") call 0 returned 100% branch 1 taken 5% (fallthrough) branch 2 taken 95% -: 677: { 1: 678: bench_passhash9(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 679: } -: 680:#endif -: 681:#if defined(BOTAN_HAS_ZFEC) 19: 682: else if(algo == "zfec") call 0 returned 100% branch 1 taken 5% (fallthrough) branch 2 taken 95% -: 683: { 1: 684: bench_zfec(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 685: } -: 686:#endif -: 687:#if defined(BOTAN_HAS_POLY_DBL) 18: 688: else if(algo == "poly_dbl") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% -: 689: { 1: 690: bench_poly_dbl(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 691: } -: 692:#endif -: 693: -: 694:#if defined(BOTAN_HAS_DL_GROUP) 17: 695: else if(algo == "modexp") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% -: 696: { 1: 697: bench_modexp(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 698: } -: 699:#endif -: 700: -: 701:#if defined(BOTAN_HAS_BIGINT) 16: 702: else if(algo == "mp_mul") call 0 returned 100% branch 1 taken 6% (fallthrough) branch 2 taken 94% -: 703: { 1: 704: bench_mp_mul(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 705: } 15: 706: else if(algo == "mp_div") call 0 returned 100% branch 1 taken 7% (fallthrough) branch 2 taken 93% -: 707: { 1: 708: bench_mp_div(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 709: } 14: 710: else if(algo == "mp_div10") call 0 returned 100% branch 1 taken 7% (fallthrough) branch 2 taken 93% -: 711: { 1: 712: bench_mp_div10(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 713: } -: 714:#endif -: 715: -: 716:#if defined(BOTAN_HAS_NUMBERTHEORY) 13: 717: else if(algo == "primality_test") call 0 returned 100% branch 1 taken 8% (fallthrough) branch 2 taken 92% -: 718: { 1: 719: bench_primality_tests(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 720: } 12: 721: else if(algo == "random_prime") call 0 returned 100% branch 1 taken 8% (fallthrough) branch 2 taken 92% -: 722: { 1: 723: bench_random_prime(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 724: } 11: 725: else if(algo == "inverse_mod") call 0 returned 100% branch 1 taken 9% (fallthrough) branch 2 taken 91% -: 726: { 1: 727: bench_inverse_mod(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 728: } 10: 729: else if(algo == "bn_redc") call 0 returned 100% branch 1 taken 10% (fallthrough) branch 2 taken 90% -: 730: { 1: 731: bench_bn_redc(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 732: } 9: 733: else if(algo == "nistp_redc") call 0 returned 100% branch 1 taken 11% (fallthrough) branch 2 taken 89% -: 734: { 1: 735: bench_nistp_redc(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 736: } -: 737:#endif -: 738: -: 739:#if defined(BOTAN_HAS_FPE_FE1) 8: 740: else if(algo == "fpe_fe1") call 0 returned 100% branch 1 taken 12% (fallthrough) branch 2 taken 88% -: 741: { 1: 742: bench_fpe_fe1(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 743: } -: 744:#endif -: 745: -: 746:#if defined(BOTAN_HAS_RFC3394_KEYWRAP) 7: 747: else if(algo == "rfc3394") call 0 returned 100% branch 1 taken 14% (fallthrough) branch 2 taken 86% -: 748: { 1: 749: bench_rfc3394(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 750: } -: 751:#endif -: 752: -: 753:#if defined(BOTAN_HAS_ECC_GROUP) 6: 754: else if(algo == "ecc_mult") call 0 returned 100% branch 1 taken 17% (fallthrough) branch 2 taken 83% -: 755: { 1: 756: bench_ecc_mult(ecc_groups, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 757: } 5: 758: else if(algo == "ecc_ops") call 0 returned 100% branch 1 taken 20% (fallthrough) branch 2 taken 80% -: 759: { 1: 760: bench_ecc_ops(ecc_groups, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 761: } 4: 762: else if(algo == "ecc_init") call 0 returned 100% branch 1 taken 25% (fallthrough) branch 2 taken 75% -: 763: { 1: 764: bench_ecc_init(ecc_groups, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 765: } 3: 766: else if(algo == "os2ecp") call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 767: { 1: 768: bench_os2ecp(ecc_groups, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 769: } -: 770:#endif 2: 771: else if(algo == "RNG") call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% -: 772: { -: 773:#if defined(BOTAN_HAS_AUTO_SEEDING_RNG) 2: 774: Botan::AutoSeeded_RNG auto_rng; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 1: 775: bench_rng(auto_rng, "AutoSeeded_RNG (with reseed)", msec, buf_sizes); 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) -: 776:#endif -: 777: -: 778:#if defined(BOTAN_HAS_SYSTEM_RNG) 1: 779: bench_rng(Botan::system_rng(), "System_RNG", msec, buf_sizes); 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) -: 780:#endif -: 781: -: 782:#if defined(BOTAN_HAS_PROCESSOR_RNG) 1: 783: if(Botan::Processor_RNG::available()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 784: { 2: 785: Botan::Processor_RNG hwrng; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 786: bench_rng(hwrng, "Processor_RNG", msec, buf_sizes); 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) -: 787: } -: 788:#endif -: 789: -: 790:#if defined(BOTAN_HAS_HMAC_DRBG) 4: 791: for(std::string hash : { "SHA-256", "SHA-384", "SHA-512" }) branch 0 taken 75% (fallthrough) branch 1 taken 25% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 792: { 6: 793: Botan::HMAC_DRBG hmac_drbg(hash); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 6: 794: bench_rng(hmac_drbg, hmac_drbg.name(), msec, buf_sizes); 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 -: 795: } -: 796:#endif -: 797: -: 798:#if defined(BOTAN_HAS_CHACHA_RNG) -: 799: // Provide a dummy seed 1: 800: Botan::ChaCha_RNG chacha_rng(Botan::secure_vector(32)); 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: 801: bench_rng(chacha_rng, "ChaCha_RNG", msec, buf_sizes); 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% -: 802:#endif -: 803: -: 804: } 1: 805: else if(algo == "entropy") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 806: { 1: 807: bench_entropy_sources(msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 808: } -: 809: else -: 810: { #####: 811: if(verbose() || !using_defaults) 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 -: 812: { #####: 813: error_output() << "Unknown algorithm '" << algo << "'\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 branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed -: 814: } -: 815: } -: 816: } -: 817: 31: 818: if(m_json) branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 819: { 3: 820: output() << m_json->print(); 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% -: 821: } 31: 822: if(m_summary) branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 823: { 3: 824: output() << m_summary->print() << "\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 -: 825: } -: 826: 31*: 827: if(verbose() && m_clock_speed == 0 && m_cycles_consumed > 0 && m_ns_taken > 0) 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 branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed -: 828: { #####: 829: const double seconds = static_cast(m_ns_taken) / 1000000000; #####: 830: const double Hz = static_cast(m_cycles_consumed) / seconds; #####: 831: const double MHz = Hz / 1000000; #####: 832: output() << "\nEstimated clock speed " << MHz << " MHz\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 branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed -: 833: } 31: 834: } -: 835: -: 836: private: -: 837: -: 838: size_t m_clock_speed = 0; -: 839: double m_clock_cycle_ratio = 0.0; -: 840: uint64_t m_cycles_consumed = 0; -: 841: uint64_t m_ns_taken = 0; -: 842: std::unique_ptr m_summary; -: 843: std::unique_ptr m_json; -: 844: function _ZN9Botan_CLI5Speed13record_resultERKSt10unique_ptrIN5Botan5TimerESt14default_deleteIS3_EE called 425 returned 100% blocks executed 79% 425: 845: void record_result(const std::unique_ptr& t) -: 846: { 425: 847: m_ns_taken += t->value(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 425: 848: m_cycles_consumed += t->cycles_consumed(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 425: 849: if(m_json) branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 850: { 2: 851: m_json->add(*t); call 0 returned 100% -: 852: } -: 853: else -: 854: { 423: 855: output() << t->to_string() << std::flush; 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) branch 8 taken 100% (fallthrough) branch 9 taken 0% 423: 856: if(m_summary) branch 0 taken 1% (fallthrough) branch 1 taken 100% 2: 857: m_summary->add(*t); call 0 returned 100% -: 858: } 425: 859: } -: 860: -: 861: template -: 862: using bench_fn = std::function&)>; -: 866: -: 867: template 7: 868: void bench_providers_of(const std::string& algo, -: 869: const std::string& provider, /* user request, if any */ -: 870: const std::chrono::milliseconds runtime, -: 871: const std::vector& buf_sizes, -: 872: bench_fn bench_one) -: 873: { 14: 874: for(auto const& prov : T::providers(algo)) -: 875: { 7*: 876: if(provider.empty() || provider == prov) -: 877: { 14: 878: auto p = T::create(algo, prov); -: 879: 7: 880: if(p) -: 881: { 14: 882: bench_one(*p, prov, runtime, buf_sizes); -: 883: } -: 884: } -: 885: } 7: 886: } ------------------ _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan25MessageAuthenticationCodeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE: function _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan25MessageAuthenticationCodeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE called 1 returned 100% blocks executed 61% 1: 868: void bench_providers_of(const std::string& algo, -: 869: const std::string& provider, /* user request, if any */ -: 870: const std::chrono::milliseconds runtime, -: 871: const std::vector& buf_sizes, -: 872: bench_fn bench_one) -: 873: { 2: 874: for(auto const& prov : T::providers(algo)) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% branch 3 taken 0% (fallthrough) branch 4 taken 100% call 5 returned 100% call 6 never executed -: 875: { 1*: 876: if(provider.empty() || provider == prov) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 877: { 2: 878: auto p = T::create(algo, prov); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 879: 1: 880: if(p) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 881: { 2: 882: bench_one(*p, prov, runtime, buf_sizes); branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% branch 4 never executed branch 5 never executed -: 883: } -: 884: } -: 885: } 1: 886: } ------------------ _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan12StreamCipherEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE: function _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan12StreamCipherEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE called 1 returned 100% blocks executed 61% 1: 868: void bench_providers_of(const std::string& algo, -: 869: const std::string& provider, /* user request, if any */ -: 870: const std::chrono::milliseconds runtime, -: 871: const std::vector& buf_sizes, -: 872: bench_fn bench_one) -: 873: { 2: 874: for(auto const& prov : T::providers(algo)) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% branch 3 taken 0% (fallthrough) branch 4 taken 100% call 5 returned 100% call 6 never executed -: 875: { 1*: 876: if(provider.empty() || provider == prov) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 877: { 2: 878: auto p = T::create(algo, prov); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 879: 1: 880: if(p) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 881: { 2: 882: bench_one(*p, prov, runtime, buf_sizes); branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% branch 4 never executed branch 5 never executed -: 883: } -: 884: } -: 885: } 1: 886: } ------------------ _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan11BlockCipherEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE: function _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan11BlockCipherEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE called 4 returned 100% blocks executed 64% 4: 868: void bench_providers_of(const std::string& algo, -: 869: const std::string& provider, /* user request, if any */ -: 870: const std::chrono::milliseconds runtime, -: 871: const std::vector& buf_sizes, -: 872: bench_fn bench_one) -: 873: { 8: 874: for(auto const& prov : T::providers(algo)) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% branch 3 taken 25% (fallthrough) branch 4 taken 75% call 5 returned 100% call 6 never executed -: 875: { 4: 876: if(provider.empty() || provider == prov) branch 0 taken 25% (fallthrough) branch 1 taken 75% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 877: { 8: 878: auto p = T::create(algo, prov); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 879: 4: 880: if(p) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 881: { 8: 882: bench_one(*p, prov, runtime, buf_sizes); branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% branch 4 never executed branch 5 never executed -: 883: } -: 884: } -: 885: } 4: 886: } ------------------ _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan12HashFunctionEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE: function _ZN9Botan_CLI5Speed18bench_providers_ofIN5Botan12HashFunctionEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEESt8functionIFvRT_S9_SG_SL_EE called 1 returned 100% blocks executed 61% 1: 868: void bench_providers_of(const std::string& algo, -: 869: const std::string& provider, /* user request, if any */ -: 870: const std::chrono::milliseconds runtime, -: 871: const std::vector& buf_sizes, -: 872: bench_fn bench_one) -: 873: { 2: 874: for(auto const& prov : T::providers(algo)) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% branch 3 taken 0% (fallthrough) branch 4 taken 100% call 5 returned 100% call 6 never executed -: 875: { 1*: 876: if(provider.empty() || provider == prov) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 877: { 2: 878: auto p = T::create(algo, prov); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 879: 1: 880: if(p) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 881: { 2: 882: bench_one(*p, prov, runtime, buf_sizes); branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% branch 4 never executed branch 5 never executed -: 883: } -: 884: } -: 885: } 1: 886: } ------------------ -: 887: -: 888: std::unique_ptr make_timer(const std::string& name, -: 889: uint64_t event_mult = 1, -: 890: const std::string& what = "", -: 891: const std::string& provider = "", -: 892: size_t buf_size = 0) -: 893: { -: 894: return std::unique_ptr( -: 895: new Timer(name, provider, what, event_mult, buf_size, -: 896: m_clock_cycle_ratio, m_clock_speed)); -: 897: } -: 898: 175: 899: std::unique_ptr make_timer(const std::string& algo, -: 900: const std::string& provider, -: 901: const std::string& what) -: 902: { 175: 903: return make_timer(algo, 1, what, provider, 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 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) call 39 returned 100% branch 40 taken 100% (fallthrough) branch 41 taken 0% (throw) call 42 returned 100% branch 43 taken 100% (fallthrough) branch 44 taken 0% (throw) call 45 returned 100% branch 46 taken 100% (fallthrough) branch 47 taken 0% (throw) call 48 returned 100% branch 49 taken 100% (fallthrough) branch 50 taken 0% (throw) call 51 returned 100% branch 52 taken 100% (fallthrough) branch 53 taken 0% (throw) call 54 returned 100% branch 55 taken 100% (fallthrough) branch 56 taken 0% (throw) call 57 returned 100% branch 58 taken 100% (fallthrough) branch 59 taken 0% (throw) call 60 returned 100% branch 61 taken 100% (fallthrough) branch 62 taken 0% (throw) -: 904: } -: 905: -: 906:#if defined(BOTAN_HAS_BLOCK_CIPHER) function _ZN9Botan_CLI5Speed18bench_block_cipherERN5Botan11BlockCipherERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEE called 4 returned 100% blocks executed 48% 4: 907: void bench_block_cipher(Botan::BlockCipher& cipher, -: 908: const std::string& provider, -: 909: std::chrono::milliseconds runtime, -: 910: const std::vector& buf_sizes) -: 911: { 8: 912: std::unique_ptr ks_timer = make_timer(cipher.name(), provider, "key schedule"); 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 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed call 12 never executed call 13 never executed -: 913: 8: 914: const Botan::SymmetricKey key(rng(), cipher.maximum_keylength()); 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% 8: 915: ks_timer->run([&]() { cipher.set_key(key); }); 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) -: 916: 4: 917: const size_t bs = cipher.block_size(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 918: std::set buf_sizes_in_blocks; branch 0 taken 100% (fallthrough) branch 1 taken 0% 9: 919: for(size_t buf_size : buf_sizes) branch 0 taken 56% (fallthrough) branch 1 taken 44% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 920: { 5: 921: if(buf_size % bs == 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% 10: 922: buf_sizes_in_blocks.insert(buf_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 923: else #####: 924: buf_sizes_in_blocks.insert(buf_size + bs - (buf_size % bs)); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 925: } -: 926: 9: 927: for(size_t buf_size : buf_sizes_in_blocks) branch 0 taken 56% (fallthrough) branch 1 taken 44% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 928: { 10: 929: std::vector buffer(buf_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 930: const size_t blocks = buf_size / bs; -: 931: 15: 932: std::unique_ptr encrypt_timer = make_timer(cipher.name(), buffer.size(), "encrypt", provider, buf_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% branch 14 never executed branch 15 never executed call 16 never executed 15: 933: std::unique_ptr decrypt_timer = make_timer(cipher.name(), buffer.size(), "decrypt", provider, buf_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) 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 -: 934: 2812: 935: encrypt_timer->run_until_elapsed(runtime, [&]() { cipher.encrypt_n(&buffer[0], &buffer[0], blocks); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 936: record_result(encrypt_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 937: 2806: 938: decrypt_timer->run_until_elapsed(runtime, [&]() { cipher.decrypt_n(&buffer[0], &buffer[0], blocks); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 939: record_result(decrypt_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 940: } 4: 941: } -: 942:#endif -: 943: -: 944:#if defined(BOTAN_HAS_STREAM_CIPHER) function _ZN9Botan_CLI5Speed19bench_stream_cipherERN5Botan12StreamCipherERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEE called 1 returned 100% blocks executed 58% 1: 945: void bench_stream_cipher( -: 946: Botan::StreamCipher& cipher, -: 947: const std::string& provider, -: 948: const std::chrono::milliseconds runtime, -: 949: const std::vector& buf_sizes) -: 950: { 2: 951: for(auto buf_size : buf_sizes) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 952: { 2: 953: Botan::secure_vector buffer = rng().random_vec(buf_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) -: 954: 3: 955: std::unique_ptr encrypt_timer = make_timer(cipher.name(), buffer.size(), "encrypt", provider, buf_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed call 15 never executed -: 956: 2: 957: const Botan::SymmetricKey key(rng(), cipher.maximum_keylength()); 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% 1: 958: cipher.set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 959: 1: 960: if(cipher.valid_iv_length(12)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 961: { 2: 962: const Botan::InitializationVector iv(rng(), 12); 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) 1: 963: cipher.set_iv(iv.begin(), iv.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 964: } -: 965: 128: 966: while(encrypt_timer->under(runtime)) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 967: { 254: 968: encrypt_timer->run([&]() { cipher.encipher(buffer); }); 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) -: 969: } -: 970: 1: 971: record_result(encrypt_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 972: } 1: 973: } -: 974:#endif -: 975: -: 976:#if defined(BOTAN_HAS_HASH) function _ZN9Botan_CLI5Speed10bench_hashERN5Botan12HashFunctionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEE called 1 returned 100% blocks executed 53% 1: 977: void bench_hash( -: 978: Botan::HashFunction& hash, -: 979: const std::string& provider, -: 980: const std::chrono::milliseconds runtime, -: 981: const std::vector& buf_sizes) -: 982: { 1: 983: std::vector output(hash.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) call 6 never executed -: 984: 2: 985: for(auto buf_size : buf_sizes) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 986: { 2: 987: Botan::secure_vector buffer = rng().random_vec(buf_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) -: 988: 3: 989: std::unique_ptr timer = make_timer(hash.name(), buffer.size(), "hash", provider, buf_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% branch 14 never executed branch 15 never executed call 16 never executed function _ZZN9Botan_CLI5Speed10bench_hashERN5Botan12HashFunctionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEEENKUlvE_clEv called 211 returned 100% blocks executed 100% 212: 990: timer->run_until_elapsed(runtime, [&]() { hash.update(buffer); hash.final(output.data()); }); call 0 returned 100% call 1 returned 100% 1: 991: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 992: } 1: 993: } -: 994:#endif -: 995: -: 996:#if defined(BOTAN_HAS_MAC) function _ZN9Botan_CLI5Speed9bench_macERN5Botan25MessageAuthenticationCodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEE called 1 returned 100% blocks executed 58% 1: 997: void bench_mac( -: 998: Botan::MessageAuthenticationCode& mac, -: 999: const std::string& provider, -: 1000: const std::chrono::milliseconds runtime, -: 1001: const std::vector& buf_sizes) -: 1002: { 1: 1003: std::vector output(mac.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) call 6 never executed -: 1004: 2: 1005: for(auto buf_size : buf_sizes) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1006: { 2: 1007: Botan::secure_vector buffer = rng().random_vec(buf_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) -: 1008: 2: 1009: const Botan::SymmetricKey key(rng(), mac.maximum_keylength()); 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% 1: 1010: mac.set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1011: mac.start(nullptr, 0); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1012: 3: 1013: std::unique_ptr timer = make_timer(mac.name(), buffer.size(), "mac", provider, buf_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% branch 14 never executed branch 15 never executed call 16 never executed 236: 1014: timer->run_until_elapsed(runtime, [&]() { mac.update(buffer); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 2: 1015: timer->run([&]() { mac.final(output.data()); }); 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) 1: 1016: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1017: } 1: 1018: } -: 1019:#endif -: 1020: -: 1021:#if defined(BOTAN_HAS_CIPHER_MODES) function _ZN9Botan_CLI5Speed17bench_cipher_modeERN5Botan11Cipher_ModeES3_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEE called 1 returned 100% blocks executed 44% 1: 1022: void bench_cipher_mode( -: 1023: Botan::Cipher_Mode& enc, -: 1024: Botan::Cipher_Mode& dec, -: 1025: const std::chrono::milliseconds runtime, -: 1026: const std::vector& buf_sizes) -: 1027: { 2: 1028: std::unique_ptr ks_timer = make_timer(enc.name(), enc.provider(), "key schedule"); 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 taken 0% (fallthrough) branch 14 taken 100% branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed call 19 never executed call 20 never executed -: 1029: 2: 1030: const Botan::SymmetricKey key(rng(), enc.key_spec().maximum_keylength()); 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% -: 1031: 2: 1032: ks_timer->run([&]() { enc.set_key(key); }); 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) 2: 1033: ks_timer->run([&]() { dec.set_key(key); }); 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) -: 1034: 1: 1035: record_result(ks_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1036: 2: 1037: for(auto buf_size : buf_sizes) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1038: { 2: 1039: Botan::secure_vector buffer = rng().random_vec(buf_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) -: 1040: 3: 1041: std::unique_ptr encrypt_timer = make_timer(enc.name(), buffer.size(), "encrypt", enc.provider(), buf_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 taken 0% (fallthrough) branch 13 taken 100% branch 14 taken 0% (fallthrough) branch 15 taken 100% call 16 returned 100% branch 17 taken 100% (fallthrough) branch 18 taken 0% branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed 2: 1042: std::unique_ptr decrypt_timer = make_timer(dec.name(), buffer.size(), "decrypt", dec.provider(), buf_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 taken 0% (fallthrough) branch 13 taken 100% branch 14 taken 0% (fallthrough) branch 15 taken 100% branch 16 never executed branch 17 never executed call 18 never executed call 19 never executed -: 1043: 2: 1044: Botan::secure_vector iv = rng().random_vec(enc.default_nonce_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) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% -: 1045: 1: 1046: if(buf_size >= enc.minimum_final_size()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1047: { 74: 1048: while(encrypt_timer->under(runtime) && decrypt_timer->under(runtime)) branch 0 taken 99% (fallthrough) branch 1 taken 1% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 1049: { -: 1050: // Must run in this order, or AEADs will reject the ciphertext function _ZZN9Botan_CLI5Speed17bench_cipher_modeERN5Botan11Cipher_ModeES3_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEEENKUlvE1_clEv called 73 returned 100% blocks executed 100% 146: 1051: encrypt_timer->run([&]() { enc.start(iv); enc.finish(buffer); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% -: 1052: function _ZZN9Botan_CLI5Speed17bench_cipher_modeERN5Botan11Cipher_ModeES3_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEEENKUlvE2_clEv called 73 returned 100% blocks executed 100% 146: 1053: decrypt_timer->run([&]() { dec.start(iv); dec.finish(buffer); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% -: 1054: 73: 1055: if(iv.size() > 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 1056: { 73: 1057: iv[iv.size()-1] += 1; -: 1058: } -: 1059: } -: 1060: } -: 1061: 1: 1062: record_result(encrypt_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1063: record_result(decrypt_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1064: } 1: 1065: } -: 1066:#endif -: 1067: function _ZN9Botan_CLI5Speed9bench_rngERN5Botan21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKSt6vectorImSaImEE called 7 returned 100% blocks executed 53% 7: 1068: void bench_rng( -: 1069: Botan::RandomNumberGenerator& rng, -: 1070: const std::string& rng_name, -: 1071: const std::chrono::milliseconds runtime, -: 1072: const std::vector& buf_sizes) -: 1073: { 14: 1074: for(auto buf_size : buf_sizes) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1075: { 14: 1076: Botan::secure_vector buffer(buf_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1077: -: 1078:#if defined(BOTAN_HAS_SYSTEM_RNG) 7: 1079: rng.reseed_from_rng(Botan::system_rng(), 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) -: 1080:#endif -: 1081: 21: 1082: std::unique_ptr timer = make_timer(rng_name, buffer.size(), "generate", "", buf_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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% branch 12 taken 100% (fallthrough) branch 13 taken 0% call 14 never executed 392: 1083: timer->run_until_elapsed(runtime, [&]() { rng.randomize(buffer.data(), buffer.size()); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 7: 1084: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1085: } 7: 1086: } -: 1087: function _ZN9Botan_CLI5Speed21bench_entropy_sourcesENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 56% 1: 1088: void bench_entropy_sources(const std::chrono::milliseconds) -: 1089: { 1: 1090: Botan::Entropy_Sources& srcs = Botan::Entropy_Sources::global_sources(); call 0 returned 100% -: 1091: 7: 1092: for(auto src : srcs.enabled_sources()) call 0 returned 100% branch 1 taken 86% (fallthrough) branch 2 taken 14% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 never executed -: 1093: { 6: 1094: size_t entropy_bits = 0; 12: 1095: 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% -: 1096: 18: 1097: std::unique_ptr timer = make_timer(src, "", "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 0% (fallthrough) branch 7 taken 100% branch 8 taken 0% (fallthrough) branch 9 taken 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% call 12 never executed 12: 1098: timer->run([&]() { entropy_bits = srcs.poll_just(rng, src); }); 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) -: 1099: 6: 1100: size_t compressed_size = 0; -: 1101: -: 1102:#if defined(BOTAN_HAS_ZLIB) 12: 1103: 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% call 8 returned 100% -: 1104: 6: 1105: if(comp) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 1106: { 12: 1107: Botan::secure_vector compressed; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1108: compressed.assign(rng.seed_material().begin(), rng.seed_material().end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1109: comp->start(9); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1110: comp->finish(compressed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1111: 6: 1112: compressed_size = compressed.size(); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 1113: } -: 1114:#endif -: 1115: 12: 1116: std::ostringstream msg; 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% -: 1117: 6: 1118: msg << "Entropy source " << src << " output " << rng.seed_material().size() << " 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) 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) 6: 1119: << " estimated entropy " << entropy_bits << " in " << timer->milliseconds() << " ms"; 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) -: 1120: 6: 1121: if(compressed_size > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 1122: { 6: 1123: msg << " output compressed to " << compressed_size << " 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) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) -: 1124: } -: 1125: 6: 1126: msg << " total samples " << rng.samples() << "\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) -: 1127: 12: 1128: timer->set_custom_msg(msg.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) branch 6 taken 100% (fallthrough) branch 7 taken 0% call 8 never executed -: 1129: 6: 1130: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1131: } 1: 1132: } -: 1133: -: 1134:#if defined(BOTAN_HAS_ECC_GROUP) function _ZN9Botan_CLI5Speed13bench_ecc_opsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 45% 1: 1135: void bench_ecc_ops(const std::vector& groups, const std::chrono::milliseconds runtime) -: 1136: { 7: 1137: for(std::string group_name : groups) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1138: { 12: 1139: const Botan::EC_Group ec_group(group_name); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 0% (fallthrough) branch 5 taken 100% call 6 never executed -: 1140: 18: 1141: std::unique_ptr add_timer = make_timer(group_name + " add"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed 18: 1142: std::unique_ptr addf_timer = make_timer(group_name + " addf"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed 18: 1143: std::unique_ptr dbl_timer = make_timer(group_name + " dbl"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed -: 1144: 6: 1145: const Botan::PointGFp& base_point = ec_group.get_base_point(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 1146: Botan::PointGFp non_affine_pt = ec_group.get_base_point() * 1776; // create a non-affine point 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 returned 100% call 12 never executed call 13 never executed 12: 1147: Botan::PointGFp pt = ec_group.get_base_point(); 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% -: 1148: 12: 1149: std::vector ws(Botan::PointGFp::WORKSPACE_SIZE); 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 -: 1150: 728: 1151: while(add_timer->under(runtime) && addf_timer->under(runtime) && dbl_timer->under(runtime)) branch 0 taken 99% (fallthrough) branch 1 taken 1% branch 2 taken 100% (fallthrough) branch 3 taken 1% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 1152: { 1444: 1153: dbl_timer->run([&]() { pt.mult2(ws); }); 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) 1444: 1154: add_timer->run([&]() { pt.add(non_affine_pt, ws); }); 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) 1444: 1155: addf_timer->run([&]() { pt.add_affine(base_point, ws); }); 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) -: 1156: } -: 1157: 6: 1158: record_result(dbl_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1159: record_result(add_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1160: record_result(addf_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1161: } 1: 1162: } -: 1163: function _ZN9Botan_CLI5Speed14bench_ecc_initERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 48% 1: 1164: void bench_ecc_init(const std::vector& groups, const std::chrono::milliseconds runtime) -: 1165: { 7: 1166: for(std::string group_name : groups) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1167: { 18: 1168: std::unique_ptr timer = make_timer(group_name + " initialization"); 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% call 16 returned 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed call 21 never executed -: 1169: 12: 1170: while(timer->under(runtime)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 1171: { 6: 1172: Botan::EC_Group::clear_registered_curve_data(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 1173: timer->run([&]() { Botan::EC_Group group(group_name); }); 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) -: 1174: } -: 1175: 6: 1176: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1177: } 1: 1178: } -: 1179: function _ZN9Botan_CLI5Speed14bench_ecc_multERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 45% 1: 1180: void bench_ecc_mult(const std::vector& groups, const std::chrono::milliseconds runtime) -: 1181: { 7: 1182: for(std::string group_name : groups) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1183: { 12: 1184: const Botan::EC_Group ec_group(group_name); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 0% (fallthrough) branch 5 taken 100% call 6 never executed -: 1185: 18: 1186: std::unique_ptr mult_timer = make_timer(group_name + " Montgomery ladder"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed 18: 1187: std::unique_ptr blinded_mult_timer = make_timer(group_name + " blinded comb"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed 18: 1188: std::unique_ptr blinded_var_mult_timer = make_timer(group_name + " blinded window"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed -: 1189: 6: 1190: const Botan::PointGFp& base_point = ec_group.get_base_point(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1191: 12: 1192: std::vector ws; call 0 returned 100% call 1 never executed -: 1193: 6: 1194: while(mult_timer->under(runtime) && branch 0 taken 100% (fallthrough) branch 1 taken 0% 12: 1195: blinded_mult_timer->under(runtime) && branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 100% (fallthrough) branch 5 taken 0% 6: 1196: blinded_var_mult_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 1197: { 12: 1198: const Botan::BigInt scalar(rng(), ec_group.get_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) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) -: 1199: 18: 1200: const Botan::PointGFp r1 = mult_timer->run([&]() { return base_point * scalar; }); 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% call 10 never executed -: 1201: 6: 1202: const Botan::PointGFp r2 = blinded_mult_timer->run( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) function _ZZN9Botan_CLI5Speed14bench_ecc_multERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv called 6 returned 100% blocks executed 100% 18: 1203: [&]() { return ec_group.blinded_base_point_multiply(scalar, rng(), ws); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed call 5 returned 100% call 6 returned 100% -: 1204: 6: 1205: const Botan::PointGFp r3 = blinded_var_mult_timer->run( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) function _ZZN9Botan_CLI5Speed14bench_ecc_multERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE1_clEv called 6 returned 100% blocks executed 100% 18: 1206: [&]() { return ec_group.blinded_var_point_multiply(base_point, scalar, rng(), ws); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed call 5 returned 100% call 6 returned 100% -: 1207: 6*: 1208: BOTAN_ASSERT_EQUAL(r1, r2, "Same point computed by Montgomery and comb"); 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 6*: 1209: BOTAN_ASSERT_EQUAL(r1, r3, "Same point computed by Montgomery and window"); 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 -: 1210: } -: 1211: 6: 1212: record_result(mult_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1213: record_result(blinded_mult_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1214: record_result(blinded_var_mult_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1215: } 1: 1216: } -: 1217: function _ZN9Botan_CLI5Speed12bench_os2ecpERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 46% 1: 1218: void bench_os2ecp(const std::vector& groups, const std::chrono::milliseconds runtime) -: 1219: { 3: 1220: std::unique_ptr uncmp_timer = make_timer("OS2ECP uncompressed"); 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% call 16 returned 100% call 17 never executed call 18 never executed 3: 1221: std::unique_ptr cmp_timer = make_timer("OS2ECP compressed"); 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% call 16 returned 100% call 17 never executed -: 1222: 7: 1223: for(std::string group_name : groups) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1224: { 12: 1225: const Botan::EC_Group ec_group(group_name); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 0% (fallthrough) branch 5 taken 100% call 6 never executed -: 1226: 7: 1227: while(uncmp_timer->under(runtime) && cmp_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 14% (fallthrough) branch 3 taken 86% -: 1228: { 2: 1229: const Botan::BigInt k(rng(), 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) 2: 1230: const Botan::PointGFp p = ec_group.get_base_point() * k; 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 never executed 2: 1231: const std::vector os_cmp = p.encode(Botan::PointGFp::COMPRESSED); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 2: 1232: const std::vector os_uncmp = p.encode(Botan::PointGFp::UNCOMPRESSED); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1233: function _ZZN9Botan_CLI5Speed12bench_os2ecpERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv.isra.0 called 1 returned 100% blocks executed 100% 2: 1234: uncmp_timer->run([&]() { ec_group.OS2ECP(os_uncmp); }); call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) function _ZZN9Botan_CLI5Speed12bench_os2ecpERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv.isra.0 called 1 returned 100% blocks executed 100% 2: 1235: cmp_timer->run([&]() { ec_group.OS2ECP(os_cmp); }); call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1236: } -: 1237: 6: 1238: record_result(uncmp_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1239: record_result(cmp_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1240: } 1: 1241: } -: 1242: -: 1243:#endif -: 1244: -: 1245:#if defined(BOTAN_HAS_FPE_FE1) -: 1246: function _ZN9Botan_CLI5Speed13bench_fpe_fe1ENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 47% 1: 1247: void bench_fpe_fe1(const std::chrono::milliseconds runtime) -: 1248: { 1: 1249: const Botan::BigInt n = 1000000000000000; call 0 returned 100% -: 1250: 3: 1251: std::unique_ptr enc_timer = make_timer("FPE_FE1 encrypt"); 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% call 16 returned 100% branch 17 taken 100% (fallthrough) branch 18 taken 0% call 19 never executed 2: 1252: std::unique_ptr dec_timer = make_timer("FPE_FE1 decrypt"); 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% call 16 never executed -: 1253: 2: 1254: const Botan::SymmetricKey key(rng(), 32); 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% 2: 1255: const std::vector tweak(8); // 8 zeros 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 -: 1256: 2: 1257: Botan::BigInt x = 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1258: 2: 1259: Botan::FPE_FE1 fpe_fe1(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% call 9 never executed 1: 1260: fpe_fe1.set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1261: 3: 1262: while(enc_timer->under(runtime)) branch 0 taken 33% (fallthrough) branch 1 taken 67% -: 1263: { 2: 1264: enc_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 1265: x = fpe_fe1.encrypt(x, tweak.data(), tweak.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 2: 1266: enc_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1267: } -: 1268: 3: 1269: for(size_t i = 0; i != enc_timer->events(); ++i) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 1270: { 2: 1271: dec_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 1272: x = fpe_fe1.decrypt(x, tweak.data(), tweak.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 2: 1273: dec_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1274: } -: 1275: 1*: 1276: BOTAN_ASSERT(x == 1, "FPE works"); 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 -: 1277: 1: 1278: record_result(enc_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1279: record_result(dec_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1280: } -: 1281:#endif -: 1282: -: 1283:#if defined(BOTAN_HAS_RFC3394_KEYWRAP) -: 1284: function _ZN9Botan_CLI5Speed13bench_rfc3394ENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 46% 1: 1285: void bench_rfc3394(const std::chrono::milliseconds runtime) -: 1286: { 3: 1287: std::unique_ptr wrap_timer = make_timer("RFC3394 AES-256 key wrap"); 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% call 16 returned 100% call 17 never executed call 18 never executed 2: 1288: std::unique_ptr unwrap_timer = make_timer("RFC3394 AES-256 key unwrap"); 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% call 16 never executed -: 1289: 2: 1290: const Botan::SymmetricKey kek(rng(), 32); 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% 2: 1291: Botan::secure_vector key(64, 0); 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 -: 1292: 8: 1293: while(wrap_timer->under(runtime)) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 1294: { 7: 1295: wrap_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 14: 1296: key = Botan::rfc3394_keywrap(key, kek); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 7: 1297: wrap_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1298: 7: 1299: unwrap_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 14: 1300: key = Botan::rfc3394_keyunwrap(key, kek); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 7: 1301: unwrap_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1302: 7: 1303: key[0] += 1; -: 1304: } -: 1305: 1: 1306: record_result(wrap_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1307: record_result(unwrap_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1308: } -: 1309:#endif -: 1310: -: 1311:#if defined(BOTAN_HAS_BIGINT) -: 1312: function _ZN9Botan_CLI5Speed12bench_mp_mulENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 43% 1: 1313: void bench_mp_mul(const std::chrono::milliseconds runtime) -: 1314: { 1: 1315: std::chrono::milliseconds runtime_per_size = runtime; 10: 1316: for(size_t bits : { 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096 }) branch 0 taken 90% (fallthrough) branch 1 taken 10% -: 1317: { 36: 1318: std::unique_ptr mul_timer = make_timer("BigInt mul " + std::to_string(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 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% branch 16 taken 0% (fallthrough) branch 17 taken 100% call 18 returned 100% branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed call 23 never executed 27: 1319: std::unique_ptr sqr_timer = make_timer("BigInt sqr " + std::to_string(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 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% branch 16 taken 0% (fallthrough) branch 17 taken 100% branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed call 22 never executed -: 1320: 18: 1321: const Botan::BigInt y(rng(), 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 returned 100% 18: 1322: Botan::secure_vector ws; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 1323: 4381: 1324: while(mul_timer->under(runtime_per_size)) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 1325: { 8744: 1326: Botan::BigInt x(rng(), 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) -: 1327: 4372: 1328: sqr_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4372: 1329: x.square(ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4372: 1330: sqr_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1331: 4372: 1332: x.mask_bits(bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1333: 4372: 1334: mul_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4372: 1335: x.mul(y, ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4372: 1336: mul_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1337: } -: 1338: 9: 1339: record_result(mul_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 9: 1340: record_result(sqr_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1341: } -: 1342: 1: 1343: } -: 1344: function _ZN9Botan_CLI5Speed12bench_mp_divENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 44% 1: 1345: void bench_mp_div(const std::chrono::milliseconds runtime) -: 1346: { 1: 1347: std::chrono::milliseconds runtime_per_size = runtime; -: 1348: 10: 1349: for(size_t n_bits : { 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096 }) branch 0 taken 90% (fallthrough) branch 1 taken 10% -: 1350: { 9: 1351: const size_t q_bits = n_bits / 2; 27: 1352: const std::string bit_descr = std::to_string(n_bits) + "/" + std::to_string(q_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 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% branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed -: 1353: 27: 1354: std::unique_ptr div_timer = make_timer("BigInt div " + bit_descr); 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% call 16 returned 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed call 21 never executed 18: 1355: std::unique_ptr ct_div_timer = make_timer("BigInt ct_div " + bit_descr); 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% branch 16 never executed branch 17 never executed call 18 never executed -: 1356: 18: 1357: Botan::BigInt y; call 0 returned 100% 9: 1358: Botan::BigInt x; branch 0 taken 100% (fallthrough) branch 1 taken 0% 9: 1359: Botan::secure_vector ws; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 1360: 45: 1361: Botan::BigInt q1, r1, q2, r2; branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 1362: 46: 1363: while(ct_div_timer->under(runtime_per_size)) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 1364: { 37: 1365: x.randomize(rng(), n_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) 37: 1366: y.randomize(rng(), q_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) -: 1367: 37: 1368: div_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 37: 1369: Botan::vartime_divide(x, y, q1, r1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 37: 1370: div_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1371: 37: 1372: ct_div_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 37: 1373: Botan::ct_divide(x, y, q2, r2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 37: 1374: ct_div_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1375: 37*: 1376: BOTAN_ASSERT_EQUAL(q1, q2, "Quotient ok"); 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 37*: 1377: BOTAN_ASSERT_EQUAL(r1, r2, "Remainder ok"); 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 never executed -: 1378: } -: 1379: 9: 1380: record_result(div_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 9: 1381: record_result(ct_div_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1382: } 1: 1383: } -: 1384: function _ZN9Botan_CLI5Speed14bench_mp_div10ENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 46% 1: 1385: void bench_mp_div10(const std::chrono::milliseconds runtime) -: 1386: { 1: 1387: std::chrono::milliseconds runtime_per_size = runtime; -: 1388: 10: 1389: for(size_t n_bits : { 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096 }) branch 0 taken 90% (fallthrough) branch 1 taken 10% -: 1390: { 18: 1391: const std::string bit_descr = std::to_string(n_bits) + "/10"; 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) -: 1392: 27: 1393: std::unique_ptr div_timer = make_timer("BigInt div " + bit_descr); 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% call 16 returned 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed call 21 never executed 18: 1394: std::unique_ptr ct_div_timer = make_timer("BigInt ct_div " + bit_descr); 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% branch 16 never executed branch 17 never executed call 18 never executed -: 1395: 18: 1396: Botan::BigInt x; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 9: 1397: Botan::secure_vector ws; branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 never executed branch 3 never executed -: 1398: 18: 1399: const Botan::BigInt ten(10); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 36: 1400: Botan::BigInt q1, r1, q2; branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 100% (fallthrough) branch 5 taken 0% 278: 1401: uint8_t r2; -: 1402: 278: 1403: while(ct_div_timer->under(runtime_per_size)) branch 0 taken 97% (fallthrough) branch 1 taken 3% -: 1404: { 269: 1405: x.randomize(rng(), n_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) -: 1406: 269: 1407: div_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 269: 1408: Botan::vartime_divide(x, ten, q1, r1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 269: 1409: div_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1410: 269: 1411: ct_div_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 269: 1412: Botan::ct_divide_u8(x, 10, q2, r2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 269: 1413: ct_div_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1414: 269*: 1415: BOTAN_ASSERT_EQUAL(q1, q2, "Quotient ok"); 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 269*: 1416: BOTAN_ASSERT_EQUAL(r1, r2, "Remainder ok"); 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 never executed -: 1417: } -: 1418: 9: 1419: record_result(div_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 9: 1420: record_result(ct_div_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1421: } 1: 1422: } -: 1423: -: 1424:#endif -: 1425: -: 1426:#if defined(BOTAN_HAS_DL_GROUP) -: 1427: function _ZN9Botan_CLI5Speed12bench_modexpENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 44% 1: 1428: void bench_modexp(const std::chrono::milliseconds runtime) -: 1429: { 6: 1430: for(size_t group_bits : { 1024, 1536, 2048, 3072, 4096 }) branch 0 taken 83% (fallthrough) branch 1 taken 17% -: 1431: { 10: 1432: const std::string group_bits_str = std::to_string(group_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 10: 1433: const Botan::DL_Group group("modp/srp/" + group_bits_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) branch 6 taken 0% (fallthrough) branch 7 taken 100% branch 8 never executed branch 9 never executed -: 1434: 5: 1435: const size_t e_bits = Botan::dl_exponent_size(group_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 1436: const size_t f_bits = group_bits - 1; -: 1437: 10: 1438: const Botan::BigInt random_e(rng(), e_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% 10: 1439: const Botan::BigInt random_f(rng(), f_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% -: 1440: 15: 1441: std::unique_ptr e_timer = make_timer(group_bits_str + " short exponent"); 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% call 16 returned 100% branch 17 taken 100% (fallthrough) branch 18 taken 0% branch 19 never executed branch 20 never executed call 21 never executed 15: 1442: std::unique_ptr f_timer = make_timer(group_bits_str + " full exponent"); 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed -: 1443: 10: 1444: while(f_timer->under(runtime)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 1445: { function _ZZN9Botan_CLI5Speed12bench_modexpENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv.isra.0 called 5 returned 100% blocks executed 100% 10: 1446: e_timer->run([&]() { group.power_g_p(random_e); }); 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) function _ZZN9Botan_CLI5Speed12bench_modexpENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv.isra.0 called 5 returned 100% blocks executed 100% 10: 1447: f_timer->run([&]() { group.power_g_p(random_f); }); 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) -: 1448: } -: 1449: 5: 1450: record_result(e_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 1451: record_result(f_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1452: } 1: 1453: } -: 1454:#endif -: 1455: -: 1456:#if defined(BOTAN_HAS_NUMBERTHEORY) function _ZN9Botan_CLI5Speed16bench_nistp_redcENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 43% 1: 1457: void bench_nistp_redc(const std::chrono::milliseconds runtime) -: 1458: { 1: 1459: Botan::secure_vector ws; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1460: 3: 1461: std::unique_ptr p192_timer = make_timer("P-192 redc"); 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% call 18 never executed 2: 1462: Botan::BigInt r192(rng(), 192*2 - 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% 2703: 1463: while(p192_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 1464: { 5404: 1465: Botan::BigInt r = r192; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5404: 1466: p192_timer->run([&]() { Botan::redc_p192(r, ws); }); 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) 2702: 1467: r192 += 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1468: } 1: 1469: record_result(p192_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1470: 3: 1471: std::unique_ptr p224_timer = make_timer("P-224 redc"); 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% call 18 never executed 2: 1472: Botan::BigInt r224(rng(), 224*2 - 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% 2337: 1473: while(p224_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 1474: { 4672: 1475: Botan::BigInt r = r224; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4672: 1476: p224_timer->run([&]() { Botan::redc_p224(r, ws); }); 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) 2336: 1477: r224 += 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1478: } 1: 1479: record_result(p224_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1480: 3: 1481: std::unique_ptr p256_timer = make_timer("P-256 redc"); 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% call 18 never executed 2: 1482: Botan::BigInt r256(rng(), 256*2 - 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% 2591: 1483: while(p256_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 1484: { 5180: 1485: Botan::BigInt r = r256; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5180: 1486: p256_timer->run([&]() { Botan::redc_p256(r, ws); }); 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) 2590: 1487: r256 += 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1488: } 1: 1489: record_result(p256_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1490: 3: 1491: std::unique_ptr p384_timer = make_timer("P-384 redc"); 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% call 18 never executed 2: 1492: Botan::BigInt r384(rng(), 384*2 - 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% 2417: 1493: while(p384_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 1494: { 4832: 1495: Botan::BigInt r = r384; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4832: 1496: p384_timer->run([&]() { Botan::redc_p384(r384, ws); }); 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) 2416: 1497: r384 += 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1498: } 1: 1499: record_result(p384_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1500: 3: 1501: std::unique_ptr p521_timer = make_timer("P-521 redc"); 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% call 18 never executed 2: 1502: Botan::BigInt r521(rng(), 521*2 - 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% 1504: 1503: while(p521_timer->under(runtime)) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 1504: { 3006: 1505: Botan::BigInt r = r521; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3006: 1506: p521_timer->run([&]() { Botan::redc_p521(r521, ws); }); 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) 1503: 1507: r521 += 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1508: } 1: 1509: record_result(p521_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 1510: } -: 1511: function _ZN9Botan_CLI5Speed13bench_bn_redcENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 42% 1: 1512: void bench_bn_redc(const std::chrono::milliseconds runtime) -: 1513: { 5: 1514: for(size_t bitsize : { 512, 1024, 2048, 4096 }) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 1515: { 8: 1516: Botan::BigInt p(rng(), bitsize); 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) -: 1517: 8: 1518: std::string bit_str = std::to_string(bitsize); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 12: 1519: std::unique_ptr barrett_timer = make_timer("Barrett-" + bit_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 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% call 16 returned 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed call 21 never executed 12: 1520: std::unique_ptr schoolbook_timer = make_timer("Schoolbook-" + bit_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 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% call 16 returned 100% branch 17 never executed branch 18 never executed call 19 never executed -: 1521: 8: 1522: Botan::Modular_Reducer mod_p(p); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 1523: 50: 1524: while(schoolbook_timer->under(runtime)) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 1525: { 92: 1526: const Botan::BigInt x(rng(), p.bits() * 2 - 2); 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) -: 1527: 46: 1528: const Botan::BigInt r1 = barrett_timer->run( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 138: 1529: [&] { return mod_p.reduce(x); }); 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% 46: 1530: const Botan::BigInt r2 = schoolbook_timer->run( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 138: 1531: [&] { return x % 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% -: 1532: 46*: 1533: BOTAN_ASSERT(r1 == r2, "Computed different results"); 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 -: 1534: } -: 1535: 4: 1536: record_result(barrett_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 1537: record_result(schoolbook_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1538: } 1: 1539: } -: 1540: function _ZN9Botan_CLI5Speed17bench_inverse_modENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 51% 1: 1541: void bench_inverse_mod(const std::chrono::milliseconds runtime) -: 1542: { 6: 1543: for(size_t bits : { 256, 384, 512, 1024, 2048 }) branch 0 taken 83% (fallthrough) branch 1 taken 17% -: 1544: { 10: 1545: const std::string bit_str = std::to_string(bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1546: 15: 1547: std::unique_ptr timer = make_timer("inverse_mod-" + bit_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 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% call 16 returned 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed call 21 never executed -: 1548: 15: 1549: while(timer->under(runtime)) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 1550: { 20: 1551: const Botan::BigInt x(rng(), bits - 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) 20: 1552: Botan::BigInt mod(rng(), 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% -: 1553: 10: 1554: const Botan::BigInt x_inv = timer->run( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 30: 1555: [&] { return Botan::inverse_mod(x, mod); }); 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% -: 1556: 10: 1557: if(x_inv == 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 30% (fallthrough) branch 4 taken 70% -: 1558: { 6: 1559: const Botan::BigInt g = gcd(x, mod); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3*: 1560: BOTAN_ASSERT(g != 1, "Inversion only fails if gcd(x, mod) > 1"); 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 -: 1561: } -: 1562: else -: 1563: { 14: 1564: const Botan::BigInt check = (x_inv*x) % mod; 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 7*: 1565: BOTAN_ASSERT_EQUAL(check, 1, "Const time inversion correct"); 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 -: 1566: } -: 1567: } -: 1568: 5: 1569: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1570: } 1: 1571: } -: 1572: function _ZN9Botan_CLI5Speed21bench_primality_testsENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 37% 1: 1573: void bench_primality_tests(const std::chrono::milliseconds runtime) -: 1574: { 4: 1575: for(size_t bits : { 256, 512, 1024 }) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 1576: { 12: 1577: std::unique_ptr mr_timer = make_timer("Miller-Rabin-" + std::to_string(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 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% branch 16 taken 0% (fallthrough) branch 17 taken 100% call 18 returned 100% branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed call 23 never executed 12: 1578: std::unique_ptr bpsw_timer = make_timer("Bailie-PSW-" + std::to_string(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 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% branch 16 taken 0% (fallthrough) branch 17 taken 100% call 18 returned 100% branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed call 23 never executed 9: 1579: std::unique_ptr lucas_timer = make_timer("Lucas-" + std::to_string(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 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% branch 16 taken 0% (fallthrough) branch 17 taken 100% branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed -: 1580: 9: 1581: Botan::BigInt n = Botan::random_prime(rng(), 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 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% call 10 never executed -: 1582: 6: 1583: while(lucas_timer->under(runtime)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 1584: { 3: 1585: Botan::Modular_Reducer mod_n(n); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 1586: function _ZZN9Botan_CLI5Speed21bench_primality_testsENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 3 returned 100% blocks executed 100% 3: 1587: mr_timer->run([&]() { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 1588: return Botan::is_miller_rabin_probable_prime(n, mod_n, rng(), 2); }); call 0 returned 100% call 1 returned 100% -: 1589: 3: 1590: bpsw_timer->run([&]() { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 1591: return Botan::is_bailie_psw_probable_prime(n, mod_n); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1592: 3: 1593: lucas_timer->run([&]() { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 1594: return Botan::is_lucas_probable_prime(n, mod_n); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1595: 3: 1596: n += 2; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 1597: } -: 1598: 3: 1599: record_result(mr_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 1600: record_result(bpsw_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 1601: record_result(lucas_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1602: } 1: 1603: } -: 1604: function _ZN9Botan_CLI5Speed18bench_random_primeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 37% 1: 1605: void bench_random_prime(const std::chrono::milliseconds runtime) -: 1606: { 1: 1607: const size_t coprime = 65537; // simulates RSA key gen -: 1608: 7: 1609: for(size_t bits : { 256, 384, 512, 768, 1024, 1536 }) branch 0 taken 86% (fallthrough) branch 1 taken 14% -: 1610: { 18: 1611: std::unique_ptr genprime_timer = make_timer("random_prime " + std::to_string(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 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 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 taken 0% (fallthrough) branch 20 taken 100% call 21 returned 100% branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed call 26 never executed 18: 1612: std::unique_ptr gensafe_timer = make_timer("random_safe_prime " + std::to_string(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 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 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 taken 0% (fallthrough) branch 20 taken 100% call 21 returned 100% branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed call 26 never executed 18: 1613: std::unique_ptr is_prime_timer = make_timer("is_prime " + std::to_string(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 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 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 taken 0% (fallthrough) branch 20 taken 100% call 21 returned 100% branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed call 26 never executed -: 1614: 12: 1615: while(gensafe_timer->under(runtime)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 1616: { function _ZZN9Botan_CLI5Speed18bench_random_primeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 6 returned 100% blocks executed 73% 6: 1617: const Botan::BigInt p = genprime_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1618: { 12: 1619: return Botan::random_prime(rng(), bits, coprime); 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) 12: 1620: }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1621: function _ZZN9Botan_CLI5Speed18bench_random_primeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv.isra.0 called 6 returned 100% blocks executed 100% 12: 1622: if(!is_prime_timer->run([&] { return Botan::is_prime(p, rng(), 64, true); })) 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 0% (fallthrough) branch 6 taken 100% -: 1623: { #####: 1624: error_output() << "Generated prime " << p << " which failed a primality test"; 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 -: 1625: } -: 1626: 6: 1627: const Botan::BigInt sg = gensafe_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1628: { 6: 1629: return Botan::random_safe_prime(rng(), 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) 12: 1630: }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1631: function _ZZN9Botan_CLI5Speed18bench_random_primeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE2_clEv.isra.0 called 6 returned 100% blocks executed 100% 12: 1632: if(!is_prime_timer->run([&] { return Botan::is_prime(sg, rng(), 64, true); })) 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 0% (fallthrough) branch 6 taken 100% -: 1633: { #####: 1634: error_output() << "Generated safe prime " << sg << " which failed a primality test"; 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 -: 1635: } -: 1636: function _ZZN9Botan_CLI5Speed18bench_random_primeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE3_clEv called 6 returned 100% blocks executed 73% 18: 1637: if(!is_prime_timer->run([&] { return Botan::is_prime(sg / 2, rng(), 64, true); })) 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 returned 100% call 6 returned 100% call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) branch 10 taken 100% (fallthrough) branch 11 taken 0% -: 1638: { #####: 1639: error_output() << "Generated prime " << sg/2 << " which failed a primality test"; 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 -: 1640: } -: 1641: -: 1642: // Now test p+2, p+4, ... which may or may not be prime 198: 1643: for(size_t i = 2; i <= 64; i += 2) branch 0 taken 97% (fallthrough) branch 1 taken 3% -: 1644: { function _ZZN9Botan_CLI5Speed18bench_random_primeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE4_clEv called 192 returned 100% blocks executed 73% 576: 1645: is_prime_timer->run([&]() { Botan::is_prime(p + i, rng(), 64, true); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) -: 1646: } -: 1647: } -: 1648: 6: 1649: record_result(genprime_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1650: record_result(gensafe_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1651: record_result(is_prime_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1652: } 1: 1653: } -: 1654:#endif -: 1655: -: 1656:#if defined(BOTAN_HAS_PUBLIC_KEY_CRYPTO) function _ZN9Botan_CLI5Speed12bench_pk_encERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 4 returned 100% blocks executed 48% 4: 1657: void bench_pk_enc( -: 1658: const Botan::Private_Key& key, -: 1659: const std::string& nm, -: 1660: const std::string& provider, -: 1661: const std::string& padding, -: 1662: std::chrono::milliseconds msec) -: 1663: { 8: 1664: std::vector plaintext, ciphertext; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1665: 8: 1666: Botan::PK_Encryptor_EME enc(key, rng(), padding, provider); 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% call 9 never executed 8: 1667: Botan::PK_Decryptor_EME dec(key, rng(), padding, provider); 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 -: 1668: 16: 1669: std::unique_ptr enc_timer = make_timer(nm + " " + padding, provider, "encrypt"); 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 0% (fallthrough) branch 12 taken 100% branch 13 taken 0% (fallthrough) branch 14 taken 100% call 15 returned 100% branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed call 20 never executed 16: 1670: std::unique_ptr dec_timer = make_timer(nm + " " + padding, provider, "decrypt"); 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 0% (fallthrough) branch 12 taken 100% branch 13 taken 0% (fallthrough) branch 14 taken 100% call 15 returned 100% branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed call 20 never executed -: 1671: 8: 1672: while(enc_timer->under(msec) || dec_timer->under(msec)) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 1673: { -: 1674: // Generate a new random ciphertext to decrypt 4*: 1675: if(ciphertext.empty() || enc_timer->under(msec)) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed -: 1676: { 4: 1677: rng().random_vec(plaintext, enc.maximum_input_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) function _ZZN9Botan_CLI5Speed12bench_pk_encERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 4 returned 100% blocks executed 100% 12: 1678: ciphertext = enc_timer->run([&]() { return enc.encrypt(plaintext, rng()); }); 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 returned 100% call 6 returned 100% -: 1679: } -: 1680: 4: 1681: if(dec_timer->under(msec)) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 1682: { 16: 1683: const auto dec_pt = dec_timer->run([&]() { return dec.decrypt(ciphertext); }); 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) -: 1684: 12: 1685: if(!(dec_pt == plaintext)) // sanity check 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 taken 0% (fallthrough) branch 14 taken 100% branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed -: 1686: { #####: 1687: error_output() << "Bad roundtrip in PK encrypt/decrypt bench\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 -: 1688: } -: 1689: } -: 1690: } -: 1691: 4: 1692: record_result(enc_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 1693: record_result(dec_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 1694: } -: 1695: function _ZN9Botan_CLI5Speed11bench_pk_kaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_S8_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 14 returned 100% blocks executed 48% 14: 1696: void bench_pk_ka(const std::string& algo, -: 1697: const std::string& nm, -: 1698: const std::string& params, -: 1699: const std::string& provider, -: 1700: std::chrono::milliseconds msec) -: 1701: { 14: 1702: const std::string kdf = "KDF2(SHA-256)"; // arbitrary choice call 0 returned 100% -: 1703: 42: 1704: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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% call 7 never executed -: 1705: function _ZZN9Botan_CLI5Speed11bench_pk_kaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_S8_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 14 returned 100% blocks executed 50% 14: 1706: std::unique_ptr key1(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1707: { 28: 1708: return Botan::create_private_key(algo, rng(), params); 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) 28: 1709: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% function _ZZN9Botan_CLI5Speed11bench_pk_kaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_S8_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv called 14 returned 100% blocks executed 50% 14: 1710: std::unique_ptr key2(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1711: { 28: 1712: return Botan::create_private_key(algo, rng(), params); 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) 28: 1713: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1714: 14: 1715: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1716: 14*: 1717: const Botan::PK_Key_Agreement_Key& ka_key1 = dynamic_cast(*key1); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 never executed 14*: 1718: const Botan::PK_Key_Agreement_Key& ka_key2 = dynamic_cast(*key2); branch 0 taken 100% branch 1 taken 0% call 2 never executed -: 1719: 28: 1720: Botan::PK_Key_Agreement ka1(ka_key1, rng(), kdf, provider); 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% call 9 never executed 14: 1721: Botan::PK_Key_Agreement ka2(ka_key2, rng(), kdf, provider); 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 -: 1722: 28: 1723: const std::vector ka1_pub = ka_key1.public_value(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 28: 1724: const std::vector ka2_pub = ka_key2.public_value(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1725: 42: 1726: std::unique_ptr ka_timer = make_timer(nm, provider, "key agreements"); 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 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% call 8 never executed -: 1727: 32: 1728: while(ka_timer->under(msec)) branch 0 taken 56% (fallthrough) branch 1 taken 44% -: 1729: { function _ZZN9Botan_CLI5Speed11bench_pk_kaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_S8_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE1_clEv called 18 returned 100% blocks executed 45% 54: 1730: Botan::SymmetricKey symkey1 = ka_timer->run([&]() { return ka1.derive_key(32, ka2_pub); }); 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% function _ZZN9Botan_CLI5Speed11bench_pk_kaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_S8_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE2_clEv called 18 returned 100% blocks executed 45% 54: 1731: Botan::SymmetricKey symkey2 = ka_timer->run([&]() { return ka2.derive_key(32, ka1_pub); }); 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% 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 0% (fallthrough) branch 12 taken 100% -: 1732: 18: 1733: if(symkey1 != symkey2) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 1734: { #####: 1735: error_output() << "Key agreement mismatch in PK bench\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 -: 1736: } -: 1737: } -: 1738: 14: 1739: record_result(ka_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 14: 1740: } -: 1741: function _ZN9Botan_CLI5Speed12bench_pk_kemERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 5 returned 100% blocks executed 54% 5: 1742: void bench_pk_kem(const Botan::Private_Key& key, -: 1743: const std::string& nm, -: 1744: const std::string& provider, -: 1745: const std::string& kdf, -: 1746: std::chrono::milliseconds msec) -: 1747: { 10: 1748: Botan::PK_KEM_Decryptor dec(key, rng(), kdf, provider); call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 never executed 10: 1749: Botan::PK_KEM_Encryptor enc(key, rng(), kdf, provider); 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 -: 1750: 15: 1751: std::unique_ptr kem_enc_timer = make_timer(nm, provider, "KEM encrypt"); 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 returned 100% call 6 never executed 15: 1752: std::unique_ptr kem_dec_timer = make_timer(nm, provider, "KEM decrypt"); 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 returned 100% call 6 never executed -: 1753: 10: 1754: while(kem_enc_timer->under(msec) && kem_dec_timer->under(msec)) branch 0 taken 70% (fallthrough) branch 1 taken 30% branch 2 taken 71% (fallthrough) branch 3 taken 29% -: 1755: { 15: 1756: Botan::secure_vector encap_key, enc_shared_key; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 10: 1757: Botan::secure_vector salt = rng().random_vec(16); 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% -: 1758: 5: 1759: kem_enc_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 1760: enc.encrypt(encap_key, enc_shared_key, 64, rng(), salt); 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) 5: 1761: kem_enc_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1762: 5: 1763: kem_dec_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 10: 1764: Botan::secure_vector dec_shared_key = dec.decrypt(encap_key, 64, salt); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 5: 1765: kem_dec_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1766: 5: 1767: if(enc_shared_key != dec_shared_key) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 1768: { #####: 1769: error_output() << "KEM mismatch in PK bench\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 -: 1770: } -: 1771: } -: 1772: 5: 1773: record_result(kem_enc_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 1774: record_result(kem_dec_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5: 1775: } -: 1776: function _ZN9Botan_CLI5Speed16bench_pk_sig_eccERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_RKSt6vectorIS6_SaIS6_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 6 returned 100% blocks executed 47% 6: 1777: void bench_pk_sig_ecc(const std::string& algo, -: 1778: const std::string& emsa, -: 1779: const std::string& provider, -: 1780: const std::vector& params, -: 1781: std::chrono::milliseconds msec) -: 1782: { 32: 1783: for(std::string grp : params) branch 0 taken 81% (fallthrough) branch 1 taken 19% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1784: { 52: 1785: const std::string nm = grp.empty() ? algo : (algo + "-" + grp); branch 0 taken 4% (fallthrough) branch 1 taken 96% 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) branch 8 taken 0% (fallthrough) branch 9 taken 100% 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 -: 1786: 78: 1787: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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 85% (fallthrough) branch 6 taken 15% call 7 never executed -: 1788: function _ZZN9Botan_CLI5Speed16bench_pk_sig_eccERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_RKSt6vectorIS6_SaIS6_EENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 26 returned 100% blocks executed 50% 26: 1789: std::unique_ptr key(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1790: { 52: 1791: return Botan::create_private_key(algo, rng(), grp); 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) 52: 1792: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 1793: 26: 1794: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 26: 1795: bench_pk_sig(*key, nm, provider, emsa, msec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1796: } 6: 1797: } -: 1798: function _ZN9Botan_CLI5Speed12bench_pk_sigERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 34 returned 100% blocks executed 52% 34: 1799: size_t bench_pk_sig(const Botan::Private_Key& key, -: 1800: const std::string& nm, -: 1801: const std::string& provider, -: 1802: const std::string& padding, -: 1803: std::chrono::milliseconds msec) -: 1804: { 102: 1805: std::vector message, signature, bad_signature; 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% -: 1806: 68: 1807: Botan::PK_Signer sig(key, rng(), padding, Botan::IEEE_1363, provider); 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% call 9 never executed 68: 1808: Botan::PK_Verifier ver(key, padding, Botan::IEEE_1363, provider); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 1809: 135: 1810: std::unique_ptr sig_timer = make_timer(nm + " " + padding, provider, "sign"); 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 97% (fallthrough) branch 10 taken 3% branch 11 taken 0% (fallthrough) branch 12 taken 100% branch 13 taken 0% (fallthrough) branch 14 taken 100% call 15 returned 100% branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed call 20 never executed 101: 1811: std::unique_ptr ver_timer = make_timer(nm + " " + padding, provider, "verify"); 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 97% (fallthrough) branch 10 taken 3% branch 11 taken 0% (fallthrough) branch 12 taken 100% branch 13 taken 0% (fallthrough) branch 14 taken 100% branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed call 19 never executed -: 1812: 34: 1813: size_t invalid_sigs = 0; -: 1814: 109: 1815: while(ver_timer->under(msec) || sig_timer->under(msec)) branch 0 taken 43% (fallthrough) branch 1 taken 57% branch 2 taken 28% (fallthrough) branch 3 taken 72% -: 1816: { 75: 1817: if(signature.empty() || sig_timer->under(msec)) branch 0 taken 55% branch 1 taken 45% branch 2 taken 34% (fallthrough) branch 3 taken 66% -: 1818: { -: 1819: /* -: 1820: Length here is kind of arbitrary, but 48 bytes fits into a single -: 1821: hash block so minimizes hashing overhead versus the PK op itself. -: 1822: */ 48: 1823: rng().random_vec(message, 48); 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) -: 1824: function _ZZN9Botan_CLI5Speed12bench_pk_sigERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 48 returned 100% blocks executed 100% 144: 1825: signature = sig_timer->run([&]() { return sig.sign_message(message, rng()); }); 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 returned 100% call 6 returned 100% -: 1826: 48: 1827: bad_signature = signature; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 48: 1828: bad_signature[rng().next_byte() % bad_signature.size()] ^= rng().next_nonzero_byte(); 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) -: 1829: } -: 1830: 75: 1831: if(ver_timer->under(msec)) branch 0 taken 17% (fallthrough) branch 1 taken 83% -: 1832: { function _ZZN9Botan_CLI5Speed12bench_pk_sigERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv called 62 returned 100% blocks executed 100% 62: 1833: const bool verified = ver_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1834: { 62: 1835: return ver.verify_message(message, signature); call 0 returned 100% -: 1836: }); -: 1837: 62: 1838: if(!verified) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 1839: { #####: 1840: invalid_sigs += 1; -: 1841: } -: 1842: function _ZZN9Botan_CLI5Speed12bench_pk_sigERKN5Botan11Private_KeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_SC_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE1_clEv called 62 returned 100% blocks executed 100% 62: 1843: const bool verified_bad = ver_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1844: { 62: 1845: return ver.verify_message(message, bad_signature); call 0 returned 100% -: 1846: }); -: 1847: 62: 1848: if(verified_bad) branch 0 taken 100% branch 1 taken 0% (fallthrough) -: 1849: { #####: 1850: error_output() << "Bad signature accepted in PK signature bench\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 -: 1851: } -: 1852: } -: 1853: } -: 1854: 34: 1855: if(invalid_sigs > 0) branch 0 taken 0% branch 1 taken 100% #####: 1856: error_output() << invalid_sigs << " generated signatures rejected in PK signature bench\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 branch 7 never executed branch 8 never executed -: 1857: 34: 1858: const size_t events = static_cast(std::min(sig_timer->events(), ver_timer->events())); branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 1859: 34: 1860: record_result(sig_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 34: 1861: record_result(ver_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1862: 68: 1863: return events; call 0 returned 100% -: 1864: } -: 1865:#endif -: 1866: -: 1867:#if defined(BOTAN_HAS_RSA) function _ZN9Botan_CLI5Speed16bench_rsa_keygenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 48% 1: 1868: void bench_rsa_keygen(const std::string& provider, -: 1869: std::chrono::milliseconds msec) -: 1870: { 5: 1871: for(size_t keylen : { 1024, 2048, 3072, 4096 }) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 1872: { 8: 1873: const std::string nm = "RSA-" + std::to_string(keylen); 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) 12: 1874: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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 returned 100% branch 6 taken 0% (fallthrough) branch 7 taken 100% call 8 never executed -: 1875: 8: 1876: while(keygen_timer->under(msec)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 1877: { function _ZZN9Botan_CLI5Speed16bench_rsa_keygenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 4 returned 100% blocks executed 34% 4: 1878: std::unique_ptr key(keygen_timer->run([&] { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 1879: return Botan::create_private_key("RSA", rng(), std::to_string(keylen)); 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) branch 15 taken 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed 8: 1880: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1881: 4*: 1882: BOTAN_ASSERT(key->check_key(rng(), true), "Key is ok"); 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 -: 1883: } -: 1884: 4: 1885: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1886: } 1: 1887: } -: 1888: function _ZN9Botan_CLI5Speed9bench_rsaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 43% 1: 1889: void bench_rsa(const std::string& provider, -: 1890: std::chrono::milliseconds msec) -: 1891: { 5: 1892: for(size_t keylen : { 1024, 2048, 3072, 4096 }) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 1893: { 8: 1894: const std::string nm = "RSA-" + std::to_string(keylen); 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) -: 1895: 12: 1896: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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% call 7 never executed -: 1897: function _ZZN9Botan_CLI5Speed9bench_rsaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 4 returned 100% blocks executed 34% 4: 1898: std::unique_ptr key(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1899: { 8: 1900: return Botan::create_private_key("RSA", rng(), std::to_string(keylen)); 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) branch 15 taken 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 never executed branch 20 never executed 8: 1901: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 1902: 4: 1903: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1904: -: 1905: // Using PKCS #1 padding so OpenSSL provider can play along 8: 1906: bench_pk_sig(*key, nm, provider, "EMSA-PKCS1-v1_5(SHA-256)", msec); 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% -: 1907: -: 1908: //bench_pk_sig(*key, nm, provider, "PSSR(SHA-256)", msec); -: 1909: //bench_pk_enc(*key, nm, provider, "EME-PKCS1-v1_5", msec); -: 1910: //bench_pk_enc(*key, nm, provider, "OAEP(SHA-1)", msec); -: 1911: } 1: 1912: } -: 1913:#endif -: 1914: -: 1915:#if defined(BOTAN_HAS_ECDSA) function _ZN9Botan_CLI5Speed11bench_ecdsaERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 35% 1: 1916: void bench_ecdsa(const std::vector& groups, -: 1917: const std::string& provider, -: 1918: std::chrono::milliseconds msec) -: 1919: { 2: 1920: return bench_pk_sig_ecc("ECDSA", "EMSA1(SHA-256)", provider, groups, msec); 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% -: 1921: } -: 1922: function _ZN9Botan_CLI5Speed20bench_ecdsa_recoveryERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 45% 1: 1923: void bench_ecdsa_recovery(const std::vector& groups, -: 1924: const std::string&, -: 1925: std::chrono::milliseconds msec) -: 1926: { 7: 1927: for(std::string group_name : groups) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 1928: { 12: 1929: Botan::EC_Group group(group_name); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 0% (fallthrough) branch 5 taken 100% call 6 never executed 18: 1930: std::unique_ptr recovery_timer = make_timer("ECDSA recovery " + group_name); 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% call 16 returned 100% branch 17 never executed branch 18 never executed -: 1931: 12: 1932: while(recovery_timer->under(msec)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 1933: { 6: 1934: Botan::ECDSA_PrivateKey key(rng(), 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) call 9 never executed call 10 never executed -: 1935: 12: 1936: std::vector message(group.get_order_bits() / 8); 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% 6: 1937: rng().randomize(message.data(), message.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) -: 1938: 18: 1939: Botan::PK_Signer signer(key, rng(), "Raw"); 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 100% (fallthrough) branch 15 taken 0% call 16 never executed 6: 1940: signer.update(message); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 1941: std::vector signature = signer.signature(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% -: 1942: 18: 1943: Botan::PK_Verifier verifier(key, "Raw", Botan::IEEE_1363, "base"); 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% call 13 never executed 6: 1944: verifier.update(message); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6*: 1945: BOTAN_ASSERT(verifier.check_signature(signature), "Valid signature"); 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 -: 1946: 12: 1947: Botan::BigInt r(signature.data(), signature.size()/2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 12: 1948: Botan::BigInt s(signature.data() + signature.size()/2, signature.size()/2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 1949: 6: 1950: const uint8_t v = key.recovery_param(message, r, s); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1951: function _ZZN9Botan_CLI5Speed20bench_ecdsa_recoveryERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 6 returned 100% blocks executed 75% 6: 1952: recovery_timer->run([&]() { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 1953: Botan::ECDSA_PublicKey pubkey(group, message, r, s, v); call 0 returned 100% 6*: 1954: BOTAN_ASSERT(pubkey.public_point() == key.public_point(), "Recovered public key"); 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 6: 1955: }); -: 1956: } -: 1957: 6: 1958: record_result(recovery_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 1959: } -: 1960: 1: 1961: } -: 1962: -: 1963:#endif -: 1964: -: 1965:#if defined(BOTAN_HAS_ECKCDSA) function _ZN9Botan_CLI5Speed13bench_eckcdsaERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 35% 1: 1966: void bench_eckcdsa(const std::vector& groups, -: 1967: const std::string& provider, -: 1968: std::chrono::milliseconds msec) -: 1969: { 2: 1970: return bench_pk_sig_ecc("ECKCDSA", "EMSA1(SHA-256)", provider, groups, msec); 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% -: 1971: } -: 1972:#endif -: 1973: -: 1974:#if defined(BOTAN_HAS_GOST_34_10_2001) function _ZN9Botan_CLI5Speed15bench_gost_3410ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 41% 1: 1975: void bench_gost_3410(const std::string& provider, -: 1976: std::chrono::milliseconds msec) -: 1977: { 4: 1978: return bench_pk_sig_ecc("GOST-34.10", "EMSA1(GOST-34.11)", provider, {"gost_256A"}, msec); 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) branch 15 taken 100% (fallthrough) branch 16 taken 0% call 17 returned 100% branch 18 taken 50% (fallthrough) branch 19 taken 50% branch 20 taken 0% (fallthrough) branch 21 taken 100% call 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed -: 1979: } -: 1980:#endif -: 1981: -: 1982:#if defined(BOTAN_HAS_SM2) function _ZN9Botan_CLI5Speed9bench_sm2ERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 35% 1: 1983: void bench_sm2(const std::vector& groups, -: 1984: const std::string& provider, -: 1985: std::chrono::milliseconds msec) -: 1986: { 2: 1987: return bench_pk_sig_ecc("SM2_Sig", "SM3", provider, groups, msec); 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% -: 1988: } -: 1989:#endif -: 1990: -: 1991:#if defined(BOTAN_HAS_ECGDSA) function _ZN9Botan_CLI5Speed12bench_ecgdsaERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 35% 1: 1992: void bench_ecgdsa(const std::vector& groups, -: 1993: const std::string& provider, -: 1994: std::chrono::milliseconds msec) -: 1995: { 2: 1996: return bench_pk_sig_ecc("ECGDSA", "EMSA1(SHA-256)", provider, groups, msec); 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% -: 1997: } -: 1998:#endif -: 1999: -: 2000:#if defined(BOTAN_HAS_ED25519) function _ZN9Botan_CLI5Speed13bench_ed25519ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 36% 1: 2001: void bench_ed25519(const std::string& provider, -: 2002: std::chrono::milliseconds msec) -: 2003: { 3: 2004: return bench_pk_sig_ecc("Ed25519", "Pure", provider, std::vector{""}, msec); 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) branch 15 taken 0% (fallthrough) branch 16 taken 100% call 17 returned 100% branch 18 taken 50% (fallthrough) branch 19 taken 50% branch 20 taken 0% (fallthrough) branch 21 taken 100% call 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed -: 2005: } -: 2006:#endif -: 2007: -: 2008:#if defined(BOTAN_HAS_DIFFIE_HELLMAN) function _ZN9Botan_CLI5Speed8bench_dhERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 35% 1: 2009: void bench_dh(const std::string& provider, -: 2010: std::chrono::milliseconds msec) -: 2011: { 8: 2012: for(size_t bits : { 1024, 1536, 2048, 3072, 4096, 6144, 8192 }) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 2013: { 21: 2014: bench_pk_ka("DH", 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% 14: 2015: "DH-" + std::to_string(bits), 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% branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed 14: 2016: "modp/ietf/" + std::to_string(bits), 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 -: 2017: provider, msec); -: 2018: } 1: 2019: } -: 2020:#endif -: 2021: -: 2022:#if defined(BOTAN_HAS_DSA) function _ZN9Botan_CLI5Speed9bench_dsaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 38% 1: 2023: void bench_dsa(const std::string& provider, std::chrono::milliseconds msec) -: 2024: { 4: 2025: for(size_t bits : { 1024, 2048, 3072 }) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 2026: { 6: 2027: const std::string nm = "DSA-" + std::to_string(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) -: 2028: 3: 2029: const std::string params = 10: 2030: (bits == 1024) ? "dsa/jce/1024" : ("dsa/botan/" + std::to_string(bits)); 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) 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 -: 2031: 9: 2032: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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% call 7 never executed -: 2033: function _ZZN9Botan_CLI5Speed9bench_dsaERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 3 returned 100% blocks executed 38% 3: 2034: std::unique_ptr key(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2035: { 6: 2036: return Botan::create_private_key("DSA", rng(), params); 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% 6: 2037: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 2038: 3: 2039: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2040: 6: 2041: bench_pk_sig(*key, nm, provider, "EMSA1(SHA-256)", msec); 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% -: 2042: } 1: 2043: } -: 2044:#endif -: 2045: -: 2046:#if defined(BOTAN_HAS_ELGAMAL) function _ZN9Botan_CLI5Speed13bench_elgamalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 36% 1: 2047: void bench_elgamal(const std::string& provider, std::chrono::milliseconds msec) -: 2048: { 5: 2049: for(size_t keylen : { 1024, 2048, 3072, 4096 }) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 2050: { 8: 2051: const std::string nm = "ElGamal-" + std::to_string(keylen); 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) -: 2052: 8: 2053: const std::string params = "modp/ietf/" + std::to_string(keylen); 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 -: 2054: 12: 2055: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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% call 7 never executed -: 2056: function _ZZN9Botan_CLI5Speed13bench_elgamalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 4 returned 100% blocks executed 38% 4: 2057: std::unique_ptr key(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2058: { 8: 2059: return Botan::create_private_key("ElGamal", rng(), params); 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% 8: 2060: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 2061: 4: 2062: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2063: 8: 2064: bench_pk_enc(*key, nm, provider, "EME-PKCS1-v1_5", msec); 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% -: 2065: } 1: 2066: } -: 2067:#endif -: 2068: -: 2069:#if defined(BOTAN_HAS_ECDH) function _ZN9Botan_CLI5Speed10bench_ecdhERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS7_NSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 47% 1: 2070: void bench_ecdh(const std::vector& groups, -: 2071: const std::string& provider, -: 2072: std::chrono::milliseconds msec) -: 2073: { 7: 2074: for(std::string grp : groups) branch 0 taken 86% (fallthrough) branch 1 taken 14% call 2 returned 100% -: 2075: { 15: 2076: bench_pk_ka("ECDH", "ECDH-" + grp, grp, provider, msec); 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 50% (fallthrough) branch 10 taken 50% branch 11 taken 0% (fallthrough) branch 12 taken 100% branch 13 never executed branch 14 never executed -: 2077: } 1: 2078: } -: 2079:#endif -: 2080: -: 2081:#if defined(BOTAN_HAS_CURVE_25519) function _ZN9Botan_CLI5Speed16bench_curve25519ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 31% 1: 2082: void bench_curve25519(const std::string& provider, -: 2083: std::chrono::milliseconds msec) -: 2084: { 2: 2085: bench_pk_ka("Curve25519", "Curve25519", "", provider, msec); 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% 1: 2086: } -: 2087:#endif -: 2088: -: 2089:#if defined(BOTAN_HAS_MCELIECE) function _ZN9Botan_CLI5Speed14bench_mcelieceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 37% 1: 2090: void bench_mceliece(const std::string& provider, -: 2091: std::chrono::milliseconds msec) -: 2092: { -: 2093: /* -: 2094: SL=80 n=1632 t=33 - 59 KB pubkey 140 KB privkey -: 2095: SL=107 n=2480 t=45 - 128 KB pubkey 300 KB privkey -: 2096: SL=128 n=2960 t=57 - 195 KB pubkey 459 KB privkey -: 2097: SL=147 n=3408 t=67 - 265 KB pubkey 622 KB privkey -: 2098: SL=191 n=4624 t=95 - 516 KB pubkey 1234 KB privkey -: 2099: SL=256 n=6624 t=115 - 942 KB pubkey 2184 KB privkey -: 2100: */ -: 2101: 1: 2102: const std::vector> mce_params = -: 2103: { -: 2104: { 2480, 45 }, -: 2105: { 2960, 57 }, -: 2106: { 3408, 67 }, -: 2107: { 4624, 95 }, -: 2108: { 6624, 115 } 1: 2109: }; call 0 returned 100% -: 2110: 6: 2111: for(auto params : mce_params) branch 0 taken 83% (fallthrough) branch 1 taken 17% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 2112: { 5: 2113: size_t n = params.first; 5: 2114: size_t t = params.second; -: 2115: 10: 2116: const std::string nm = "McEliece-" + std::to_string(n) + "," + std::to_string(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% 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 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 taken 0% (fallthrough) branch 20 taken 100% branch 21 taken 0% (fallthrough) branch 22 taken 100% branch 23 taken 0% (fallthrough) branch 24 taken 100% branch 25 taken 0% (fallthrough) branch 26 taken 100% 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 20: 2117: " (WF=" + std::to_string(Botan::mceliece_work_factor(n, 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% 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 0% (fallthrough) branch 16 taken 100% branch 17 never executed branch 18 never executed -: 2118: 15: 2119: std::unique_ptr keygen_timer = make_timer(nm, provider, "keygen"); 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 100% (fallthrough) branch 6 taken 0% call 7 never executed -: 2120: function _ZZN9Botan_CLI5Speed14bench_mcelieceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 5 returned 100% blocks executed 83% 5: 2121: std::unique_ptr key(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2122: { 5: 2123: return new Botan::McEliece_PrivateKey(rng(), n, t); call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 never executed 10: 2124: })); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 2125: 5: 2126: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 10: 2127: bench_pk_kem(*key, nm, provider, "KDF2(SHA-256)", msec); 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% -: 2128: } 1: 2129: } -: 2130:#endif -: 2131: -: 2132:#if defined(BOTAN_HAS_XMSS_RFC8391) function _ZN9Botan_CLI5Speed10bench_xmssERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 44% 1: 2133: void bench_xmss(const std::string& provider, -: 2134: std::chrono::milliseconds msec) -: 2135: { -: 2136: /* -: 2137: We only test H10 signatures here since already they are quite slow (a -: 2138: few seconds per signature). On a fast machine, H16 signatures take 1-2 -: 2139: minutes to generate and H20 signatures take 5-10 minutes to generate -: 2140: */ 1: 2141: std::vector xmss_params -: 2142: { -: 2143: "XMSS-SHA2_10_256", -: 2144: "XMSS-SHAKE_10_256", -: 2145: "XMSS-SHA2_10_512", -: 2146: "XMSS-SHAKE_10_512", 6: 2147: }; 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% (throw) branch 14 taken 100% (fallthrough) branch 15 taken 80% (fallthrough) branch 16 taken 20% call 17 returned 100% branch 18 never executed branch 19 never executed call 20 never executed -: 2148: 1*: 2149: for(std::string params : xmss_params) branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 2150: { 2*: 2151: std::unique_ptr keygen_timer = make_timer(params, provider, "keygen"); 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 call 7 never executed -: 2152: function _ZZN9Botan_CLI5Speed10bench_xmssERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 1 returned 100% blocks executed 38% 1: 2153: std::unique_ptr key(keygen_timer->run([&] call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2154: { 2: 2155: return Botan::create_private_key("XMSS", rng(), params); 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% 1*: 2156: })); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 2157: 1: 2158: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 2159: if(bench_pk_sig(*key, params, provider, "", msec) == 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) branch 6 taken 0% (fallthrough) branch 7 taken 100% branch 8 taken 0% (fallthrough) branch 9 taken 100% -: 2160: break; -: 2161: } 1: 2162: } -: 2163:#endif -: 2164: -: 2165:#if defined(BOTAN_HAS_ZFEC) function _ZN9Botan_CLI5Speed10bench_zfecENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 39% 1: 2166: void bench_zfec(std::chrono::milliseconds msec) -: 2167: { 1: 2168: const size_t k = 4; 1: 2169: const size_t n = 16; -: 2170: 1: 2171: Botan::ZFEC zfec(k, n); call 0 returned 100% -: 2172: 1: 2173: const size_t share_size = 256 * 1024; -: 2174: 2: 2175: std::vector input(share_size * k); 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: 2176: rng().randomize(input.data(), input.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) -: 2177: 2: 2178: std::vector output(share_size * n); 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 -: 2179: 17: 2180: auto enc_fn = [&](size_t share, const uint8_t buf[], size_t len) -: 2181: { 16: 2182: std::memcpy(&output[share*share_size], buf, len); 1: 2183: }; -: 2184: 1: 2185: auto enc_timer = make_timer("zfec " + branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed 3: 2186: std::to_string(k) + "/" + 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 taken 0% (fallthrough) branch 14 taken 100% branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed 2: 2187: std::to_string(n), 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 -: 2188: input.size(), 4: 2189: "encode", "", input.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 taken 0% (fallthrough) branch 13 taken 100% call 14 returned 100% branch 15 taken 100% (fallthrough) branch 16 taken 0% call 17 never executed -: 2190: function _ZZN9Botan_CLI5Speed10bench_zfecENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE0_clEv called 1 returned 100% blocks executed 71% 1: 2191: enc_timer->run_until_elapsed(msec, [&]() { 1: 2192: zfec.encode(input.data(), input.size(), enc_fn); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 2193: }); -: 2194: 1: 2195: record_result(enc_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2196: 1: 2197: auto dec_timer = make_timer("zfec " + branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed 3: 2198: std::to_string(k) + "/" + 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 taken 0% (fallthrough) branch 14 taken 100% branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed 2: 2199: std::to_string(n), 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 -: 2200: input.size(), 3: 2201: "decode", "", input.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 taken 0% (fallthrough) branch 13 taken 100% call 14 never executed -: 2202: 2: 2203: std::map shares; call 0 returned 100% 17: 2204: for(size_t i = 0; i != n; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 2205: { 16: 2206: shares[i] = &output[share_size * i]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2207: } -: 2208: -: 2209: // remove data shares to make decoding maximally expensive: 13: 2210: while(shares.size() != k) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 2211: { 12: 2212: shares.erase(shares.begin()); call 0 returned 100% -: 2213: } -: 2214: 2: 2215: std::vector recovered(share_size * k); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 2216: 5: 2217: auto dec_fn = [&](size_t share, const uint8_t buf[], size_t len) -: 2218: { 4: 2219: std::memcpy(&recovered[share * share_size], buf, len); 1: 2220: }; -: 2221: function _ZZN9Botan_CLI5Speed10bench_zfecENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE2_clEv called 1 returned 100% blocks executed 71% 1: 2222: dec_timer->run_until_elapsed(msec, [&]() { 1: 2223: zfec.decode_shares(shares, share_size, dec_fn); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 2224: }); -: 2225: 1: 2226: record_result(dec_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2227: 1: 2228: if(recovered != input) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 2229: { #####: 2230: error_output() << "ZFEC recovery failed\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 -: 2231: } 1: 2232: } -: 2233: -: 2234:#endif -: 2235: -: 2236:#if defined(BOTAN_HAS_POLY_DBL) function _ZN9Botan_CLI5Speed14bench_poly_dblENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 42% 1: 2237: void bench_poly_dbl(std::chrono::milliseconds msec) -: 2238: { 7: 2239: for(size_t sz : { 8, 16, 24, 32, 64, 128 }) branch 0 taken 86% (fallthrough) branch 1 taken 14% -: 2240: { 18: 2241: std::unique_ptr be_timer = make_timer("poly_dbl_be_" + std::to_string(sz)); 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) 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% call 21 returned 100% branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed call 26 never executed 12: 2242: std::unique_ptr le_timer = make_timer("poly_dbl_le_" + std::to_string(sz)); 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) 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% branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed -: 2243: 12: 2244: std::vector buf(sz); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 6: 2245: rng().randomize(buf.data(), sz); 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) -: 2246: 14815: 2247: be_timer->run_until_elapsed(msec, [&]() { Botan::poly_double_n(buf.data(), buf.data(), sz); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 20728: 2248: le_timer->run_until_elapsed(msec, [&]() { Botan::poly_double_n_le(buf.data(), buf.data(), sz); }); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2249: 6: 2250: record_result(be_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 2251: record_result(le_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2252: } 1: 2253: } -: 2254:#endif -: 2255: -: 2256:#if defined(BOTAN_HAS_BCRYPT) -: 2257: function _ZN9Botan_CLI5Speed12bench_bcryptEv called 1 returned 100% blocks executed 40% 1: 2258: void bench_bcrypt() -: 2259: { 1: 2260: const std::string password = "not a very good password"; call 0 returned 100% -: 2261: 12: 2262: for(uint8_t work_factor = 4; work_factor <= 14; ++work_factor) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 2263: { 33: 2264: std::unique_ptr timer = make_timer("bcrypt wf=" + std::to_string(work_factor)); 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) 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% call 21 returned 100% branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed call 26 never executed -: 2265: function _ZZN9Botan_CLI5Speed12bench_bcryptEvENKUlvE_clEv called 11 returned 100% blocks executed 100% 11: 2266: timer->run([&] { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 11: 2267: Botan::generate_bcrypt(password, rng(), work_factor); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% 11: 2268: }); -: 2269: 11: 2270: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2271: } 1: 2272: } -: 2273:#endif -: 2274: -: 2275:#if defined(BOTAN_HAS_PASSHASH9) -: 2276: function _ZN9Botan_CLI5Speed15bench_passhash9Ev called 1 returned 100% blocks executed 42% 1: 2277: void bench_passhash9() -: 2278: { 1: 2279: const std::string password = "not a very good password"; call 0 returned 100% -: 2280: 6: 2281: for(uint8_t alg = 0; alg <= 4; ++alg) branch 0 taken 83% (fallthrough) branch 1 taken 17% -: 2282: { 5*: 2283: if(Botan::is_passhash9_alg_supported(alg) == false) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% #####: 2284: continue; -: 2285: 15: 2286: for(auto work_factor : { 10, 15 }) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 2287: { 20: 2288: std::unique_ptr timer = make_timer("passhash9 alg=" + std::to_string(alg) + 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 0% (fallthrough) branch 9 taken 100% 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 branch 16 never executed branch 17 never executed 50: 2289: " wf=" + std::to_string(work_factor)); 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) branch 18 taken 0% (fallthrough) branch 19 taken 100% branch 20 taken 0% (fallthrough) branch 21 taken 100% branch 22 taken 0% (fallthrough) branch 23 taken 100% call 24 returned 100% branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed call 29 never executed -: 2290: function _ZZN9Botan_CLI5Speed15bench_passhash9EvENKUlvE_clEv called 10 returned 100% blocks executed 100% 10: 2291: timer->run([&] { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 10: 2292: Botan::generate_passhash9(password, rng(), static_cast(work_factor), alg); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% 10: 2293: }); -: 2294: 10: 2295: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2296: } -: 2297: } 1: 2298: } -: 2299:#endif -: 2300: -: 2301:#if defined(BOTAN_HAS_SCRYPT) -: 2302: function _ZN9Botan_CLI5Speed12bench_scryptERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 37% 1: 2303: void bench_scrypt(const std::string& /*provider*/, -: 2304: std::chrono::milliseconds msec) -: 2305: { -: 2306: 5: 2307: for(size_t N : { 8192, 16384, 32768, 65536 }) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 2308: { 16: 2309: for(size_t r : { 1, 8, 16 }) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 2310: { 12*: 2311: for(size_t p : { 1, 4 }) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 2312: { 12: 2313: std::unique_ptr scrypt_timer = make_timer( 24: 2314: "scrypt-" + std::to_string(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 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 0% (fallthrough) branch 12 taken 100% branch 13 taken 0% (fallthrough) branch 14 taken 100% branch 15 taken 0% (fallthrough) branch 16 taken 100% 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 48: 2315: std::to_string(r) + "-" + std::to_string(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) 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 0% (fallthrough) branch 16 taken 100% branch 17 taken 0% (fallthrough) branch 18 taken 100% branch 19 taken 0% (fallthrough) branch 20 taken 100% branch 21 taken 0% (fallthrough) branch 22 taken 100% branch 23 taken 0% (fallthrough) branch 24 taken 100% 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 48*: 2316: " (" + std::to_string(Botan::scrypt_memory_usage(N, r, p) / (1024*1024)) + " MiB)"); 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 0% (fallthrough) branch 22 taken 100% 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% call 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 -: 2317: 12: 2318: uint8_t out[64]; 12: 2319: uint8_t salt[8]; 12: 2320: rng().randomize(salt, sizeof(salt)); 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) -: 2321: 24: 2322: while(scrypt_timer->under(msec)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 2323: { function _ZZN9Botan_CLI5Speed12bench_scryptERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 12 returned 100% blocks executed 50% 12: 2324: scrypt_timer->run([&] { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 24: 2325: Botan::scrypt(out, sizeof(out), "password", call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 12: 2326: salt, sizeof(salt), N, r, p); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 2327: }); -: 2328: } -: 2329: 12: 2330: record_result(scrypt_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2331: 12: 2332: if(scrypt_timer->events() == 1) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 2333: break; -: 2334: } -: 2335: } -: 2336: } -: 2337: 1: 2338: } -: 2339: -: 2340:#endif -: 2341: -: 2342:#if defined(BOTAN_HAS_ARGON2) -: 2343: function _ZN9Botan_CLI5Speed12bench_argon2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 40% 1: 2344: void bench_argon2(const std::string& /*provider*/, -: 2345: std::chrono::milliseconds msec) -: 2346: { 1: 2347: const uint8_t mode = 2; // Argon2id -: 2348: 4: 2349: for(size_t M : { 8*1024, 64*1024, 256*1024 }) branch 0 taken 75% (fallthrough) branch 1 taken 25% -: 2350: { 9: 2351: for(size_t t : { 1, 4 }) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 2352: { 18: 2353: for(size_t p : { 1, 4 }) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 2354: { 12: 2355: std::unique_ptr timer = make_timer( 36: 2356: "Argon2id M=" + std::to_string(M) + " t=" + std::to_string(t) + " p=" + std::to_string(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) 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) 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) branch 33 taken 0% (fallthrough) branch 34 taken 100% branch 35 taken 0% (fallthrough) branch 36 taken 100% branch 37 taken 0% (fallthrough) branch 38 taken 100% branch 39 taken 0% (fallthrough) branch 40 taken 100% branch 41 taken 0% (fallthrough) branch 42 taken 100% branch 43 taken 0% (fallthrough) branch 44 taken 100% branch 45 taken 0% (fallthrough) branch 46 taken 100% branch 47 taken 0% (fallthrough) branch 48 taken 100% branch 49 taken 0% (fallthrough) branch 50 taken 100% call 51 returned 100% 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 branch 66 never executed branch 67 never executed call 68 never executed -: 2357: 12: 2358: uint8_t out[64]; 12: 2359: uint8_t salt[16]; 12: 2360: rng().randomize(salt, sizeof(salt)); 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) -: 2361: 24: 2362: while(timer->under(msec)) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 2363: { function _ZZN9Botan_CLI5Speed12bench_argon2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEENKUlvE_clEv called 12 returned 100% blocks executed 100% 12: 2364: timer->run([&] { call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 2365: Botan::argon2(out, sizeof(out), "password", 8, 12: 2366: salt, sizeof(salt), nullptr, 0, nullptr, 0, 12: 2367: mode, p, M, t); call 0 returned 100% 12: 2368: }); -: 2369: } -: 2370: 12: 2371: record_result(timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2372: } -: 2373: } -: 2374: } 1: 2375: } -: 2376: -: 2377:#endif -: 2378: -: 2379:#if defined(BOTAN_HAS_NEWHOPE) && defined(BOTAN_HAS_CHACHA_RNG) function _ZN9Botan_CLI5Speed13bench_newhopeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE called 1 returned 100% blocks executed 44% 1: 2380: void bench_newhope(const std::string& /*provider*/, -: 2381: std::chrono::milliseconds msec) -: 2382: { 1: 2383: const std::string nm = "NEWHOPE"; call 0 returned 100% -: 2384: 3: 2385: std::unique_ptr keygen_timer = make_timer(nm, "", "keygen"); 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 0% (fallthrough) branch 9 taken 100% call 10 returned 100% branch 11 taken 0% (fallthrough) branch 12 taken 100% call 13 never executed 3: 2386: std::unique_ptr shareda_timer = make_timer(nm, "", "shareda"); 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 0% (fallthrough) branch 9 taken 100% call 10 returned 100% call 11 never executed 3: 2387: std::unique_ptr sharedb_timer = make_timer(nm, "", "sharedb"); 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 0% (fallthrough) branch 9 taken 100% call 10 returned 100% call 11 never executed -: 2388: 3: 2389: Botan::ChaCha_RNG nh_rng(Botan::secure_vector(32)); 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% -: 2390: 3: 2391: while(sharedb_timer->under(msec)) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 2392: { 6: 2393: std::vector send_a(Botan::NEWHOPE_SENDABYTES), send_b(Botan::NEWHOPE_SENDBBYTES); 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 call 10 never executed 6: 2394: std::vector shared_a(32), shared_b(32); 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 100% (fallthrough) branch 9 taken 0% branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed -: 2395: 2: 2396: Botan::newhope_poly sk_a; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% call 3 never executed -: 2397: 2: 2398: keygen_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 2399: Botan::newhope_keygen(send_a.data(), &sk_a, nh_rng); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 2400: keygen_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2401: 2: 2402: sharedb_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 2403: Botan::newhope_sharedb(shared_b.data(), send_b.data(), send_a.data(), nh_rng); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 2404: sharedb_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2405: 2: 2406: shareda_timer->start(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 2407: Botan::newhope_shareda(shared_a.data(), &sk_a, send_b.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 2408: shareda_timer->stop(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 2409: 2*: 2410: BOTAN_ASSERT(shared_a == shared_b, "Same derived key"); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 2411: } -: 2412: 1: 2413: record_result(keygen_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 2414: record_result(shareda_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 2415: record_result(sharedb_timer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 2416: } -: 2417:#endif -: 2418: -: 2419: }; -: 2420: function _ZNK9Botan_CLIUlvE_clEv.isra.0 called 35 returned 100% blocks executed 83% 35: 2421:BOTAN_REGISTER_COMMAND("speed", Speed); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 2422: -: 2423:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#rotate.h.gcov -: 0:Source:build/include/botan/rotate.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash_sha2_64_sha2_64_bmi2.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash_sha2_64_sha2_64_bmi2.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Word Rotation Operations -: 3:* (C) 1999-2008,2017 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_WORD_ROTATE_H_ -: 9:#define BOTAN_WORD_ROTATE_H_ -: 10: -: 11:#include -: 12: -: 13:BOTAN_FUTURE_INTERNAL_HEADER(rotate.h) -: 14: -: 15:namespace Botan { -: 16: -: 17:/** -: 18:* Bit rotation left by a compile-time constant amount -: 19:* @param input the input word -: 20:* @return input rotated left by ROT bits -: 21:*/ -: 22:template -: 23:inline constexpr T rotl(T input) -: 24: { -: 25: static_assert(ROT > 0 && ROT < 8*sizeof(T), "Invalid rotation constant"); -: 26: return static_cast((input << ROT) | (input >> (8*sizeof(T) - ROT))); -: 27: } -: 28: -: 29:/** -: 30:* Bit rotation right by a compile-time constant amount -: 31:* @param input the input word -: 32:* @return input rotated right by ROT bits -: 33:*/ -: 34:template 109403789: 35:inline constexpr T rotr(T input) -: 36: { -: 37: static_assert(ROT > 0 && ROT < 8*sizeof(T), "Invalid rotation constant"); 109403789: 38: return static_cast((input >> ROT) | (input << (8*sizeof(T) - ROT))); -: 39: } -: 40: -: 41:/** -: 42:* Bit rotation left, variable rotation amount -: 43:* @param input the input word -: 44:* @param rot the number of bits to rotate, must be between 0 and sizeof(T)*8-1 -: 45:* @return input rotated left by rot bits -: 46:*/ -: 47:template -: 48:inline T rotl_var(T input, size_t rot) -: 49: { -: 50: return rot ? static_cast((input << rot) | (input >> (sizeof(T)*8 - rot))) : input; -: 51: } -: 52: -: 53:/** -: 54:* Bit rotation right, variable rotation amount -: 55:* @param input the input word -: 56:* @param rot the number of bits to rotate, must be between 0 and sizeof(T)*8-1 -: 57:* @return input rotated right by rot bits -: 58:*/ -: 59:template -: 60:inline T rotr_var(T input, size_t rot) -: 61: { -: 62: return rot ? static_cast((input >> rot) | (input << (sizeof(T)*8 - rot))) : input; -: 63: } -: 64: -: 65:#if defined(BOTAN_USE_GCC_INLINE_ASM) -: 66: -: 67:#if defined(BOTAN_TARGET_ARCH_IS_X86_64) || defined(BOTAN_TARGET_ARCH_IS_X86_32) -: 68: -: 69:template<> -: 70:inline uint32_t rotl_var(uint32_t input, size_t rot) -: 71: { -: 72: asm("roll %1,%0" -: 73: : "+r" (input) -: 74: : "c" (static_cast(rot)) -: 75: : "cc"); -: 76: return input; -: 77: } -: 78: -: 79:template<> -: 80:inline uint32_t rotr_var(uint32_t input, size_t rot) -: 81: { -: 82: asm("rorl %1,%0" -: 83: : "+r" (input) -: 84: : "c" (static_cast(rot)) -: 85: : "cc"); -: 86: return input; -: 87: } -: 88: -: 89:#endif -: 90: -: 91:#endif -: 92: -: 93: -: 94:template -: 95:BOTAN_DEPRECATED("Use rotl or rotl_var") -: 96:inline T rotate_left(T input, size_t rot) -: 97: { -: 98: // rotl_var does not reduce -: 99: return rotl_var(input, rot % (8 * sizeof(T))); -: 100: } -: 101: -: 102:template -: 103:BOTAN_DEPRECATED("Use rotr or rotr_var") -: 104:inline T rotate_right(T input, size_t rot) -: 105: { -: 106: // rotr_var does not reduce -: 107: return rotr_var(input, rot % (8 * sizeof(T))); -: 108: } -: 109: -: 110:} -: 111: -: 112:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#asn1.cpp.gcov -: 0:Source:src/fuzzer/asn1.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/asn1.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/fuzzer/asn1.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2016,2017 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: 735: 11:class ASN1_Parser final : public Botan::ASN1_Formatter call 0 returned 100% -: 12: { -: 13: public: 1883: 14: ASN1_Parser() : Botan::ASN1_Formatter(true, 64) {} -: 15: -: 16: protected: function _ZNK11ASN1_Parser6formatEN5Botan8ASN1_TagES1_mmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 26310 returned 100% blocks executed 100% 26310: 17: std::string format(Botan::ASN1_Tag, Botan::ASN1_Tag, size_t, size_t, -: 18: const std::string&) const override -: 19: { 26310: 20: return ""; call 0 returned 100% -: 21: } -: 22: function _ZNK11ASN1_Parser10format_binB5cxx11EN5Botan8ASN1_TagES1_RKSt6vectorIhSaIhEE called 3232 returned 100% blocks executed 100% 3232: 23: std::string format_bin(Botan::ASN1_Tag, Botan::ASN1_Tag, -: 24: const std::vector&) const override -: 25: { 3232: 26: return ""; call 0 returned 100% -: 27: } -: 28: }; -: 29: function _Z4fuzzPKhm called 1883 returned 100% blocks executed 91% 1883: 30:void fuzz(const uint8_t in[], size_t len) -: 31: { 1883: 32: try -: 33: { -: 34: /* -: 35: * Here we use an uninitialized ofstream so the fuzzer doesn't spend time -: 36: * on actual output formatting, no memory is allocated, etc. -: 37: */ 3031: 38: std::ofstream out; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 1883: 39: ASN1_Parser printer; call 0 returned 100% branch 1 taken 39% (fallthrough) branch 2 taken 61% (throw) call 3 returned 100% 1883: 40: printer.print_to_stream(out, in, len); call 0 returned 100% branch 1 taken 39% (fallthrough) branch 2 taken 61% (throw) -: 41: } 1148: 42: catch(Botan::Exception& e) { } call 0 returned 100% 1883: 43: } <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#asio_async_ops.h.gcov -: 0:Source:build/include/botan/asio_async_ops.h -: 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:* Helpers for TLS ASIO Stream -: 3:* (C) 2018-2020 Jack Lloyd -: 4:* 2018-2020 Hannes Rantzsch, Tim Oesterreich, Rene Meusel -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#ifndef BOTAN_ASIO_ASYNC_OPS_H_ -: 10:#define BOTAN_ASIO_ASYNC_OPS_H_ -: 11: -: 12:#include -: 13: -: 14:#include -: 15:#if BOOST_VERSION >= 106600 -: 16: -: 17:#include -: 18: -: 19:// We need to define BOOST_ASIO_DISABLE_SERIAL_PORT before any asio imports. Otherwise asio will include , -: 20:// which interferes with Botan's amalgamation by defining macros like 'B0' and 'FF1'. -: 21:#define BOOST_ASIO_DISABLE_SERIAL_PORT -: 22:#include -: 23:#include -: 24: -: 25:namespace Botan { -: 26:namespace TLS { -: 27:namespace detail { -: 28: -: 29:/** -: 30: * Base class for asynchronous stream operations. -: 31: * -: 32: * Asynchronous operations, used for example to implement an interface for boost::asio::async_read_some and -: 33: * boost::asio::async_write_some, are based on boost::asio::coroutines. -: 34: * Derived operations should implement a call operator and invoke it with the correct parameters upon construction. The -: 35: * call operator needs to make sure that the user-provided handler is not called directly. Typically, yield / reenter is -: 36: * used for this in the following fashion: -: 37: * -: 38: * ``` -: 39: * void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 40: * { -: 41: * reenter(this) -: 42: * { -: 43: * // operation specific logic, repeatedly interacting with the stream_core and the next_layer (socket) -: 44: * -: 45: * // make sure intermediate initiating function is called -: 46: * if(!isContinuation) -: 47: * { -: 48: * yield next_layer.async_operation(empty_buffer, this); -: 49: * } -: 50: * -: 51: * // call the completion handler -: 52: * complete_now(error_code, bytes_transferred); -: 53: * } -: 54: * } -: 55: * ``` -: 56: * -: 57: * Once the operation is completed and ready to call the completion handler it checks if an intermediate initiating -: 58: * function has been called using the `isContinuation` parameter. If not, it will call an asynchronous operation, such -: 59: * as `async_read_some`, with and empty buffer, set the object itself as the handler, and `yield`. As a result, the call -: 60: * operator will be invoked again, this time as a continuation, and will jump to the location where it yielded before -: 61: * using `reenter`. It is now safe to call the handler function via `complete_now`. -: 62: * -: 63: * \tparam Handler Type of the completion handler -: 64: * \tparam Executor1 Type of the asio executor (usually derived from the lower layer) -: 65: * \tparam Allocator Type of the allocator to be used -: 66: */ -: 67:template 129*: 68:class AsyncBase : public boost::asio::coroutine -: 69: { -: 70: public: -: 71: using allocator_type = boost::asio::associated_allocator_t; -: 72: using executor_type = boost::asio::associated_executor_t; -: 73: 21*: 74: allocator_type get_allocator() const noexcept -: 75: { 21*: 76: return boost::asio::get_associated_allocator(m_handler); 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 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) call 12 returned 100% 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) call 19 returned 100% branch 20 taken 100% (fallthrough) branch 21 taken 0% (throw) call 22 returned 100% branch 23 taken 100% (fallthrough) branch 24 taken 0% (throw) call 25 never executed branch 26 never executed branch 27 never executed call 28 returned 100% branch 29 taken 100% (fallthrough) branch 30 taken 0% (throw) call 31 returned 100% call 32 returned 100% call 33 returned 100% call 34 returned 100% call 35 returned 100% call 36 returned 100% call 37 returned 100% call 38 returned 100% call 39 returned 100% call 40 never executed call 41 returned 100% call 42 returned 100% -: 77: } -: 78: 14*: 79: executor_type get_executor() const noexcept -: 80: { 2*: 81: return boost::asio::get_associated_executor(m_handler, m_work_guard_1.get_executor()); call 0 returned 100% -: 82: } -: 83: -: 84: protected: -: 85: template 15*: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) 3: 87: : m_handler(std::forward(handler)) call 0 returned 100% call 1 returned 100% call 2 returned 100% 15*: 88: , m_work_guard_1(executor) call 0 returned 100% call 1 returned 100% call 2 returned 100% -: 89: { 12*: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISU_EEOT_RKSW_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISU_EEOT_RKSW_ called 2 returned 100% blocks executed 100% 2: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 2: 88: , m_work_guard_1(executor) -: 89: { 2: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISU_EEOT_RKSW_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISU_EEOT_RKSW_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEEC2ISP_EEOT_RKSR_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_19ThrowingMockChannelEEESaIvEEENSC_4asio10io_context13executor_typeESM_EC2ISN_EEOT_RKSQ_: function _ZN5Botan3TLS6detail9AsyncBaseINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_19ThrowingMockChannelEEESaIvEEENSC_4asio10io_context13executor_typeESM_EC2ISN_EEOT_RKSQ_ called 0 returned 0% blocks executed 0% #####: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) #####: 88: , m_work_guard_1(executor) -: 89: { #####: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEENSC_4asio10io_context13executor_typeESM_EC2ISN_EEOT_RKSQ_: function _ZN5Botan3TLS6detail9AsyncBaseINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEENSC_4asio10io_context13executor_typeESM_EC2ISN_EEOT_RKSQ_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEENSC_4asio10io_context13executor_typeESM_EC2ISN_EEOT_RKSQ_: function _ZN5Botan3TLS6detail9AsyncBaseINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEENSC_4asio10io_context13executor_typeESM_EC2ISN_EEOT_RKSQ_ called 1 returned 100% blocks executed 100% 1: 86: AsyncBase(HandlerT&& handler, const Executor1& executor) -: 87: : m_handler(std::forward(handler)) 1: 88: , m_work_guard_1(executor) -: 89: { 1: 90: } ------------------ -: 91: -: 92: /** -: 93: * Call the completion handler. -: 94: * -: 95: * This function should only be called after an intermediate initiating function has been called. -: 96: * -: 97: * @param args Arguments forwarded to the completion handler function. -: 98: */ -: 99: template 13: 100: void complete_now(Args&& ... args) -: 101: { 13: 102: m_work_guard_1.reset(); 13: 103: m_handler(std::forward(args)...); 13: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSQ_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSQ_RmEEEvDpOT_ called 2 returned 100% blocks executed 100% 2: 100: void complete_now(Args&& ... args) -: 101: { 2: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 2: 103: m_handler(std::forward(args)...); call 0 returned 100% 2: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSQ_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSQ_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS4_10io_context13executor_typeESaIvEE12complete_nowIJRSL_RmEEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NSB_4asio10io_context13executor_typeESaIvEE12complete_nowIJRSD_EEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NSB_4asio10io_context13executor_typeESaIvEE12complete_nowIJRSD_EEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NSB_4asio10io_context13executor_typeESaIvEE12complete_nowIJRSD_EEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NSB_4asio10io_context13executor_typeESaIvEE12complete_nowIJRSD_EEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ _ZN5Botan3TLS6detail9AsyncBaseIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NSB_4asio10io_context13executor_typeESaIvEE12complete_nowIJRSD_EEEvDpOT_: function _ZN5Botan3TLS6detail9AsyncBaseIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NSB_4asio10io_context13executor_typeESaIvEE12complete_nowIJRSD_EEEvDpOT_ called 1 returned 100% blocks executed 100% 1: 100: void complete_now(Args&& ... args) -: 101: { 1: 102: m_work_guard_1.reset(); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 103: m_handler(std::forward(args)...); call 0 returned 100% 1: 104: } ------------------ -: 105: -: 106: Handler m_handler; -: 107: boost::asio::executor_work_guard m_work_guard_1; -: 108: }; -: 109: -: 110:template > 15*: 111:class AsyncReadOperation : public AsyncBase branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 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 branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed call 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 call 26 returned 100% call 27 never executed branch 28 taken 0% (fallthrough) branch 29 taken 100% branch 30 never executed branch 31 never executed branch 32 taken 0% (fallthrough) branch 33 taken 100% branch 34 never executed branch 35 never executed branch 36 taken 0% (fallthrough) branch 37 taken 100% branch 38 never executed branch 39 never executed branch 40 taken 0% (fallthrough) branch 41 taken 100% branch 42 taken 100% (fallthrough) branch 43 taken 0% branch 44 never executed branch 45 never executed call 46 returned 100% call 47 never executed branch 48 taken 0% (fallthrough) branch 49 taken 100% branch 50 taken 100% (fallthrough) branch 51 taken 0% branch 52 never executed branch 53 never executed branch 54 taken 0% (fallthrough) branch 55 taken 100% branch 56 taken 100% (fallthrough) branch 57 taken 0% branch 58 never executed branch 59 never executed branch 60 taken 0% (fallthrough) branch 61 taken 100% branch 62 taken 100% (fallthrough) branch 63 taken 0% branch 64 never executed branch 65 never executed branch 66 taken 0% (fallthrough) branch 67 taken 100% branch 68 taken 0% (fallthrough) branch 69 taken 100% branch 70 taken 0% (fallthrough) branch 71 taken 100% call 72 returned 100% branch 73 taken 0% (fallthrough) branch 74 taken 100% -: 112: { -: 113: public: -: 114: /** -: 115: * Construct and invoke an AsyncReadOperation. -: 116: * -: 117: * @param handler Handler function to be called upon completion. -: 118: * @param stream The stream from which the data will be read -: 119: * @param buffers The buffers into which the data will be read. -: 120: * @param ec Optional error code; used to report an error to the handler function. -: 121: */ -: 122: template 5: 123: AsyncReadOperation(HandlerT&& handler, -: 124: Stream& stream, -: 125: const MutableBufferSequence& buffers, -: 126: const boost::system::error_code& ec = {}) -: 127: : AsyncBase( -: 128: std::forward(handler), -: 129: stream.get_executor()) -: 130: , m_stream(stream) -: 131: , m_buffers(buffers) 5: 132: , m_decodedBytes(0) -: 133: { 5: 134: this->operator()(ec, std::size_t(0), false); 5: 135: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_ called 1 returned 100% blocks executed 60% 1: 123: AsyncReadOperation(HandlerT&& handler, -: 124: Stream& stream, -: 125: const MutableBufferSequence& buffers, -: 126: const boost::system::error_code& ec = {}) -: 127: : AsyncBase( -: 128: std::forward(handler), -: 129: stream.get_executor()) -: 130: , m_stream(stream) -: 131: , m_buffers(buffers) 1: 132: , m_decodedBytes(0) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 133: { 1: 134: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 135: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_ called 1 returned 100% blocks executed 60% 1: 123: AsyncReadOperation(HandlerT&& handler, -: 124: Stream& stream, -: 125: const MutableBufferSequence& buffers, -: 126: const boost::system::error_code& ec = {}) -: 127: : AsyncBase( -: 128: std::forward(handler), -: 129: stream.get_executor()) -: 130: , m_stream(stream) -: 131: , m_buffers(buffers) 1: 132: , m_decodedBytes(0) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 133: { 1: 134: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 135: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_ called 1 returned 100% blocks executed 60% 1: 123: AsyncReadOperation(HandlerT&& handler, -: 124: Stream& stream, -: 125: const MutableBufferSequence& buffers, -: 126: const boost::system::error_code& ec = {}) -: 127: : AsyncBase( -: 128: std::forward(handler), -: 129: stream.get_executor()) -: 130: , m_stream(stream) -: 131: , m_buffers(buffers) 1: 132: , m_decodedBytes(0) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 133: { 1: 134: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 135: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS5_16prepared_buffersISA_Lm64EEESaIvEEC2ISU_EEOT_RSY_RKS10_SS_: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS5_16prepared_buffersISA_Lm64EEESaIvEEC2ISU_EEOT_RSY_RKS10_SS_ called 1 returned 100% blocks executed 75% 1: 123: AsyncReadOperation(HandlerT&& handler, -: 124: Stream& stream, -: 125: const MutableBufferSequence& buffers, -: 126: const boost::system::error_code& ec = {}) -: 127: : AsyncBase( -: 128: std::forward(handler), -: 129: stream.get_executor()) -: 130: , m_stream(stream) -: 131: , m_buffers(buffers) 1: 132: , m_decodedBytes(0) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% call 4 never executed -: 133: { 1: 134: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 135: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEC2ISP_EEOT_RST_RKSU_SN_ called 1 returned 100% blocks executed 60% 1: 123: AsyncReadOperation(HandlerT&& handler, -: 124: Stream& stream, -: 125: const MutableBufferSequence& buffers, -: 126: const boost::system::error_code& ec = {}) -: 127: : AsyncBase( -: 128: std::forward(handler), -: 129: stream.get_executor()) -: 130: , m_stream(stream) -: 131: , m_buffers(buffers) 1: 132: , m_decodedBytes(0) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 133: { 1: 134: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 135: } ------------------ -: 136: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS5_16prepared_buffersISA_Lm64EEESaIvEEC2EOS12_ called 6 returned 100% blocks executed 100% 12*: 137: AsyncReadOperation(AsyncReadOperation&&) = default; call 0 never executed call 1 never executed call 2 never executed call 3 never executed call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 never executed call 8 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% (throw) call 11 never executed call 12 returned 100% branch 13 taken 100% (fallthrough) branch 14 taken 0% (throw) call 15 never executed call 16 returned 100% branch 17 taken 100% (fallthrough) branch 18 taken 0% (throw) call 19 never executed call 20 returned 100% branch 21 taken 100% (fallthrough) branch 22 taken 0% (throw) call 23 returned 100% branch 24 taken 100% (fallthrough) branch 25 taken 0% (throw) call 26 returned 100% branch 27 taken 100% (fallthrough) branch 28 taken 0% (throw) call 29 returned 100% branch 30 taken 100% (fallthrough) branch 31 taken 0% (throw) branch 32 taken 100% (fallthrough) branch 33 taken 0% branch 34 taken 100% (fallthrough) branch 35 taken 0% branch 36 taken 100% (fallthrough) branch 37 taken 0% branch 38 taken 100% (fallthrough) branch 39 taken 0% -: 138: 10: 139: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 140: { 21*: 141: reenter(this) -: 142: { 9*: 143: if(bytes_transferred > 0 && !ec) -: 144: { -: 145: // We have received encrypted data from the network, now hand it to TLS::Channel for decryption. 3*: 146: boost::asio::const_buffer read_buffer{m_stream.input_buffer().data(), bytes_transferred}; 6*: 147: m_stream.process_encrypted_data(read_buffer, ec); -: 148: } -: 149: 9: 150: if (m_stream.shutdown_received()) -: 151: { -: 152: // we just received a 'close_notify' from the peer and don't expect any more data 9: 153: ec = boost::asio::error::eof; -: 154: } 9*: 155: else if (ec == boost::asio::error::eof) -: 156: { -: 157: // we did not expect this disconnection from the peer 9: 158: ec = StreamError::StreamTruncated; -: 159: } -: 160: 10: 161: if(!m_stream.has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0) -: 162: { -: 163: // The channel did not decrypt a complete record yet, we need more data from the socket. 4*: 164: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); 4*: 165: return; -: 166: } -: 167: 5*: 168: if(m_stream.has_received_data() && !ec) -: 169: { -: 170: // The channel has decrypted a TLS record, now copy it to the output buffers. 2*: 171: m_decodedBytes = m_stream.copy_received_data(m_buffers); -: 172: } -: 173: 5: 174: if(!isContinuation) -: 175: { -: 176: // Make sure the handler is not called without an intermediate initiating function. -: 177: // "Reading" into a zero-byte buffer will complete immediately. 1*: 178: m_ec = ec; 1*: 179: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); 1*: 180: ec = m_ec; -: 181: } -: 182: 5: 183: this->complete_now(ec, m_decodedBytes); -: 184: } -: 185: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_read_zero_bufferERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb called 2 returned 100% blocks executed 50% 2: 139: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 140: { 5*: 141: reenter(this) branch 0 taken 0% branch 1 taken 50% branch 2 taken 50% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 50% (fallthrough) branch 7 taken 50% -: 142: { 1*: 143: if(bytes_transferred > 0 && !ec) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 144: { -: 145: // We have received encrypted data from the network, now hand it to TLS::Channel for decryption. #####: 146: boost::asio::const_buffer read_buffer{m_stream.input_buffer().data(), bytes_transferred}; call 0 never executed branch 1 never executed branch 2 never executed #####: 147: m_stream.process_encrypted_data(read_buffer, ec); call 0 never executed branch 1 never executed branch 2 never executed -: 148: } -: 149: 1: 150: if (m_stream.shutdown_received()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 151: { -: 152: // we just received a 'close_notify' from the peer and don't expect any more data 1: 153: ec = boost::asio::error::eof; -: 154: } 1*: 155: else if (ec == boost::asio::error::eof) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 156: { -: 157: // we did not expect this disconnection from the peer 1: 158: ec = StreamError::StreamTruncated; -: 159: } -: 160: 1: 161: if(!m_stream.has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 162: { -: 163: // The channel did not decrypt a complete record yet, we need more data from the socket. #####: 164: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); call 0 never executed branch 1 never executed branch 2 never executed #####: 165: return; -: 166: } -: 167: 1*: 168: if(m_stream.has_received_data() && !ec) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed -: 169: { -: 170: // The channel has decrypted a TLS record, now copy it to the output buffers. #####: 171: m_decodedBytes = m_stream.copy_received_data(m_buffers); call 0 never executed -: 172: } -: 173: 1: 174: if(!isContinuation) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 175: { -: 176: // Make sure the handler is not called without an intermediate initiating function. -: 177: // "Reading" into a zero-byte buffer will complete immediately. 1: 178: m_ec = ec; 1: 179: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% branch 4 taken 0% branch 5 never executed branch 6 never executed 1: 180: ec = m_ec; -: 181: } -: 182: 1: 183: this->complete_now(ec, m_decodedBytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 184: } -: 185: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests18ThrowingAsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb called 2 returned 100% blocks executed 52% 2: 139: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 140: { 4*: 141: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 142: { 2: 143: if(bytes_transferred > 0 && !ec) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 144: { -: 145: // We have received encrypted data from the network, now hand it to TLS::Channel for decryption. 1: 146: boost::asio::const_buffer read_buffer{m_stream.input_buffer().data(), bytes_transferred}; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 147: m_stream.process_encrypted_data(read_buffer, ec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 148: } -: 149: 2: 150: if (m_stream.shutdown_received()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 151: { -: 152: // we just received a 'close_notify' from the peer and don't expect any more data 2: 153: ec = boost::asio::error::eof; -: 154: } 2*: 155: else if (ec == boost::asio::error::eof) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 156: { -: 157: // we did not expect this disconnection from the peer 2: 158: ec = StreamError::StreamTruncated; -: 159: } -: 160: 2: 161: if(!m_stream.has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 50% (fallthrough) branch 3 taken 50% branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 162: { -: 163: // The channel did not decrypt a complete record yet, we need more data from the socket. 1: 164: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 165: return; -: 166: } -: 167: 1*: 168: if(m_stream.has_received_data() && !ec) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed -: 169: { -: 170: // The channel has decrypted a TLS record, now copy it to the output buffers. #####: 171: m_decodedBytes = m_stream.copy_received_data(m_buffers); call 0 never executed -: 172: } -: 173: 1: 174: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 175: { -: 176: // Make sure the handler is not called without an intermediate initiating function. -: 177: // "Reading" into a zero-byte buffer will complete immediately. #####: 178: m_ec = ec; #####: 179: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); 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 #####: 180: ec = m_ec; -: 181: } -: 182: 1: 183: this->complete_now(ec, m_decodedBytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 184: } -: 185: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests26test_async_read_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb called 2 returned 100% blocks executed 43% 2: 139: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 140: { 4*: 141: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 142: { 2*: 143: if(bytes_transferred > 0 && !ec) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 144: { -: 145: // We have received encrypted data from the network, now hand it to TLS::Channel for decryption. #####: 146: boost::asio::const_buffer read_buffer{m_stream.input_buffer().data(), bytes_transferred}; call 0 never executed branch 1 never executed branch 2 never executed #####: 147: m_stream.process_encrypted_data(read_buffer, ec); call 0 never executed branch 1 never executed branch 2 never executed -: 148: } -: 149: 2: 150: if (m_stream.shutdown_received()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 151: { -: 152: // we just received a 'close_notify' from the peer and don't expect any more data 2: 153: ec = boost::asio::error::eof; -: 154: } 2*: 155: else if (ec == boost::asio::error::eof) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 156: { -: 157: // we did not expect this disconnection from the peer 2: 158: ec = StreamError::StreamTruncated; -: 159: } -: 160: 2: 161: if(!m_stream.has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 50% (fallthrough) branch 3 taken 50% branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 162: { -: 163: // The channel did not decrypt a complete record yet, we need more data from the socket. 1: 164: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 165: return; -: 166: } -: 167: 1*: 168: if(m_stream.has_received_data() && !ec) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed -: 169: { -: 170: // The channel has decrypted a TLS record, now copy it to the output buffers. #####: 171: m_decodedBytes = m_stream.copy_received_data(m_buffers); call 0 never executed -: 172: } -: 173: 1: 174: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 175: { -: 176: // Make sure the handler is not called without an intermediate initiating function. -: 177: // "Reading" into a zero-byte buffer will complete immediately. #####: 178: m_ec = ec; #####: 179: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); 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 #####: 180: ec = m_ec; -: 181: } -: 182: 1: 183: this->complete_now(ec, m_decodedBytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 184: } -: 185: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS5_16prepared_buffersISA_Lm64EEESaIvEEclESQ_mb: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamESt6vectorINS4_14mutable_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests36test_async_read_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS5_16prepared_buffersISA_Lm64EEESaIvEEclESQ_mb called 2 returned 100% blocks executed 62% 2: 139: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 140: { 4*: 141: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 142: { 2: 143: if(bytes_transferred > 0 && !ec) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 144: { -: 145: // We have received encrypted data from the network, now hand it to TLS::Channel for decryption. 1: 146: boost::asio::const_buffer read_buffer{m_stream.input_buffer().data(), bytes_transferred}; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 147: m_stream.process_encrypted_data(read_buffer, ec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 148: } -: 149: 2: 150: if (m_stream.shutdown_received()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 151: { -: 152: // we just received a 'close_notify' from the peer and don't expect any more data 2: 153: ec = boost::asio::error::eof; -: 154: } 2*: 155: else if (ec == boost::asio::error::eof) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 156: { -: 157: // we did not expect this disconnection from the peer 2: 158: ec = StreamError::StreamTruncated; -: 159: } -: 160: 3: 161: if(!m_stream.has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 162: { -: 163: // The channel did not decrypt a complete record yet, we need more data from the socket. 1: 164: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 165: return; -: 166: } -: 167: 1: 168: if(m_stream.has_received_data() && !ec) branch 0 taken 100% branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 169: { -: 170: // The channel has decrypted a TLS record, now copy it to the output buffers. 1: 171: m_decodedBytes = m_stream.copy_received_data(m_buffers); call 0 returned 100% -: 172: } -: 173: 1: 174: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 175: { -: 176: // Make sure the handler is not called without an intermediate initiating function. -: 177: // "Reading" into a zero-byte buffer will complete immediately. #####: 178: m_ec = ec; #####: 179: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); 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 #####: 180: ec = m_ec; -: 181: } -: 182: 1: 183: this->complete_now(ec, m_decodedBytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 184: } -: 185: } ------------------ _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb: function _ZN5Botan3TLS6detail18AsyncReadOperationIN5boost4asio6detail7read_opIN11Botan_Tests10AsioStreamENS4_14mutable_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests28test_async_read_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEENS4_17mutable_buffers_1ESaIvEEclESL_mb called 2 returned 100% blocks executed 59% 2: 139: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 140: { 4*: 141: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 142: { 2: 143: if(bytes_transferred > 0 && !ec) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 144: { -: 145: // We have received encrypted data from the network, now hand it to TLS::Channel for decryption. 1: 146: boost::asio::const_buffer read_buffer{m_stream.input_buffer().data(), bytes_transferred}; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 147: m_stream.process_encrypted_data(read_buffer, ec); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 148: } -: 149: 2: 150: if (m_stream.shutdown_received()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 151: { -: 152: // we just received a 'close_notify' from the peer and don't expect any more data 2: 153: ec = boost::asio::error::eof; -: 154: } 2*: 155: else if (ec == boost::asio::error::eof) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 156: { -: 157: // we did not expect this disconnection from the peer 2: 158: ec = StreamError::StreamTruncated; -: 159: } -: 160: 2: 161: if(!m_stream.has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 0% (fallthrough) branch 5 taken 100% -: 162: { -: 163: // The channel did not decrypt a complete record yet, we need more data from the socket. 1: 164: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 165: return; -: 166: } -: 167: 1: 168: if(m_stream.has_received_data() && !ec) branch 0 taken 100% branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 169: { -: 170: // The channel has decrypted a TLS record, now copy it to the output buffers. 1: 171: m_decodedBytes = m_stream.copy_received_data(m_buffers); call 0 returned 100% -: 172: } -: 173: 1: 174: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 175: { -: 176: // Make sure the handler is not called without an intermediate initiating function. -: 177: // "Reading" into a zero-byte buffer will complete immediately. #####: 178: m_ec = ec; #####: 179: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); 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 #####: 180: ec = m_ec; -: 181: } -: 182: 1: 183: this->complete_now(ec, m_decodedBytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 184: } -: 185: } ------------------ -: 186: -: 187: private: -: 188: Stream& m_stream; -: 189: MutableBufferSequence m_buffers; -: 190: std::size_t m_decodedBytes; -: 191: boost::system::error_code m_ec; -: 192: }; -: 193: -: 194:template > 19*: 195:class AsyncWriteOperation : public AsyncBase call 0 returned 100% call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 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 call 13 never executed branch 14 never executed branch 15 never executed call 16 never executed branch 17 never executed branch 18 never executed branch 19 taken 0% (fallthrough) branch 20 taken 100% branch 21 never executed branch 22 never executed branch 23 taken 0% (fallthrough) branch 24 taken 100% branch 25 never executed branch 26 never executed call 27 returned 100% call 28 never executed branch 29 taken 0% (fallthrough) branch 30 taken 100% branch 31 never executed branch 32 never executed call 33 never executed call 34 never executed call 35 never executed call 36 never executed call 37 never executed call 38 never executed call 39 never executed call 40 never executed call 41 returned 100% call 42 never executed call 43 returned 100% call 44 never executed branch 45 taken 0% (fallthrough) branch 46 taken 100% branch 47 never executed branch 48 never executed branch 49 taken 0% (fallthrough) branch 50 taken 100% branch 51 never executed branch 52 never executed branch 53 taken 0% (fallthrough) branch 54 taken 100% branch 55 never executed branch 56 never executed call 57 never executed call 58 never executed call 59 returned 100% call 60 never executed call 61 returned 100% call 62 never executed branch 63 taken 0% (fallthrough) branch 64 taken 100% branch 65 never executed branch 66 never executed branch 67 never executed branch 68 never executed branch 69 taken 0% (fallthrough) branch 70 taken 100% call 71 never executed call 72 returned 100% branch 73 never executed branch 74 never executed branch 75 taken 0% (fallthrough) branch 76 taken 100% -: 196: { -: 197: public: -: 198: /** -: 199: * Construct and invoke an AsyncWriteOperation. -: 200: * -: 201: * @param handler Handler function to be called upon completion. -: 202: * @param stream The stream from which the data will be read -: 203: * @param plainBytesTransferred Number of bytes to be reported to the user-provided handler function as -: 204: * bytes_transferred. This needs to be provided since the amount of plaintext data -: 205: * consumed from the input buffer can differ from the amount of encrypted data written -: 206: * to the next layer. -: 207: * @param ec Optional error code; used to report an error to the handler function. -: 208: */ -: 209: template 7*: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 7*: 218: , m_plainBytesTransferred(plainBytesTransferred) -: 219: { 7*: 220: this->operator()(ec, std::size_t(0), false); 7*: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEESaIvEEC2ISP_EEOT_RST_mSN_: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEESaIvEEC2ISP_EEOT_RST_mSN_ called 1 returned 100% blocks executed 60% 1: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 1: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 219: { 1: 220: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2ISP_EEOT_RST_mSN_: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2ISP_EEOT_RST_mSN_ called 1 returned 100% blocks executed 60% 1: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 1: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 219: { 1: 220: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2ISU_EEOT_RSY_mSS_: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2ISU_EEOT_RSY_mSS_ called 2 returned 100% blocks executed 75% 2: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 2: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% call 4 never executed -: 219: { 2: 220: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2ISP_EEOT_RST_mSN_: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2ISP_EEOT_RST_mSN_ called 1 returned 100% blocks executed 60% 1: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 1: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed -: 219: { 1: 220: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_19ThrowingMockChannelEEESaIvEEESL_SM_EC2ISN_EEOT_RSL_mSG_: function _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_19ThrowingMockChannelEEESaIvEEESL_SM_EC2ISN_EEOT_RSL_mSG_ called 0 returned 0% blocks executed 0% #####: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) #####: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 never executed branch 1 never executed call 2 never executed call 3 never executed call 4 never executed -: 219: { #####: 220: this->operator()(ec, std::size_t(0), false); call 0 never executed branch 1 never executed branch 2 never executed #####: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EC2ISN_EEOT_RSL_mSG_: function _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EC2ISN_EEOT_RSL_mSG_ called 1 returned 100% blocks executed 75% 1: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 1: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% call 4 never executed -: 219: { 1: 220: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 221: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EC2ISN_EEOT_RSL_mSG_: function _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EC2ISN_EEOT_RSL_mSG_ called 1 returned 100% blocks executed 75% 1: 210: AsyncWriteOperation(HandlerT&& handler, -: 211: Stream& stream, -: 212: std::size_t plainBytesTransferred, -: 213: const boost::system::error_code& ec = {}) -: 214: : AsyncBase( -: 215: std::forward(handler), -: 216: stream.get_executor()) -: 217: , m_stream(stream) 1: 218: , m_plainBytesTransferred(plainBytesTransferred) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% call 3 returned 100% call 4 never executed -: 219: { 1: 220: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 221: } ------------------ -: 222: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEC2EOS10_ called 10 returned 100% blocks executed 100% 11*: 223: AsyncWriteOperation(AsyncWriteOperation&&) = default; 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% -: 224: 14*: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 29*: 227: reenter(this) -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 13*: 231: m_stream.consume_send_buffer(bytes_transferred); -: 232: 13*: 233: if(m_stream.has_data_to_send() && !ec) -: 234: { 6*: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); 6*: 236: return; -: 237: } -: 238: 7*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 7*: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 7*: 245: if(!isContinuation) -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. 1*: 249: m_ec = ec; 1*: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 1*: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 7*: 256: this->complete_now(ec, m_plainBytesTransferred); -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEESaIvEEclESL_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests18ThrowingAsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests22test_async_write_throwERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_19ThrowingMockChannelEEESaIvEEclESL_mb called 2 returned 100% blocks executed 56% 2: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 5*: 227: reenter(this) branch 0 taken 0% branch 1 taken 50% branch 2 taken 50% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 50% (fallthrough) branch 7 taken 50% -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 1: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 232: 1*: 233: if(m_stream.has_data_to_send() && !ec) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 never executed branch 3 never executed -: 234: { #####: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 never executed branch 1 never executed branch 2 never executed #####: 236: return; -: 237: } -: 238: 1*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 1: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 1: 245: if(!isContinuation) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. 1: 249: m_ec = ec; 1: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% branch 4 taken 0% branch 5 never executed branch 6 never executed 1: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 1: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEclESL_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests27test_async_write_some_errorERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEclESL_mb called 2 returned 100% blocks executed 50% 2: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 4*: 227: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 2: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 232: 2: 233: if(m_stream.has_data_to_send() && !ec) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 50% (fallthrough) branch 3 taken 50% -: 234: { 1: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 236: return; -: 237: } -: 238: 1*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 1: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 1: 245: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. #####: 249: m_ec = ec; #####: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 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 #####: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 1: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEclESQ_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamESt6vectorINS4_12const_bufferESaISA_EEN9__gnu_cxx17__normal_iteratorIPKSA_SC_EENS5_14transfer_all_tEZNS7_17Asio_Stream_Tests37test_async_write_some_buffer_sequenceERS9_INS7_4Test6ResultESaISL_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEclESQ_mb called 4 returned 100% blocks executed 53% 4: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 8*: 227: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 4: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 232: 4: 233: if(m_stream.has_data_to_send() && !ec) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 234: { 2: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 236: return; -: 237: } -: 238: 2*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 2: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 2: 245: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. #####: 249: m_ec = ec; #####: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 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 #####: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 2: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEclESL_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationIN5boost4asio6detail8write_opIN11Botan_Tests10AsioStreamENS4_12const_bufferEPKS9_NS5_14transfer_all_tEZNS7_17Asio_Stream_Tests29test_async_write_some_successERSt6vectorINS7_4Test6ResultESaISG_EEEUlRKNS3_6system10error_codeEmE_EENS0_6StreamINS7_10TestStreamENS7_11MockChannelEEESaIvEEclESL_mb called 2 returned 100% blocks executed 53% 2: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 4*: 227: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 2: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 232: 2: 233: if(m_stream.has_data_to_send() && !ec) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 234: { 1: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 236: return; -: 237: } -: 238: 1*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 1: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 1: 245: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. #####: 249: m_ec = ec; #####: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 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 #####: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 1: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_19ThrowingMockChannelEEESaIvEEESL_SM_EclESE_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_19ThrowingMockChannelEEESaIvEEESL_SM_EclESE_mb called 0 returned 0% blocks executed 0% #####: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { #####: 227: reenter(this) 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 -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call #####: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 never executed branch 1 never executed -: 232: #####: 233: if(m_stream.has_data_to_send() && !ec) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 234: { #####: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 never executed branch 1 never executed branch 2 never executed #####: 236: return; -: 237: } -: 238: #####: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' #####: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: #####: 245: if(!isContinuation) branch 0 never executed branch 1 never executed -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. #####: 249: m_ec = ec; #####: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 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 #####: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. #####: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 never executed branch 1 never executed branch 2 never executed -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EclESE_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EclESE_mb called 2 returned 100% blocks executed 50% 2: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 4*: 227: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 2: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 232: 2: 233: if(m_stream.has_data_to_send() && !ec) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 50% (fallthrough) branch 3 taken 50% -: 234: { 1: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 236: return; -: 237: } -: 238: 1*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 1: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 1: 245: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. #####: 249: m_ec = ec; #####: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 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 #####: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 1: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: } -: 258: } ------------------ _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EclESE_mb: function _ZN5Botan3TLS6detail19AsyncWriteOperationINS1_23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS4_4Test6ResultESaIS8_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS4_10TestStreamENS4_11MockChannelEEESaIvEEESL_SM_EclESE_mb called 2 returned 100% blocks executed 53% 2: 225: void operator()(boost::system::error_code ec, std::size_t bytes_transferred, bool isContinuation = true) -: 226: { 4*: 227: reenter(this) branch 0 taken 0% branch 1 taken 100% branch 2 taken 0% branch 3 taken 0% branch 4 never executed branch 5 never executed branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 228: { -: 229: // mark the number of encrypted bytes sent to the network as "consumed" -: 230: // Note: bytes_transferred will be zero on first call 2: 231: m_stream.consume_send_buffer(bytes_transferred); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 232: 2: 233: if(m_stream.has_data_to_send() && !ec) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 234: { 1: 235: m_stream.next_layer().async_write_some(m_stream.send_buffer(), std::move(*this)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 236: return; -: 237: } -: 238: 1*: 239: if (ec == boost::asio::error::eof && !m_stream.shutdown_received()) branch 0 taken 0% branch 1 taken 100% branch 2 never executed branch 3 never executed call 4 never executed -: 240: { -: 241: // transport layer was closed by peer without receiving 'close_notify' 1: 242: ec = StreamError::StreamTruncated; -: 243: } -: 244: 1: 245: if(!isContinuation) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 246: { -: 247: // Make sure the handler is not called without an intermediate initiating function. -: 248: // "Writing" to a zero-byte buffer will complete immediately. #####: 249: m_ec = ec; #####: 250: yield m_stream.next_layer().async_write_some(boost::asio::const_buffer(), std::move(*this)); 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 #####: 251: ec = m_ec; -: 252: } -: 253: -: 254: // The size of the sent TLS record can differ from the size of the payload due to TLS encryption. We need to -: 255: // tell the handler how many bytes of the original data we already processed. 1: 256: this->complete_now(ec, m_plainBytesTransferred); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: } -: 258: } ------------------ -: 259: -: 260: private: -: 261: Stream& m_stream; -: 262: std::size_t m_plainBytesTransferred; -: 263: boost::system::error_code m_ec; -: 264: }; -: 265: -: 266:template > 4*: 267:class AsyncHandshakeOperation : public AsyncBase branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 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 branch 15 taken 0% (fallthrough) branch 16 taken 100% 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 taken 0% (fallthrough) branch 24 taken 100% branch 25 never executed branch 26 never executed branch 27 taken 0% (fallthrough) branch 28 taken 100% branch 29 taken 100% (fallthrough) branch 30 taken 0% 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 taken 0% (fallthrough) branch 40 taken 100% branch 41 taken 100% (fallthrough) branch 42 taken 0% branch 43 never executed branch 44 never executed -: 268: { -: 269: public: -: 270: /** -: 271: * Construct and invoke an AsyncHandshakeOperation. -: 272: * -: 273: * @param handler Handler function to be called upon completion. -: 274: * @param stream The stream from which the data will be read -: 275: * @param ec Optional error code; used to report an error to the handler function. -: 276: */ -: 277: template 3: 278: AsyncHandshakeOperation( -: 279: HandlerT&& handler, -: 280: Stream& stream, -: 281: const boost::system::error_code& ec = {}) -: 282: : AsyncBase( -: 283: std::forward(handler), -: 284: stream.get_executor()) 3: 285: , m_stream(stream) -: 286: { 3: 287: this->operator()(ec, std::size_t(0), false); 3: 288: } ------------------ _ZN5Botan3TLS6detail23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS3_10TestStreamENS3_19ThrowingMockChannelEEESaIvEEC2ISG_EEOT_RSK_SF_: function _ZN5Botan3TLS6detail23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_throwERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS3_10TestStreamENS3_19ThrowingMockChannelEEESaIvEEC2ISG_EEOT_RSK_SF_ called 1 returned 100% blocks executed 56% 1: 278: AsyncHandshakeOperation( -: 279: HandlerT&& handler, -: 280: Stream& stream, -: 281: const boost::system::error_code& ec = {}) -: 282: : AsyncBase( -: 283: std::forward(handler), -: 284: stream.get_executor()) 1: 285: , m_stream(stream) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 never executed branch 4 never executed -: 286: { 1: 287: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 288: } ------------------ _ZN5Botan3TLS6detail23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS3_10TestStreamENS3_11MockChannelEEESaIvEEC2ISG_EEOT_RSK_SF_: function _ZN5Botan3TLS6detail23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests26test_async_handshake_errorERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS3_10TestStreamENS3_11MockChannelEEESaIvEEC2ISG_EEOT_RSK_SF_ called 1 returned 100% blocks executed 56% 1: 278: AsyncHandshakeOperation( -: 279: HandlerT&& handler, -: 280: Stream& stream, -: 281: const boost::system::error_code& ec = {}) -: 282: : AsyncBase( -: 283: std::forward(handler), -: 284: stream.get_executor()) 1: 285: , m_stream(stream) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 never executed branch 4 never executed -: 286: { 1: 287: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 288: } ------------------ _ZN5Botan3TLS6detail23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS3_10TestStreamENS3_11MockChannelEEESaIvEEC2ISG_EEOT_RSK_SF_: function _ZN5Botan3TLS6detail23AsyncHandshakeOperationIZN11Botan_Tests17Asio_Stream_Tests20test_async_handshakeERSt6vectorINS3_4Test6ResultESaIS7_EEEUlRKN5boost6system10error_codeEE_NS0_6StreamINS3_10TestStreamENS3_11MockChannelEEESaIvEEC2ISG_EEOT_RSK_SF_ called 1 returned 100% blocks executed 56% 1: 278: AsyncHandshakeOperation( -: 279: HandlerT&& handler, -: 280: Stream& stream, -: 281: const boost::system::error_code& ec = {}) -: 282: : AsyncBase( -: 283: std::forward(handler), -: 284: stream.get_executor()) 1: 285: , m_stream(stream) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 never executed branch 4 never executed -: 286: { 1: 287: this->operator()(ec, std::size_t(0), false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 288: } ------------------ -: 289: 16*: 290: AsyncHandshakeOperation(AsyncHandshakeOperation&&) = default; 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 never executed branch 8 never executed branch 9 never executed 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% (throw) call 18 never executed branch 19 never executed branch 20 never executed call 21 returned 100% branch 22 taken 100% (fallthrough) branch 23 taken 0% (throw) call 24 returned 100% call 25 never executed call 26 returned 100% call 27 returned 100% call 28 never executed call 29 returned 100% call 30 returned 100% branch 31 taken 100% (fallthrough) branch 32 taken 0% (throw) call 33 never executed branch 34 never executed branch 35 never executed call 36 returned 100% branch 37 taken 100% (fallthrough) branch 38 taken 0% (throw) call 39 never executed call 40 never executed call 41 never executed call 42 never executed branch 43 never executed branch 44 never executed call 45 never executed call 46 returned 100% branch 47 taken 100% (fallthrough) branch 48 taken 0% (throw) call 49 never executed call 50 returned 100% branch 51 taken 100% (fallthrough) branch 52 taken 0% (throw) call 53 never executed 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 100% (fallthrough) branch 63 taken 0% branch 64 taken 0% (fallthrough) branch 65 taken 100% -: 291: 7: 292: void operator()(boost::system::error_code ec, std::size_t bytesTransferred, bool isContinuation = true) -: 293: { 13*: 294: reenter(this) -: 295: { 7*: 296: if(ec == boost::asio::error::eof) -: 297: { 7: 298: ec = StreamError::StreamTruncated; -: 299: } -: 300: 7*: 301: if(bytesTransferred > 0 && !ec) -: 302: { -: 303: // Provide encrypted TLS data received from the network to TLS::Channel for decryption 2*: 304: boost::asio::const_buffer read_buffer {m_stream.input_buffer().data(), bytesTransferred}; 4*: 305: m_stream.process_encrypted_data(read_buffer, ec); -: 306: } -: 307: 7*: 308: if(m_stream.has_data_to_send() && !ec) -: 309: { -: 310: // Write encrypted TLS data provided by the TLS::Channel on the wire -: 311: -: 312: // Note: we construct `AsyncWriteOperation` with 0 as its last parameter (`plainBytesTransferred`). This -: 313: // operation will eventually call `*this` as its own handler, passing the 0 back to this call operator. -: 314: // This is necessary because the check of `bytesTransferred > 0` assumes that `bytesTransferred` bytes -: 315: // were just read and are available in input_buffer for further processing. -: 316: AsyncWriteOperation::type, Stream, Allocator>, -: 317: Stream, -: 318: Allocator> 4*: 319: op{std::move(*this), m_stream, 0}; 2*: 320: return; -: 321: } -: 322: 5: 323: if(!m_stream.native_handle()->is_active() && !ec) -: 324: { -: 325: // Read more encrypted TLS data from the network 2*: 326: m_stream.next_layer().async_read_some(m_stream.input_buffer(), std::move(*this)); 2*: 327: return; -: 328: } -: 329: 3: 330: if(!isContinuation) -: 331: { -: 332: // Make sure the handler is not called without an intermediate initiating function. -: 333: // "Reading" into a zero-byte buffer will complete immediately. #####: 334: m_ec = ec; #####: 335: yield m_stream.next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*this)); #####: 336: ec = m_ec; -: 337: } -: 338: 3: 339: this->complete_now(ec); -: 340: } -: 341: } -: 342: -: 343: private: -: 344: Stream& m_stream; -: 345: boost::system::error_code m_ec; -: 346: }; -: 347: -: 348:} // namespace detail -: 349:} // namespace TLS -: 350:} // namespace Botan -: 351: -: 352:#include -: 353: -: 354:#endif // BOOST_VERSION -: 355:#endif // BOTAN_ASIO_ASYNC_OPS_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/math_numbertheory_monty_exp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_monty_exp.gcda -: 0:Runs:2960 -: 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 function _ZNSt20__uninitialized_copyILb0EE13__uninit_copyIPKN5Botan14Montgomery_IntEPS3_EET0_T_S8_S7_ called 211381 returned 100% blocks executed 31% 211381: 76: __uninit_copy(_InputIterator __first, _InputIterator __last, -: 77: _ForwardIterator __result) -: 78: { 211381: 79: _ForwardIterator __cur = __result; -: 80: __try -: 81: { 211381*: 82: for (; __first != __last; ++__first, (void)++__cur) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 83: std::_Construct(std::__addressof(*__cur), *__first); call 0 never executed branch 1 never executed branch 2 never executed 211381: 84: return __cur; -: 85: } =====: 86: __catch(...) call 0 never executed call 1 never executed -: 87: { =====: 88: std::_Destroy(__result, __cur); =====: 89: __throw_exception_again; call 0 never executed -: 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 211381*: 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: 211381*: 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>:: 211381*: 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 24931: 285: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, -: 286: _ForwardIterator __result, _Allocator& __alloc) -: 287: { 24931: 288: _ForwardIterator __cur = __result; -: 289: __try -: 290: { -: 291: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 1570471: 292: for (; __first != __last; ++__first, (void)++__cur) branch 0 taken 98% (fallthrough) branch 1 taken 2% 1545540: 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 211381*: 305: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 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) -: 306: _ForwardIterator __result, allocator<_Tp>&) 211381*: 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, call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed -: 324: _InputIterator __last, -: 325: _ForwardIterator __result, -: 326: _Allocator& __alloc) -: 327: { -: 328: return std::__uninitialized_copy_a #####: 329: (_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first), 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 -: 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 187062: 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; 1064018: 648: for (; __n > 0; --__n, (void) ++__cur) branch 0 taken 82% (fallthrough) branch 1 taken 18% 876956: 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/#usr#include#c++#9#bits#exception.h.gcov -: 0:Source:/usr/include/c++/9/bits/exception.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_exceptn.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_exceptn.gcda -: 0:Runs:2960 -: 1:// Exception Handling support header for -*- C++ -*- -: 2: -: 3:// Copyright (C) 2016-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of GCC. -: 6:// -: 7:// GCC is free software; you can redistribute it and/or modify -: 8:// it under the terms of the GNU General Public License as published by -: 9:// the Free Software Foundation; either version 3, or (at your option) -: 10:// any later version. -: 11:// -: 12:// GCC is distributed in the hope that it will be useful, -: 13:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 14:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 15:// GNU General Public License for more details. -: 16:// -: 17:// Under Section 7 of GPL version 3, you are granted additional -: 18:// permissions described in the GCC Runtime Library Exception, version -: 19:// 3.1, as published by the Free Software Foundation. -: 20: -: 21:// You should have received a copy of the GNU General Public License and -: 22:// a copy of the GCC Runtime Library Exception along with this program; -: 23:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 24:// . -: 25: -: 26:/** @file bits/exception.h -: 27: * This is an internal header file, included by other library headers. -: 28: * Do not attempt to use it directly. -: 29: */ -: 30: -: 31:#ifndef __EXCEPTION_H -: 32:#define __EXCEPTION_H 1 -: 33: -: 34:#pragma GCC system_header -: 35: -: 36:#pragma GCC visibility push(default) -: 37: -: 38:#include -: 39: -: 40:extern "C++" { -: 41: -: 42:namespace std -: 43:{ -: 44: /** -: 45: * @defgroup exceptions Exceptions -: 46: * @ingroup diagnostics -: 47: * -: 48: * Classes and functions for reporting errors via exception classes. -: 49: * @{ -: 50: */ -: 51: -: 52: /** -: 53: * @brief Base class for all library exceptions. -: 54: * -: 55: * This is the base class for all exceptions thrown by the standard -: 56: * library, and by certain language expressions. You are free to derive -: 57: * your own %exception classes, or use a different hierarchy, or to -: 58: * throw non-class data (e.g., fundamental types). -: 59: */ -: 60: class exception -: 61: { -: 62: public: 193701: 63: exception() _GLIBCXX_NOTHROW { } 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) -: 64: virtual ~exception() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; -: 65:#if __cplusplus >= 201103L -: 66: exception(const exception&) = default; -: 67: exception& operator=(const exception&) = default; -: 68: exception(exception&&) = default; -: 69: exception& operator=(exception&&) = default; -: 70:#endif -: 71: -: 72: /** Returns a C-style character string describing the general cause -: 73: * of the current error. */ -: 74: virtual const char* -: 75: what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; -: 76: }; -: 77: -: 78:} // namespace std -: 79: -: 80:} -: 81: -: 82:#pragma GCC visibility pop -: 83: -: 84:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#fstream.gcov -: 0:Source:/usr/include/c++/9/fstream -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_filters.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_filters.gcda -: 0:Runs:1 -: 1:// File based streams -*- C++ -*- -: 2: -: 3:// Copyright (C) 1997-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 include/fstream -: 26: * This is a Standard C++ Library header. -: 27: */ -: 28: -: 29:// -: 30:// ISO C++ 14882: 27.8 File-based streams -: 31:// -: 32: -: 33:#ifndef _GLIBCXX_FSTREAM -: 34:#define _GLIBCXX_FSTREAM 1 -: 35: -: 36:#pragma GCC system_header -: 37: -: 38:#include -: 39:#include -: 40:#include -: 41:#include // For BUFSIZ -: 42:#include // For __basic_file, __c_lock -: 43:#if __cplusplus >= 201103L -: 44:#include // For std::string overloads. -: 45:#endif -: 46: -: 47:namespace std _GLIBCXX_VISIBILITY(default) -: 48:{ -: 49:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 50: -: 51:#if __cplusplus >= 201703L -: 52: // Enable if _Path is a filesystem::path or experimental::filesystem::path -: 53: template().make_preferred().filename())> -: 55: using _If_fs_path = enable_if_t, _Result>; -: 56:#endif // C++17 -: 57: -: 58: -: 59: // [27.8.1.1] template class basic_filebuf -: 60: /** -: 61: * @brief The actual work of input and output (for files). -: 62: * @ingroup io -: 63: * -: 64: * @tparam _CharT Type of character stream. -: 65: * @tparam _Traits Traits for character type, defaults to -: 66: * char_traits<_CharT>. -: 67: * -: 68: * This class associates both its input and output sequence with an -: 69: * external disk file, and maintains a joint file position for both -: 70: * sequences. Many of its semantics are described in terms of similar -: 71: * behavior in the Standard C Library's @c FILE streams. -: 72: * -: 73: * Requirements on traits_type, specific to this class: -: 74: * - traits_type::pos_type must be fpos -: 75: * - traits_type::off_type must be streamoff -: 76: * - traits_type::state_type must be Assignable and DefaultConstructible, -: 77: * - traits_type::state_type() must be the initial state for codecvt. -: 78: */ -: 79: template -: 80: class basic_filebuf : public basic_streambuf<_CharT, _Traits> -: 81: { -: 82:#if __cplusplus >= 201103L -: 83: template -: 84: using __chk_state = __and_, -: 85: is_copy_constructible<_Tp>, -: 86: is_default_constructible<_Tp>>; -: 87: -: 88: static_assert(__chk_state::value, -: 89: "state_type must be CopyAssignable, CopyConstructible" -: 90: " and DefaultConstructible"); -: 91: -: 92: static_assert(is_same>::value, -: 94: "pos_type must be fpos"); -: 95:#endif -: 96: public: -: 97: // Types: -: 98: typedef _CharT char_type; -: 99: typedef _Traits traits_type; -: 100: typedef typename traits_type::int_type int_type; -: 101: typedef typename traits_type::pos_type pos_type; -: 102: typedef typename traits_type::off_type off_type; -: 103: -: 104: typedef basic_streambuf __streambuf_type; -: 105: typedef basic_filebuf __filebuf_type; -: 106: typedef __basic_file __file_type; -: 107: typedef typename traits_type::state_type __state_type; -: 108: typedef codecvt __codecvt_type; -: 109: -: 110: friend class ios_base; // For sync_with_stdio. -: 111: -: 112: protected: -: 113: // Data Members: -: 114: // MT lock inherited from libio or other low-level io library. -: 115: __c_lock _M_lock; -: 116: -: 117: // External buffer. -: 118: __file_type _M_file; -: 119: -: 120: /// Place to stash in || out || in | out settings for current filebuf. -: 121: ios_base::openmode _M_mode; -: 122: -: 123: // Beginning state type for codecvt. -: 124: __state_type _M_state_beg; -: 125: -: 126: // During output, the state that corresponds to pptr(), -: 127: // during input, the state that corresponds to egptr() and -: 128: // _M_ext_next. -: 129: __state_type _M_state_cur; -: 130: -: 131: // Not used for output. During input, the state that corresponds -: 132: // to eback() and _M_ext_buf. -: 133: __state_type _M_state_last; -: 134: -: 135: /// Pointer to the beginning of internal buffer. -: 136: char_type* _M_buf; -: 137: -: 138: /** -: 139: * Actual size of internal buffer. This number is equal to the size -: 140: * of the put area + 1 position, reserved for the overflow char of -: 141: * a full area. -: 142: */ -: 143: size_t _M_buf_size; -: 144: -: 145: // Set iff _M_buf is allocated memory from _M_allocate_internal_buffer. -: 146: bool _M_buf_allocated; -: 147: -: 148: /** -: 149: * _M_reading == false && _M_writing == false for @b uncommitted mode; -: 150: * _M_reading == true for @b read mode; -: 151: * _M_writing == true for @b write mode; -: 152: * -: 153: * NB: _M_reading == true && _M_writing == true is unused. -: 154: */ -: 155: bool _M_reading; -: 156: bool _M_writing; -: 157: -: 158: //@{ -: 159: /** -: 160: * Necessary bits for putback buffer management. -: 161: * -: 162: * @note pbacks of over one character are not currently supported. -: 163: */ -: 164: char_type _M_pback; -: 165: char_type* _M_pback_cur_save; -: 166: char_type* _M_pback_end_save; -: 167: bool _M_pback_init; -: 168: //@} -: 169: -: 170: // Cached codecvt facet. -: 171: const __codecvt_type* _M_codecvt; -: 172: -: 173: /** -: 174: * Buffer for external characters. Used for input when -: 175: * codecvt::always_noconv() == false. When valid, this corresponds -: 176: * to eback(). -: 177: */ -: 178: char* _M_ext_buf; -: 179: -: 180: /** -: 181: * Size of buffer held by _M_ext_buf. -: 182: */ -: 183: streamsize _M_ext_buf_size; -: 184: -: 185: /** -: 186: * Pointers into the buffer held by _M_ext_buf that delimit a -: 187: * subsequence of bytes that have been read but not yet converted. -: 188: * When valid, _M_ext_next corresponds to egptr(). -: 189: */ -: 190: const char* _M_ext_next; -: 191: char* _M_ext_end; -: 192: -: 193: /** -: 194: * Initializes pback buffers, and moves normal buffers to safety. -: 195: * Assumptions: -: 196: * _M_in_cur has already been moved back -: 197: */ -: 198: void -: 199: _M_create_pback() -: 200: { -: 201: if (!_M_pback_init) -: 202: { -: 203: _M_pback_cur_save = this->gptr(); -: 204: _M_pback_end_save = this->egptr(); -: 205: this->setg(&_M_pback, &_M_pback, &_M_pback + 1); -: 206: _M_pback_init = true; -: 207: } -: 208: } -: 209: -: 210: /** -: 211: * Deactivates pback buffer contents, and restores normal buffer. -: 212: * Assumptions: -: 213: * The pback buffer has only moved forward. -: 214: */ -: 215: void -: 216: _M_destroy_pback() throw() -: 217: { -: 218: if (_M_pback_init) -: 219: { -: 220: // Length _M_in_cur moved in the pback buffer. -: 221: _M_pback_cur_save += this->gptr() != this->eback(); -: 222: this->setg(_M_buf, _M_pback_cur_save, _M_pback_end_save); -: 223: _M_pback_init = false; -: 224: } -: 225: } -: 226: -: 227: public: -: 228: // Constructors/destructor: -: 229: /** -: 230: * @brief Does not open any files. -: 231: * -: 232: * The default constructor initializes the parent class using its -: 233: * own default ctor. -: 234: */ -: 235: basic_filebuf(); -: 236: -: 237:#if __cplusplus >= 201103L -: 238: basic_filebuf(const basic_filebuf&) = delete; -: 239: basic_filebuf(basic_filebuf&&); -: 240:#endif -: 241: -: 242: /** -: 243: * @brief The destructor closes the file first. -: 244: */ -: 245: virtual -: 246: ~basic_filebuf() -: 247: { -: 248: __try -: 249: { this->close(); } -: 250: __catch(...) -: 251: { } -: 252: } -: 253: -: 254:#if __cplusplus >= 201103L -: 255: basic_filebuf& operator=(const basic_filebuf&) = delete; -: 256: basic_filebuf& operator=(basic_filebuf&&); -: 257: void swap(basic_filebuf&); -: 258:#endif -: 259: -: 260: // Members: -: 261: /** -: 262: * @brief Returns true if the external file is open. -: 263: */ -: 264: bool -: 265: is_open() const throw() -: 266: { return _M_file.is_open(); } -: 267: -: 268: /** -: 269: * @brief Opens an external file. -: 270: * @param __s The name of the file. -: 271: * @param __mode The open mode flags. -: 272: * @return @c this on success, NULL on failure -: 273: * -: 274: * If a file is already open, this function immediately fails. -: 275: * Otherwise it tries to open the file named @a __s using the flags -: 276: * given in @a __mode. -: 277: * -: 278: * Table 92, adapted here, gives the relation between openmode -: 279: * combinations and the equivalent @c fopen() flags. -: 280: * (NB: lines app, in|out|app, in|app, binary|app, binary|in|out|app, -: 281: * and binary|in|app per DR 596) -: 282: *
        -:  283:       *  +---------------------------------------------------------+
        -:  284:       *  | ios_base Flag combination            stdio equivalent   |
        -:  285:       *  |binary  in  out  trunc  app                              |
        -:  286:       *  +---------------------------------------------------------+
        -:  287:       *  |             +                        w                  |
        -:  288:       *  |             +           +            a                  |
        -:  289:       *  |                         +            a                  |
        -:  290:       *  |             +     +                  w                  |
        -:  291:       *  |         +                            r                  |
        -:  292:       *  |         +   +                        r+                 |
        -:  293:       *  |         +   +     +                  w+                 |
        -:  294:       *  |         +   +           +            a+                 |
        -:  295:       *  |         +               +            a+                 |
        -:  296:       *  +---------------------------------------------------------+
        -:  297:       *  |   +         +                        wb                 |
        -:  298:       *  |   +         +           +            ab                 |
        -:  299:       *  |   +                     +            ab                 |
        -:  300:       *  |   +         +     +                  wb                 |
        -:  301:       *  |   +     +                            rb                 |
        -:  302:       *  |   +     +   +                        r+b                |
        -:  303:       *  |   +     +   +     +                  w+b                |
        -:  304:       *  |   +     +   +           +            a+b                |
        -:  305:       *  |   +     +               +            a+b                |
        -:  306:       *  +---------------------------------------------------------+
        -:  307:       *  
-: 308: */ -: 309: __filebuf_type* -: 310: open(const char* __s, ios_base::openmode __mode); -: 311: -: 312:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 313: /** -: 314: * @brief Opens an external file. -: 315: * @param __s The name of the file, as a wide character string. -: 316: * @param __mode The open mode flags. -: 317: * @return @c this on success, NULL on failure -: 318: */ -: 319: __filebuf_type* -: 320: open(const wchar_t* __s, ios_base::openmode __mode); -: 321:#endif -: 322: -: 323:#if __cplusplus >= 201103L -: 324: /** -: 325: * @brief Opens an external file. -: 326: * @param __s The name of the file. -: 327: * @param __mode The open mode flags. -: 328: * @return @c this on success, NULL on failure -: 329: */ -: 330: __filebuf_type* -: 331: open(const std::string& __s, ios_base::openmode __mode) -: 332: { return open(__s.c_str(), __mode); } -: 333: -: 334:#if __cplusplus >= 201703L -: 335: /** -: 336: * @brief Opens an external file. -: 337: * @param __s The name of the file, as a filesystem::path. -: 338: * @param __mode The open mode flags. -: 339: * @return @c this on success, NULL on failure -: 340: */ -: 341: template -: 342: _If_fs_path<_Path, __filebuf_type*> -: 343: open(const _Path& __s, ios_base::openmode __mode) -: 344: { return open(__s.c_str(), __mode); } -: 345:#endif // C++17 -: 346:#endif // C++11 -: 347: -: 348: /** -: 349: * @brief Closes the currently associated file. -: 350: * @return @c this on success, NULL on failure -: 351: * -: 352: * If no file is currently open, this function immediately fails. -: 353: * -: 354: * If a put buffer area exists, @c overflow(eof) is -: 355: * called to flush all the characters. The file is then -: 356: * closed. -: 357: * -: 358: * If any operations fail, this function also fails. -: 359: */ -: 360: __filebuf_type* -: 361: close(); -: 362: -: 363: protected: -: 364: void -: 365: _M_allocate_internal_buffer(); -: 366: -: 367: void -: 368: _M_destroy_internal_buffer() throw(); -: 369: -: 370: // [27.8.1.4] overridden virtual functions -: 371: virtual streamsize -: 372: showmanyc(); -: 373: -: 374: // Stroustrup, 1998, p. 628 -: 375: // underflow() and uflow() functions are called to get the next -: 376: // character from the real input source when the buffer is empty. -: 377: // Buffered input uses underflow() -: 378: -: 379: virtual int_type -: 380: underflow(); -: 381: -: 382: virtual int_type -: 383: pbackfail(int_type __c = _Traits::eof()); -: 384: -: 385: // Stroustrup, 1998, p 648 -: 386: // The overflow() function is called to transfer characters to the -: 387: // real output destination when the buffer is full. A call to -: 388: // overflow(c) outputs the contents of the buffer plus the -: 389: // character c. -: 390: // 27.5.2.4.5 -: 391: // Consume some sequence of the characters in the pending sequence. -: 392: virtual int_type -: 393: overflow(int_type __c = _Traits::eof()); -: 394: -: 395: // Convert internal byte sequence to external, char-based -: 396: // sequence via codecvt. -: 397: bool -: 398: _M_convert_to_external(char_type*, streamsize); -: 399: -: 400: /** -: 401: * @brief Manipulates the buffer. -: 402: * @param __s Pointer to a buffer area. -: 403: * @param __n Size of @a __s. -: 404: * @return @c this -: 405: * -: 406: * If no file has been opened, and both @a __s and @a __n are zero, then -: 407: * the stream becomes unbuffered. Otherwise, @c __s is used as a -: 408: * buffer; see -: 409: * https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html#io.streambuf.buffering -: 410: * for more. -: 411: */ -: 412: virtual __streambuf_type* -: 413: setbuf(char_type* __s, streamsize __n); -: 414: -: 415: virtual pos_type -: 416: seekoff(off_type __off, ios_base::seekdir __way, -: 417: ios_base::openmode __mode = ios_base::in | ios_base::out); -: 418: -: 419: virtual pos_type -: 420: seekpos(pos_type __pos, -: 421: ios_base::openmode __mode = ios_base::in | ios_base::out); -: 422: -: 423: // Common code for seekoff, seekpos, and overflow -: 424: pos_type -: 425: _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state); -: 426: -: 427: int -: 428: _M_get_ext_pos(__state_type &__state); -: 429: -: 430: virtual int -: 431: sync(); -: 432: -: 433: virtual void -: 434: imbue(const locale& __loc); -: 435: -: 436: virtual streamsize -: 437: xsgetn(char_type* __s, streamsize __n); -: 438: -: 439: virtual streamsize -: 440: xsputn(const char_type* __s, streamsize __n); -: 441: -: 442: // Flushes output buffer, then writes unshift sequence. -: 443: bool -: 444: _M_terminate_output(); -: 445: -: 446: /** -: 447: * This function sets the pointers of the internal buffer, both get -: 448: * and put areas. Typically: -: 449: * -: 450: * __off == egptr() - eback() upon underflow/uflow (@b read mode); -: 451: * __off == 0 upon overflow (@b write mode); -: 452: * __off == -1 upon open, setbuf, seekoff/pos (@b uncommitted mode). -: 453: * -: 454: * NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size -: 455: * reflects the actual allocated memory and the last cell is reserved -: 456: * for the overflow char of a full put area. -: 457: */ -: 458: void -: 459: _M_set_buffer(streamsize __off) -: 460: { -: 461: const bool __testin = _M_mode & ios_base::in; -: 462: const bool __testout = (_M_mode & ios_base::out -: 463: || _M_mode & ios_base::app); -: 464: -: 465: if (__testin && __off > 0) -: 466: this->setg(_M_buf, _M_buf, _M_buf + __off); -: 467: else -: 468: this->setg(_M_buf, _M_buf, _M_buf); -: 469: -: 470: if (__testout && __off == 0 && _M_buf_size > 1 ) -: 471: this->setp(_M_buf, _M_buf + _M_buf_size - 1); -: 472: else -: 473: this->setp(0, 0); -: 474: } -: 475: }; -: 476: -: 477: // [27.8.1.5] Template class basic_ifstream -: 478: /** -: 479: * @brief Controlling input for files. -: 480: * @ingroup io -: 481: * -: 482: * @tparam _CharT Type of character stream. -: 483: * @tparam _Traits Traits for character type, defaults to -: 484: * char_traits<_CharT>. -: 485: * -: 486: * This class supports reading from named files, using the inherited -: 487: * functions from std::basic_istream. To control the associated -: 488: * sequence, an instance of std::basic_filebuf is used, which this page -: 489: * refers to as @c sb. -: 490: */ -: 491: template -: 492: class basic_ifstream : public basic_istream<_CharT, _Traits> -: 493: { -: 494: public: -: 495: // Types: -: 496: typedef _CharT char_type; -: 497: typedef _Traits traits_type; -: 498: typedef typename traits_type::int_type int_type; -: 499: typedef typename traits_type::pos_type pos_type; -: 500: typedef typename traits_type::off_type off_type; -: 501: -: 502: // Non-standard types: -: 503: typedef basic_filebuf __filebuf_type; -: 504: typedef basic_istream __istream_type; -: 505: -: 506: private: -: 507: __filebuf_type _M_filebuf; -: 508: -: 509: public: -: 510: // Constructors/Destructors: -: 511: /** -: 512: * @brief Default constructor. -: 513: * -: 514: * Initializes @c sb using its default constructor, and passes -: 515: * @c &sb to the base class initializer. Does not open any files -: 516: * (you haven't given it a filename to open). -: 517: */ -: 518: basic_ifstream() : __istream_type(), _M_filebuf() -: 519: { this->init(&_M_filebuf); } -: 520: -: 521: /** -: 522: * @brief Create an input file stream. -: 523: * @param __s Null terminated string specifying the filename. -: 524: * @param __mode Open file in specified mode (see std::ios_base). -: 525: * -: 526: * @c ios_base::in is automatically included in @a __mode. -: 527: */ -: 528: explicit -: 529: basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) -: 530: : __istream_type(), _M_filebuf() -: 531: { -: 532: this->init(&_M_filebuf); -: 533: this->open(__s, __mode); -: 534: } -: 535: -: 536:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 537: /** -: 538: * @param Create an input file stream. -: 539: * @param __s Wide string specifying the filename. -: 540: * @param __mode Open file in specified mode (see std::ios_base). -: 541: * -: 542: * @c ios_base::in is automatically included in @a __mode. -: 543: */ -: 544: basic_ifstream(const wchar_t* __s, -: 545: ios_base::openmode __mode = ios_base::in) -: 546: : __istream_type(), _M_filebuf() -: 547: { -: 548: this->init(&_M_filebuf); -: 549: this->open(__s, __mode); -: 550: } -: 551:#endif -: 552: -: 553:#if __cplusplus >= 201103L -: 554: /** -: 555: * @brief Create an input file stream. -: 556: * @param __s std::string specifying the filename. -: 557: * @param __mode Open file in specified mode (see std::ios_base). -: 558: * -: 559: * @c ios_base::in is automatically included in @a __mode. -: 560: */ -: 561: explicit -: 562: basic_ifstream(const std::string& __s, -: 563: ios_base::openmode __mode = ios_base::in) -: 564: : __istream_type(), _M_filebuf() -: 565: { -: 566: this->init(&_M_filebuf); -: 567: this->open(__s, __mode); -: 568: } -: 569: -: 570:#if __cplusplus >= 201703L -: 571: /** -: 572: * @param Create an input file stream. -: 573: * @param __s filesystem::path specifying the filename. -: 574: * @param __mode Open file in specified mode (see std::ios_base). -: 575: * -: 576: * @c ios_base::in is automatically included in @a __mode. -: 577: */ -: 578: template> -: 579: basic_ifstream(const _Path& __s, -: 580: ios_base::openmode __mode = ios_base::in) -: 581: : basic_ifstream(__s.c_str(), __mode) -: 582: { } -: 583:#endif // C++17 -: 584: -: 585: basic_ifstream(const basic_ifstream&) = delete; -: 586: -: 587: basic_ifstream(basic_ifstream&& __rhs) -: 588: : __istream_type(std::move(__rhs)), -: 589: _M_filebuf(std::move(__rhs._M_filebuf)) -: 590: { __istream_type::set_rdbuf(&_M_filebuf); } -: 591:#endif // C++11 -: 592: -: 593: /** -: 594: * @brief The destructor does nothing. -: 595: * -: 596: * The file is closed by the filebuf object, not the formatting -: 597: * stream. -: 598: */ -: 599: ~basic_ifstream() -: 600: { } -: 601: -: 602:#if __cplusplus >= 201103L -: 603: // 27.8.3.2 Assign and swap: -: 604: -: 605: basic_ifstream& -: 606: operator=(const basic_ifstream&) = delete; -: 607: -: 608: basic_ifstream& -: 609: operator=(basic_ifstream&& __rhs) -: 610: { -: 611: __istream_type::operator=(std::move(__rhs)); -: 612: _M_filebuf = std::move(__rhs._M_filebuf); -: 613: return *this; -: 614: } -: 615: -: 616: void -: 617: swap(basic_ifstream& __rhs) -: 618: { -: 619: __istream_type::swap(__rhs); -: 620: _M_filebuf.swap(__rhs._M_filebuf); -: 621: } -: 622:#endif -: 623: -: 624: // Members: -: 625: /** -: 626: * @brief Accessing the underlying buffer. -: 627: * @return The current basic_filebuf buffer. -: 628: * -: 629: * This hides both signatures of std::basic_ios::rdbuf(). -: 630: */ -: 631: __filebuf_type* 1: 632: rdbuf() const call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 633: { return const_cast<__filebuf_type*>(&_M_filebuf); } -: 634: -: 635: /** -: 636: * @brief Wrapper to test for an open file. -: 637: * @return @c rdbuf()->is_open() -: 638: */ -: 639: bool -: 640: is_open() -: 641: { return _M_filebuf.is_open(); } -: 642: -: 643: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 644: // 365. Lack of const-qualification in clause 27 -: 645: bool -: 646: is_open() const -: 647: { return _M_filebuf.is_open(); } -: 648: -: 649: /** -: 650: * @brief Opens an external file. -: 651: * @param __s The name of the file. -: 652: * @param __mode The open mode flags. -: 653: * -: 654: * Calls @c std::basic_filebuf::open(s,__mode|in). If that function -: 655: * fails, @c failbit is set in the stream's error state. -: 656: */ -: 657: void -: 658: open(const char* __s, ios_base::openmode __mode = ios_base::in) -: 659: { -: 660: if (!_M_filebuf.open(__s, __mode | ios_base::in)) -: 661: this->setstate(ios_base::failbit); -: 662: else -: 663: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 664: // 409. Closing an fstream should clear error state -: 665: this->clear(); -: 666: } -: 667: -: 668:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 669: /** -: 670: * @brief Opens an external file. -: 671: * @param __s The name of the file, as a wide character string. -: 672: * @param __mode The open mode flags. -: 673: * -: 674: * Calls @c std::basic_filebuf::open(__s,__mode|in). If that function -: 675: * fails, @c failbit is set in the stream's error state. -: 676: */ -: 677: void -: 678: open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in) -: 679: { -: 680: if (!_M_filebuf.open(__s, __mode | ios_base::in)) -: 681: this->setstate(ios_base::failbit); -: 682: else -: 683: this->clear(); -: 684: } -: 685:#endif -: 686: -: 687:#if __cplusplus >= 201103L -: 688: /** -: 689: * @brief Opens an external file. -: 690: * @param __s The name of the file. -: 691: * @param __mode The open mode flags. -: 692: * -: 693: * Calls @c std::basic_filebuf::open(__s,__mode|in). If that function -: 694: * fails, @c failbit is set in the stream's error state. -: 695: */ -: 696: void -: 697: open(const std::string& __s, ios_base::openmode __mode = ios_base::in) -: 698: { -: 699: if (!_M_filebuf.open(__s, __mode | ios_base::in)) -: 700: this->setstate(ios_base::failbit); -: 701: else -: 702: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 703: // 409. Closing an fstream should clear error state -: 704: this->clear(); -: 705: } -: 706: -: 707:#if __cplusplus >= 201703L -: 708: /** -: 709: * @brief Opens an external file. -: 710: * @param __s The name of the file, as a filesystem::path. -: 711: * @param __mode The open mode flags. -: 712: * -: 713: * Calls @c std::basic_filebuf::open(__s,__mode|in). If that function -: 714: * fails, @c failbit is set in the stream's error state. -: 715: */ -: 716: template -: 717: _If_fs_path<_Path, void> -: 718: open(const _Path& __s, ios_base::openmode __mode = ios_base::in) -: 719: { open(__s.c_str(), __mode); } -: 720:#endif // C++17 -: 721:#endif // C++11 -: 722: -: 723: /** -: 724: * @brief Close the file. -: 725: * -: 726: * Calls @c std::basic_filebuf::close(). If that function -: 727: * fails, @c failbit is set in the stream's error state. -: 728: */ -: 729: void -: 730: close() -: 731: { -: 732: if (!_M_filebuf.close()) -: 733: this->setstate(ios_base::failbit); -: 734: } -: 735: }; -: 736: -: 737: -: 738: // [27.8.1.8] Template class basic_ofstream -: 739: /** -: 740: * @brief Controlling output for files. -: 741: * @ingroup io -: 742: * -: 743: * @tparam _CharT Type of character stream. -: 744: * @tparam _Traits Traits for character type, defaults to -: 745: * char_traits<_CharT>. -: 746: * -: 747: * This class supports reading from named files, using the inherited -: 748: * functions from std::basic_ostream. To control the associated -: 749: * sequence, an instance of std::basic_filebuf is used, which this page -: 750: * refers to as @c sb. -: 751: */ -: 752: template -: 753: class basic_ofstream : public basic_ostream<_CharT,_Traits> -: 754: { -: 755: public: -: 756: // Types: -: 757: typedef _CharT char_type; -: 758: typedef _Traits traits_type; -: 759: typedef typename traits_type::int_type int_type; -: 760: typedef typename traits_type::pos_type pos_type; -: 761: typedef typename traits_type::off_type off_type; -: 762: -: 763: // Non-standard types: -: 764: typedef basic_filebuf __filebuf_type; -: 765: typedef basic_ostream __ostream_type; -: 766: -: 767: private: -: 768: __filebuf_type _M_filebuf; -: 769: -: 770: public: -: 771: // Constructors: -: 772: /** -: 773: * @brief Default constructor. -: 774: * -: 775: * Initializes @c sb using its default constructor, and passes -: 776: * @c &sb to the base class initializer. Does not open any files -: 777: * (you haven't given it a filename to open). -: 778: */ -: 779: basic_ofstream(): __ostream_type(), _M_filebuf() -: 780: { this->init(&_M_filebuf); } -: 781: -: 782: /** -: 783: * @brief Create an output file stream. -: 784: * @param __s Null terminated string specifying the filename. -: 785: * @param __mode Open file in specified mode (see std::ios_base). -: 786: * -: 787: * @c ios_base::out is automatically included in @a __mode. -: 788: */ -: 789: explicit -: 790: basic_ofstream(const char* __s, -: 791: ios_base::openmode __mode = ios_base::out) -: 792: : __ostream_type(), _M_filebuf() -: 793: { -: 794: this->init(&_M_filebuf); -: 795: this->open(__s, __mode); -: 796: } -: 797: -: 798:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 799: /** -: 800: * @param Create an output file stream. -: 801: * @param __s Wide string specifying the filename. -: 802: * @param __mode Open file in specified mode (see std::ios_base). -: 803: * -: 804: * @c ios_base::out | @c ios_base::trunc is automatically included in -: 805: * @a __mode. -: 806: */ -: 807: basic_ofstream(const wchar_t* __s, -: 808: ios_base::openmode __mode = ios_base::out|ios_base::trunc) -: 809: : __ostream_type(), _M_filebuf() -: 810: { -: 811: this->init(&_M_filebuf); -: 812: this->open(__s, __mode); -: 813: } -: 814:#endif -: 815: -: 816:#if __cplusplus >= 201103L -: 817: /** -: 818: * @brief Create an output file stream. -: 819: * @param __s std::string specifying the filename. -: 820: * @param __mode Open file in specified mode (see std::ios_base). -: 821: * -: 822: * @c ios_base::out is automatically included in @a __mode. -: 823: */ -: 824: explicit -: 825: basic_ofstream(const std::string& __s, -: 826: ios_base::openmode __mode = ios_base::out) -: 827: : __ostream_type(), _M_filebuf() -: 828: { -: 829: this->init(&_M_filebuf); -: 830: this->open(__s, __mode); -: 831: } -: 832: -: 833:#if __cplusplus >= 201703L -: 834: /** -: 835: * @param Create an output file stream. -: 836: * @param __s filesystem::path specifying the filename. -: 837: * @param __mode Open file in specified mode (see std::ios_base). -: 838: * -: 839: * @c ios_base::out is automatically included in @a __mode. -: 840: */ -: 841: template> -: 842: basic_ofstream(const _Path& __s, -: 843: ios_base::openmode __mode = ios_base::out) -: 844: : basic_ofstream(__s.c_str(), __mode) -: 845: { } -: 846:#endif // C++17 -: 847: -: 848: basic_ofstream(const basic_ofstream&) = delete; -: 849: -: 850: basic_ofstream(basic_ofstream&& __rhs) -: 851: : __ostream_type(std::move(__rhs)), -: 852: _M_filebuf(std::move(__rhs._M_filebuf)) -: 853: { __ostream_type::set_rdbuf(&_M_filebuf); } -: 854:#endif -: 855: -: 856: /** -: 857: * @brief The destructor does nothing. -: 858: * -: 859: * The file is closed by the filebuf object, not the formatting -: 860: * stream. -: 861: */ -: 862: ~basic_ofstream() -: 863: { } -: 864: -: 865:#if __cplusplus >= 201103L -: 866: // 27.8.3.2 Assign and swap: -: 867: -: 868: basic_ofstream& -: 869: operator=(const basic_ofstream&) = delete; -: 870: -: 871: basic_ofstream& -: 872: operator=(basic_ofstream&& __rhs) -: 873: { -: 874: __ostream_type::operator=(std::move(__rhs)); -: 875: _M_filebuf = std::move(__rhs._M_filebuf); -: 876: return *this; -: 877: } -: 878: -: 879: void -: 880: swap(basic_ofstream& __rhs) -: 881: { -: 882: __ostream_type::swap(__rhs); -: 883: _M_filebuf.swap(__rhs._M_filebuf); -: 884: } -: 885:#endif -: 886: -: 887: // Members: -: 888: /** -: 889: * @brief Accessing the underlying buffer. -: 890: * @return The current basic_filebuf buffer. -: 891: * -: 892: * This hides both signatures of std::basic_ios::rdbuf(). -: 893: */ -: 894: __filebuf_type* -: 895: rdbuf() const -: 896: { return const_cast<__filebuf_type*>(&_M_filebuf); } -: 897: -: 898: /** -: 899: * @brief Wrapper to test for an open file. -: 900: * @return @c rdbuf()->is_open() -: 901: */ -: 902: bool -: 903: is_open() -: 904: { return _M_filebuf.is_open(); } -: 905: -: 906: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 907: // 365. Lack of const-qualification in clause 27 -: 908: bool -: 909: is_open() const -: 910: { return _M_filebuf.is_open(); } -: 911: -: 912: /** -: 913: * @brief Opens an external file. -: 914: * @param __s The name of the file. -: 915: * @param __mode The open mode flags. -: 916: * -: 917: * Calls @c std::basic_filebuf::open(__s,__mode|out). If that -: 918: * function fails, @c failbit is set in the stream's error state. -: 919: */ -: 920: void -: 921: open(const char* __s, ios_base::openmode __mode = ios_base::out) -: 922: { -: 923: if (!_M_filebuf.open(__s, __mode | ios_base::out)) -: 924: this->setstate(ios_base::failbit); -: 925: else -: 926: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 927: // 409. Closing an fstream should clear error state -: 928: this->clear(); -: 929: } -: 930: -: 931:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 932: /** -: 933: * @brief Opens an external file. -: 934: * @param __s The name of the file. -: 935: * @param __mode The open mode flags. -: 936: * -: 937: * Calls @c std::basic_filebuf::open(__s,__mode|out). If that -: 938: * function fails, @c failbit is set in the stream's error state. -: 939: */ -: 940: void -: 941: open(const wchar_t* __s, ios_base::openmode __mode = ios_base::out) -: 942: { -: 943: if (!_M_filebuf.open(__s, __mode | ios_base::out)) -: 944: this->setstate(ios_base::failbit); -: 945: else -: 946: this->clear(); -: 947: } -: 948:#endif -: 949: -: 950:#if __cplusplus >= 201103L -: 951: /** -: 952: * @brief Opens an external file. -: 953: * @param __s The name of the file. -: 954: * @param __mode The open mode flags. -: 955: * -: 956: * Calls @c std::basic_filebuf::open(s,mode|out). If that -: 957: * function fails, @c failbit is set in the stream's error state. -: 958: */ -: 959: void -: 960: open(const std::string& __s, ios_base::openmode __mode = ios_base::out) -: 961: { -: 962: if (!_M_filebuf.open(__s, __mode | ios_base::out)) -: 963: this->setstate(ios_base::failbit); -: 964: else -: 965: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 966: // 409. Closing an fstream should clear error state -: 967: this->clear(); -: 968: } -: 969: -: 970:#if __cplusplus >= 201703L -: 971: /** -: 972: * @brief Opens an external file. -: 973: * @param __s The name of the file, as a filesystem::path. -: 974: * @param __mode The open mode flags. -: 975: * -: 976: * Calls @c std::basic_filebuf::open(__s,__mode|out). If that -: 977: * function fails, @c failbit is set in the stream's error state. -: 978: */ -: 979: template -: 980: _If_fs_path<_Path, void> -: 981: open(const _Path& __s, ios_base::openmode __mode = ios_base::out) -: 982: { open(__s.c_str(), __mode); } -: 983:#endif // C++17 -: 984:#endif // C++11 -: 985: -: 986: /** -: 987: * @brief Close the file. -: 988: * -: 989: * Calls @c std::basic_filebuf::close(). If that function -: 990: * fails, @c failbit is set in the stream's error state. -: 991: */ -: 992: void -: 993: close() -: 994: { -: 995: if (!_M_filebuf.close()) -: 996: this->setstate(ios_base::failbit); -: 997: } -: 998: }; -: 999: -: 1000: -: 1001: // [27.8.1.11] Template class basic_fstream -: 1002: /** -: 1003: * @brief Controlling input and output for files. -: 1004: * @ingroup io -: 1005: * -: 1006: * @tparam _CharT Type of character stream. -: 1007: * @tparam _Traits Traits for character type, defaults to -: 1008: * char_traits<_CharT>. -: 1009: * -: 1010: * This class supports reading from and writing to named files, using -: 1011: * the inherited functions from std::basic_iostream. To control the -: 1012: * associated sequence, an instance of std::basic_filebuf is used, which -: 1013: * this page refers to as @c sb. -: 1014: */ -: 1015: template -: 1016: class basic_fstream : public basic_iostream<_CharT, _Traits> -: 1017: { -: 1018: public: -: 1019: // Types: -: 1020: typedef _CharT char_type; -: 1021: typedef _Traits traits_type; -: 1022: typedef typename traits_type::int_type int_type; -: 1023: typedef typename traits_type::pos_type pos_type; -: 1024: typedef typename traits_type::off_type off_type; -: 1025: -: 1026: // Non-standard types: -: 1027: typedef basic_filebuf __filebuf_type; -: 1028: typedef basic_ios __ios_type; -: 1029: typedef basic_iostream __iostream_type; -: 1030: -: 1031: private: -: 1032: __filebuf_type _M_filebuf; -: 1033: -: 1034: public: -: 1035: // Constructors/destructor: -: 1036: /** -: 1037: * @brief Default constructor. -: 1038: * -: 1039: * Initializes @c sb using its default constructor, and passes -: 1040: * @c &sb to the base class initializer. Does not open any files -: 1041: * (you haven't given it a filename to open). -: 1042: */ -: 1043: basic_fstream() -: 1044: : __iostream_type(), _M_filebuf() -: 1045: { this->init(&_M_filebuf); } -: 1046: -: 1047: /** -: 1048: * @brief Create an input/output file stream. -: 1049: * @param __s Null terminated string specifying the filename. -: 1050: * @param __mode Open file in specified mode (see std::ios_base). -: 1051: */ -: 1052: explicit -: 1053: basic_fstream(const char* __s, -: 1054: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1055: : __iostream_type(0), _M_filebuf() -: 1056: { -: 1057: this->init(&_M_filebuf); -: 1058: this->open(__s, __mode); -: 1059: } -: 1060: -: 1061:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 1062: /** -: 1063: * @param Create an input/output file stream. -: 1064: * @param __s Wide string specifying the filename. -: 1065: * @param __mode Open file in specified mode (see std::ios_base). -: 1066: */ -: 1067: basic_fstream(const wchar_t* __s, -: 1068: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1069: : __iostream_type(0), _M_filebuf() -: 1070: { -: 1071: this->init(&_M_filebuf); -: 1072: this->open(__s, __mode); -: 1073: } -: 1074:#endif -: 1075: -: 1076:#if __cplusplus >= 201103L -: 1077: /** -: 1078: * @brief Create an input/output file stream. -: 1079: * @param __s Null terminated string specifying the filename. -: 1080: * @param __mode Open file in specified mode (see std::ios_base). -: 1081: */ -: 1082: explicit -: 1083: basic_fstream(const std::string& __s, -: 1084: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1085: : __iostream_type(0), _M_filebuf() -: 1086: { -: 1087: this->init(&_M_filebuf); -: 1088: this->open(__s, __mode); -: 1089: } -: 1090: -: 1091:#if __cplusplus >= 201703L -: 1092: /** -: 1093: * @param Create an input/output file stream. -: 1094: * @param __s filesystem::path specifying the filename. -: 1095: * @param __mode Open file in specified mode (see std::ios_base). -: 1096: */ -: 1097: template> -: 1098: basic_fstream(const _Path& __s, -: 1099: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1100: : basic_fstream(__s.c_str(), __mode) -: 1101: { } -: 1102:#endif // C++17 -: 1103: -: 1104: basic_fstream(const basic_fstream&) = delete; -: 1105: -: 1106: basic_fstream(basic_fstream&& __rhs) -: 1107: : __iostream_type(std::move(__rhs)), -: 1108: _M_filebuf(std::move(__rhs._M_filebuf)) -: 1109: { __iostream_type::set_rdbuf(&_M_filebuf); } -: 1110:#endif -: 1111: -: 1112: /** -: 1113: * @brief The destructor does nothing. -: 1114: * -: 1115: * The file is closed by the filebuf object, not the formatting -: 1116: * stream. -: 1117: */ -: 1118: ~basic_fstream() -: 1119: { } -: 1120: -: 1121:#if __cplusplus >= 201103L -: 1122: // 27.8.3.2 Assign and swap: -: 1123: -: 1124: basic_fstream& -: 1125: operator=(const basic_fstream&) = delete; -: 1126: -: 1127: basic_fstream& -: 1128: operator=(basic_fstream&& __rhs) -: 1129: { -: 1130: __iostream_type::operator=(std::move(__rhs)); -: 1131: _M_filebuf = std::move(__rhs._M_filebuf); -: 1132: return *this; -: 1133: } -: 1134: -: 1135: void -: 1136: swap(basic_fstream& __rhs) -: 1137: { -: 1138: __iostream_type::swap(__rhs); -: 1139: _M_filebuf.swap(__rhs._M_filebuf); -: 1140: } -: 1141:#endif -: 1142: -: 1143: // Members: -: 1144: /** -: 1145: * @brief Accessing the underlying buffer. -: 1146: * @return The current basic_filebuf buffer. -: 1147: * -: 1148: * This hides both signatures of std::basic_ios::rdbuf(). -: 1149: */ -: 1150: __filebuf_type* -: 1151: rdbuf() const -: 1152: { return const_cast<__filebuf_type*>(&_M_filebuf); } -: 1153: -: 1154: /** -: 1155: * @brief Wrapper to test for an open file. -: 1156: * @return @c rdbuf()->is_open() -: 1157: */ -: 1158: bool -: 1159: is_open() -: 1160: { return _M_filebuf.is_open(); } -: 1161: -: 1162: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1163: // 365. Lack of const-qualification in clause 27 -: 1164: bool -: 1165: is_open() const -: 1166: { return _M_filebuf.is_open(); } -: 1167: -: 1168: /** -: 1169: * @brief Opens an external file. -: 1170: * @param __s The name of the file. -: 1171: * @param __mode The open mode flags. -: 1172: * -: 1173: * Calls @c std::basic_filebuf::open(__s,__mode). If that -: 1174: * function fails, @c failbit is set in the stream's error state. -: 1175: */ -: 1176: void -: 1177: open(const char* __s, -: 1178: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1179: { -: 1180: if (!_M_filebuf.open(__s, __mode)) -: 1181: this->setstate(ios_base::failbit); -: 1182: else -: 1183: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1184: // 409. Closing an fstream should clear error state -: 1185: this->clear(); -: 1186: } -: 1187: -: 1188:#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T -: 1189: /** -: 1190: * @brief Opens an external file. -: 1191: * @param __s The name of the file. -: 1192: * @param __mode The open mode flags. -: 1193: * -: 1194: * Calls @c std::basic_filebuf::open(__s,__mode). If that -: 1195: * function fails, @c failbit is set in the stream's error state. -: 1196: */ -: 1197: void -: 1198: open(const wchar_t* __s, -: 1199: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1200: { -: 1201: if (!_M_filebuf.open(__s, __mode)) -: 1202: this->setstate(ios_base::failbit); -: 1203: else -: 1204: this->clear(); -: 1205: } -: 1206:#endif -: 1207: -: 1208:#if __cplusplus >= 201103L -: 1209: /** -: 1210: * @brief Opens an external file. -: 1211: * @param __s The name of the file. -: 1212: * @param __mode The open mode flags. -: 1213: * -: 1214: * Calls @c std::basic_filebuf::open(__s,__mode). If that -: 1215: * function fails, @c failbit is set in the stream's error state. -: 1216: */ -: 1217: void -: 1218: open(const std::string& __s, -: 1219: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1220: { -: 1221: if (!_M_filebuf.open(__s, __mode)) -: 1222: this->setstate(ios_base::failbit); -: 1223: else -: 1224: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1225: // 409. Closing an fstream should clear error state -: 1226: this->clear(); -: 1227: } -: 1228: -: 1229:#if __cplusplus >= 201703L -: 1230: /** -: 1231: * @brief Opens an external file. -: 1232: * @param __s The name of the file, as a filesystem::path. -: 1233: * @param __mode The open mode flags. -: 1234: * -: 1235: * Calls @c std::basic_filebuf::open(__s,__mode). If that -: 1236: * function fails, @c failbit is set in the stream's error state. -: 1237: */ -: 1238: template -: 1239: _If_fs_path<_Path, void> -: 1240: open(const _Path& __s, -: 1241: ios_base::openmode __mode = ios_base::in | ios_base::out) -: 1242: { open(__s.c_str(), __mode); } -: 1243:#endif // C++17 -: 1244:#endif // C++11 -: 1245: -: 1246: /** -: 1247: * @brief Close the file. -: 1248: * -: 1249: * Calls @c std::basic_filebuf::close(). If that function -: 1250: * fails, @c failbit is set in the stream's error state. -: 1251: */ -: 1252: void -: 1253: close() -: 1254: { -: 1255: if (!_M_filebuf.close()) -: 1256: this->setstate(ios_base::failbit); -: 1257: } -: 1258: }; -: 1259: -: 1260:#if __cplusplus >= 201103L -: 1261: /// Swap specialization for filebufs. -: 1262: template -: 1263: inline void -: 1264: swap(basic_filebuf<_CharT, _Traits>& __x, -: 1265: basic_filebuf<_CharT, _Traits>& __y) -: 1266: { __x.swap(__y); } -: 1267: -: 1268: /// Swap specialization for ifstreams. -: 1269: template -: 1270: inline void -: 1271: swap(basic_ifstream<_CharT, _Traits>& __x, -: 1272: basic_ifstream<_CharT, _Traits>& __y) -: 1273: { __x.swap(__y); } -: 1274: -: 1275: /// Swap specialization for ofstreams. -: 1276: template -: 1277: inline void -: 1278: swap(basic_ofstream<_CharT, _Traits>& __x, -: 1279: basic_ofstream<_CharT, _Traits>& __y) -: 1280: { __x.swap(__y); } -: 1281: -: 1282: /// Swap specialization for fstreams. -: 1283: template -: 1284: inline void -: 1285: swap(basic_fstream<_CharT, _Traits>& __x, -: 1286: basic_fstream<_CharT, _Traits>& __y) -: 1287: { __x.swap(__y); } -: 1288:#endif -: 1289: -: 1290:_GLIBCXX_END_NAMESPACE_VERSION -: 1291:} // namespace -: 1292: -: 1293:#include -: 1294: -: 1295:#endif /* _GLIBCXX_FSTREAM */ <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#gost_3410.h.gcov -: 0:Source:build/include/botan/gost_3410.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_gost_3410.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_gost_3410.gcda -: 0:Runs:2960 -: 1:/* -: 2:* GOST 34.10-2001 -: 3:* (C) 2007 Falko Strenzke, FlexSecure GmbH -: 4:* Manuel Hartl, FlexSecure GmbH -: 5:* (C) 2008-2010 Jack Lloyd -: 6:* -: 7:* Botan is released under the Simplified BSD License (see license.txt) -: 8:*/ -: 9: -: 10:#ifndef BOTAN_GOST_3410_KEY_H_ -: 11:#define BOTAN_GOST_3410_KEY_H_ -: 12: -: 13:#include -: 14: -: 15:namespace Botan { -: 16: -: 17:/** -: 18:* GOST-34.10 Public Key -: 19:*/ =====: 20:class BOTAN_PUBLIC_API(2,0) GOST_3410_PublicKey : public virtual EC_PublicKey -: 21: { -: 22: public: -: 23: -: 24: /** -: 25: * Construct a public key from a given public point. -: 26: * @param dom_par the domain parameters associated with this key -: 27: * @param public_point the public point defining this key -: 28: */ -: 29: GOST_3410_PublicKey(const EC_Group& dom_par, -: 30: const PointGFp& public_point) : -: 31: EC_PublicKey(dom_par, public_point) {} -: 32: -: 33: /** -: 34: * Load a public key. -: 35: * @param alg_id the X.509 algorithm identifier -: 36: * @param key_bits DER encoded public key bits -: 37: */ -: 38: GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id, -: 39: const std::vector& key_bits); -: 40: -: 41: /** -: 42: * Get this keys algorithm name. -: 43: * @result this keys algorithm name -: 44: */ -: 45: std::string algo_name() const override; -: 46: -: 47: AlgorithmIdentifier algorithm_identifier() const override; -: 48: -: 49: std::vector public_key_bits() const override; -: 50: function _ZNK5Botan19GOST_3410_PublicKey13message_partsEv called 78 returned 100% blocks executed 100% 78: 51: size_t message_parts() const override { return 2; } -: 52: function _ZNK5Botan19GOST_3410_PublicKey17message_part_sizeEv called 78 returned 100% blocks executed 100% 78: 53: size_t message_part_size() const override 78: 54: { return domain().get_order().bytes(); } call 0 returned 100% call 1 returned 100% -: 55: function _ZNK5Botan19GOST_3410_PublicKey29default_x509_signature_formatEv called 73 returned 100% blocks executed 100% 73: 56: Signature_Format default_x509_signature_format() const override 73: 57: { return IEEE_1363; } -: 58: -: 59: std::unique_ptr -: 60: create_verification_op(const std::string& params, -: 61: const std::string& provider) const override; -: 62: -: 63: protected: 12*: 64: GOST_3410_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 -: 65: }; -: 66: -: 67:/** -: 68:* GOST-34.10 Private Key -: 69:*/ -: 70:class BOTAN_PUBLIC_API(2,0) GOST_3410_PrivateKey final : -: 71: public GOST_3410_PublicKey, public EC_PrivateKey -: 72: { -: 73: public: -: 74: /** -: 75: * Load a private key. -: 76: * @param alg_id the X.509 algorithm identifier -: 77: * @param key_bits ECPrivateKey bits -: 78: */ -: 79: GOST_3410_PrivateKey(const AlgorithmIdentifier& alg_id, -: 80: const secure_vector& key_bits) : -: 81: EC_PrivateKey(alg_id, key_bits) {} -: 82: -: 83: /** -: 84: * Generate a new private key -: 85: * @param rng a random number generator -: 86: * @param domain parameters to used for this key -: 87: * @param x the private key; if zero, a new random key is generated -: 88: */ -: 89: GOST_3410_PrivateKey(RandomNumberGenerator& rng, -: 90: const EC_Group& domain, -: 91: const BigInt& x = 0); -: 92: function _ZNK5Botan20GOST_3410_PrivateKey26pkcs8_algorithm_identifierEv called 26 returned 100% blocks executed 100% 26: 93: AlgorithmIdentifier pkcs8_algorithm_identifier() const override 26: 94: { return EC_PublicKey::algorithm_identifier(); } call 0 returned 100% -: 95: -: 96: std::unique_ptr -: 97: create_signature_op(RandomNumberGenerator& rng, -: 98: const std::string& params, -: 99: const std::string& provider) const override; -: 100: }; -: 101: -: 102:} -: 103: -: 104:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#utils#os_utils.cpp.gcov -: 0:Source:src/lib/utils/os_utils.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_os_utils.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_os_utils.gcda -: 0:Runs:2960 -: 1:/* -: 2:* OS and machine specific utility functions -: 3:* (C) 2015,2016,2017,2018 Jack Lloyd -: 4:* (C) 2016 Daniel Neus -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:#include -: 15:#include -: 16:#include -: 17: -: 18:#if defined(BOTAN_TARGET_OS_HAS_THREADS) -: 19: #include -: 20:#endif -: 21: -: 22:#if defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO) -: 23: #include -: 24:#endif -: 25: -: 26:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) -: 27: #include -: 28: #include -: 29: #include -: 30: #include -: 31: #include -: 32: #include -: 33: #include -: 34: #include -: 35: #include -: 36: #undef B0 -: 37:#endif -: 38: -: 39:#if defined(BOTAN_TARGET_OS_IS_EMSCRIPTEN) -: 40: #include -: 41:#endif -: 42: -: 43:#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL) || defined(BOTAN_TARGET_OS_IS_ANDROID) || \ -: 44: defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO) -: 45: #include -: 46:#endif -: 47: -: 48:#if defined(BOTAN_TARGET_OS_HAS_WIN32) -: 49: #define NOMINMAX 1 -: 50: #define _WINSOCKAPI_ // stop windows.h including winsock.h -: 51: #include -: 52:#endif -: 53: -: 54:#if defined(BOTAN_TARGET_OS_IS_ANDROID) -: 55: #include -: 56: extern "C" char **environ; -: 57:#endif -: 58: -: 59:#if defined(BOTAN_TARGET_OS_IS_IOS) || defined(BOTAN_TARGET_OS_IS_MACOS) -: 60: #include -: 61:#endif -: 62: -: 63:namespace Botan { -: 64: -: 65:// Not defined in OS namespace for historical reasons function _ZN5Botan19secure_scrub_memoryEPvm called 190195797 returned 100% blocks executed 100% 190195797: 66:void secure_scrub_memory(void* ptr, size_t n) -: 67: { -: 68:#if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY) -: 69: ::RtlSecureZeroMemory(ptr, n); -: 70: -: 71:#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO) -: 72: ::explicit_bzero(ptr, n); -: 73: -: 74:#elif defined(BOTAN_TARGET_OS_HAS_EXPLICIT_MEMSET) -: 75: (void)::explicit_memset(ptr, 0, n); -: 76: -: 77:#elif defined(BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO) && (BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO == 1) -: 78: /* -: 79: Call memset through a static volatile pointer, which the compiler -: 80: should not elide. This construct should be safe in conforming -: 81: compilers, but who knows. I did confirm that on x86-64 GCC 6.1 and -: 82: Clang 3.8 both create code that saves the memset address in the -: 83: data segment and unconditionally loads and jumps to that address. -: 84: */ 190195797: 85: static void* (*const volatile memset_ptr)(void*, int, size_t) = std::memset; 190195797: 86: (memset_ptr)(ptr, 0, n); call 0 returned 100% -: 87:#else -: 88: -: 89: volatile uint8_t* p = reinterpret_cast(ptr); -: 90: -: 91: for(size_t i = 0; i != n; ++i) -: 92: p[i] = 0; -: 93:#endif 190195797: 94: } -: 95: function _ZN5Botan2OS14get_process_idEv called 199417 returned 100% blocks executed 100% 199417: 96:uint32_t OS::get_process_id() -: 97: { -: 98:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) 199417: 99: return ::getpid(); call 0 returned 100% -: 100:#elif defined(BOTAN_TARGET_OS_HAS_WIN32) -: 101: return ::GetCurrentProcessId(); -: 102:#elif defined(BOTAN_TARGET_OS_IS_INCLUDEOS) || defined(BOTAN_TARGET_OS_IS_LLVM) || defined(BOTAN_TARGET_OS_IS_NONE) -: 103: return 0; // truly no meaningful value -: 104:#else -: 105: #error "Missing get_process_id" -: 106:#endif -: 107: } -: 108: function _ZN5Botan2OS10get_auxvalEm called 0 returned 0% blocks executed 0% 3763*: 109:unsigned long OS::get_auxval(unsigned long id) -: 110: { -: 111:#if defined(BOTAN_TARGET_OS_HAS_GETAUXVAL) #####: 112: return ::getauxval(id); call 0 never executed -: 113:#elif defined(BOTAN_TARGET_OS_IS_ANDROID) && defined(BOTAN_TARGET_ARCH_IS_ARM32) -: 114: -: 115: if(id == 0) -: 116: return 0; -: 117: -: 118: char **p = environ; -: 119: -: 120: while(*p++ != nullptr) -: 121: ; -: 122: -: 123: Elf32_auxv_t *e = reinterpret_cast(p); -: 124: -: 125: while(e != nullptr) -: 126: { -: 127: if(e->a_type == id) -: 128: return e->a_un.a_val; -: 129: e++; -: 130: } -: 131: -: 132: return 0; -: 133:#elif defined(BOTAN_TARGET_OS_HAS_ELF_AUX_INFO) -: 134: unsigned long auxinfo = 0; -: 135: ::elf_aux_info(id, &auxinfo, sizeof(auxinfo)); -: 136: return auxinfo; -: 137:#else -: 138: BOTAN_UNUSED(id); -: 139: return 0; -: 140:#endif -: 141: } -: 142: function _ZN5Botan2OS27running_in_privileged_stateEv called 4 returned 100% blocks executed 100% 3763: 143:bool OS::running_in_privileged_state() -: 144: { -: 145:#if defined(AT_SECURE) 4: 146: return OS::get_auxval(AT_SECURE) != 0; call 0 returned 100% -: 147:#elif defined(BOTAN_TARGET_OS_HAS_POSIX1) -: 148: return (::getuid() != ::geteuid()) || (::getgid() != ::getegid()); -: 149:#else -: 150: return false; -: 151:#endif -: 152: } -: 153: function _ZN5Botan2OS21get_cpu_cycle_counterEv called 4093166 returned 100% blocks executed 100% 4093166: 154:uint64_t OS::get_cpu_cycle_counter() -: 155: { 4093166: 156: uint64_t rtc = 0; -: 157: -: 158:#if defined(BOTAN_TARGET_OS_HAS_WIN32) -: 159: LARGE_INTEGER tv; -: 160: ::QueryPerformanceCounter(&tv); -: 161: rtc = tv.QuadPart; -: 162: -: 163:#elif defined(BOTAN_USE_GCC_INLINE_ASM) -: 164: -: 165:#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) -: 166: 4093166: 167: if(CPUID::has_rdtsc()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 168: { 4093166: 169: uint32_t rtc_low = 0, rtc_high = 0; 4093166: 170: asm volatile("rdtsc" : "=d" (rtc_high), "=a" (rtc_low)); call 0 returned 100% 4093166: 171: rtc = (static_cast(rtc_high) << 32) | rtc_low; -: 172: } -: 173: -: 174:#elif defined(BOTAN_TARGET_ARCH_IS_PPC64) -: 175: -: 176: for(;;) -: 177: { -: 178: uint32_t rtc_low = 0, rtc_high = 0, rtc_high2 = 0; -: 179: asm volatile("mftbu %0" : "=r" (rtc_high)); -: 180: asm volatile("mftb %0" : "=r" (rtc_low)); -: 181: asm volatile("mftbu %0" : "=r" (rtc_high2)); -: 182: -: 183: if(rtc_high == rtc_high2) -: 184: { -: 185: rtc = (static_cast(rtc_high) << 32) | rtc_low; -: 186: break; -: 187: } -: 188: } -: 189: -: 190:#elif defined(BOTAN_TARGET_ARCH_IS_ALPHA) -: 191: asm volatile("rpcc %0" : "=r" (rtc)); -: 192: -: 193: // OpenBSD does not trap access to the %tick register -: 194:#elif defined(BOTAN_TARGET_ARCH_IS_SPARC64) && !defined(BOTAN_TARGET_OS_IS_OPENBSD) -: 195: asm volatile("rd %%tick, %0" : "=r" (rtc)); -: 196: -: 197:#elif defined(BOTAN_TARGET_ARCH_IS_IA64) -: 198: asm volatile("mov %0=ar.itc" : "=r" (rtc)); -: 199: -: 200:#elif defined(BOTAN_TARGET_ARCH_IS_S390X) -: 201: asm volatile("stck 0(%0)" : : "a" (&rtc) : "memory", "cc"); -: 202: -: 203:#elif defined(BOTAN_TARGET_ARCH_IS_HPPA) -: 204: asm volatile("mfctl 16,%0" : "=r" (rtc)); // 64-bit only? -: 205: -: 206:#else -: 207: //#warning "OS::get_cpu_cycle_counter not implemented" -: 208:#endif -: 209: -: 210:#endif -: 211: 4093166: 212: return rtc; -: 213: } -: 214: function _ZN5Botan2OS13get_cpu_totalEv called 1 returned 100% blocks executed 67% 1: 215:size_t OS::get_cpu_total() -: 216: { -: 217:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(_SC_NPROCESSORS_CONF) 1: 218: const long res = ::sysconf(_SC_NPROCESSORS_CONF); call 0 returned 100% 1: 219: if(res > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 220: return static_cast(res); -: 221:#endif -: 222: -: 223:#if defined(BOTAN_TARGET_OS_HAS_THREADS) #####: 224: return static_cast(std::thread::hardware_concurrency()); call 0 never executed -: 225:#else -: 226: return 1; -: 227:#endif -: 228: } -: 229: function _ZN5Botan2OS17get_cpu_availableEv called 823 returned 100% blocks executed 80% 823: 230:size_t OS::get_cpu_available() -: 231: { -: 232:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(_SC_NPROCESSORS_ONLN) 823: 233: const long res = ::sysconf(_SC_NPROCESSORS_ONLN); call 0 returned 100% 823: 234: if(res > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% 823: 235: return static_cast(res); -: 236:#endif -: 237: #####: 238: return OS::get_cpu_total(); call 0 never executed -: 239: } -: 240: function _ZN5Botan2OS25get_high_resolution_clockEv called 10457 returned 100% blocks executed 27% 10457: 241:uint64_t OS::get_high_resolution_clock() -: 242: { 10457: 243: if(uint64_t cpu_clock = OS::get_cpu_cycle_counter()) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 244: return cpu_clock; -: 245: -: 246:#if defined(BOTAN_TARGET_OS_IS_EMSCRIPTEN) -: 247: return emscripten_get_now(); -: 248:#endif -: 249: -: 250: /* -: 251: If we got here either we either don't have an asm instruction -: 252: above, or (for x86) RDTSC is not available at runtime. Try some -: 253: clock_gettimes and return the first one that works, or otherwise -: 254: fall back to std::chrono. -: 255: */ -: 256: -: 257:#if defined(BOTAN_TARGET_OS_HAS_CLOCK_GETTIME) -: 258: -: 259: // The ordering here is somewhat arbitrary... #####: 260: const clockid_t clock_types[] = { -: 261:#if defined(CLOCK_MONOTONIC_HR) -: 262: CLOCK_MONOTONIC_HR, -: 263:#endif -: 264:#if defined(CLOCK_MONOTONIC_RAW) -: 265: CLOCK_MONOTONIC_RAW, -: 266:#endif -: 267:#if defined(CLOCK_MONOTONIC) -: 268: CLOCK_MONOTONIC, -: 269:#endif -: 270:#if defined(CLOCK_PROCESS_CPUTIME_ID) -: 271: CLOCK_PROCESS_CPUTIME_ID, -: 272:#endif -: 273:#if defined(CLOCK_THREAD_CPUTIME_ID) -: 274: CLOCK_THREAD_CPUTIME_ID, -: 275:#endif -: 276: }; -: 277: #####: 278: for(clockid_t clock : clock_types) branch 0 never executed branch 1 never executed -: 279: { #####: 280: struct timespec ts; #####: 281: if(::clock_gettime(clock, &ts) == 0) call 0 never executed branch 1 never executed branch 2 never executed -: 282: { #####: 283: return (static_cast(ts.tv_sec) * 1000000000) + static_cast(ts.tv_nsec); -: 284: } -: 285: } -: 286:#endif -: 287: -: 288: // Plain C++11 fallback #####: 289: auto now = std::chrono::high_resolution_clock::now().time_since_epoch(); call 0 never executed #####: 290: return std::chrono::duration_cast(now).count(); -: 291: } -: 292: function _ZN5Botan2OS23get_system_timestamp_nsEv called 4083758 returned 100% blocks executed 67% 4083758: 293:uint64_t OS::get_system_timestamp_ns() -: 294: { -: 295:#if defined(BOTAN_TARGET_OS_HAS_CLOCK_GETTIME) 4083758: 296: struct timespec ts; 4083758: 297: if(::clock_gettime(CLOCK_REALTIME, &ts) == 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 298: { 4083758: 299: return (static_cast(ts.tv_sec) * 1000000000) + static_cast(ts.tv_nsec); -: 300: } -: 301:#endif -: 302: #####: 303: auto now = std::chrono::system_clock::now().time_since_epoch(); call 0 never executed #####: 304: return std::chrono::duration_cast(now).count(); -: 305: } -: 306: function _ZN5Botan2OS16system_page_sizeEv called 2928 returned 100% blocks executed 100% 195450: 307:size_t OS::system_page_size() -: 308: { 195450: 309: const size_t default_page_size = 4096; -: 310: -: 311:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) 2928: 312: long p = ::sysconf(_SC_PAGESIZE); call 0 returned 100% 195450: 313: if(p > 1) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 100% (fallthrough) branch 9 taken 0% 195450: 314: return static_cast(p); -: 315: else -: 316: return default_page_size; -: 317:#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 318: BOTAN_UNUSED(default_page_size); -: 319: SYSTEM_INFO sys_info; -: 320: ::GetSystemInfo(&sys_info); -: 321: return sys_info.dwPageSize; -: 322:#else -: 323: return default_page_size; -: 324:#endif -: 325: } -: 326: function _ZN5Botan2OS24get_memory_locking_limitEv called 2928 returned 100% blocks executed 62% 2928: 327:size_t OS::get_memory_locking_limit() -: 328: { -: 329:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) && defined(RLIMIT_MEMLOCK) -: 330: /* -: 331: * If RLIMIT_MEMLOCK is not defined, likely the OS does not support -: 332: * unprivileged mlock calls. -: 333: * -: 334: * Linux defaults to only 64 KiB of mlockable memory per process -: 335: * (too small) but BSDs offer a small fraction of total RAM (more -: 336: * than we need). Bound the total mlock size to 512 KiB which is -: 337: * enough to run the entire test suite without spilling to non-mlock -: 338: * memory (and thus presumably also enough for many useful -: 339: * programs), but small enough that we should not cause problems -: 340: * even if many processes are mlocking on the same machine. -: 341: */ 2928: 342: const size_t user_req = read_env_variable_sz("BOTAN_MLOCK_POOL_SIZE", BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB); 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% -: 343: 2928: 344: const size_t mlock_requested = std::min(user_req, BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 345: 2928: 346: if(mlock_requested > 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 347: { 2917: 348: struct ::rlimit limits; -: 349: 2917: 350: ::getrlimit(RLIMIT_MEMLOCK, &limits); call 0 returned 100% -: 351: 2917: 352: if(limits.rlim_cur < limits.rlim_max) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 353: { #####: 354: limits.rlim_cur = limits.rlim_max; #####: 355: ::setrlimit(RLIMIT_MEMLOCK, &limits); call 0 never executed #####: 356: ::getrlimit(RLIMIT_MEMLOCK, &limits); call 0 never executed -: 357: } -: 358: 2917: 359: return std::min(limits.rlim_cur, mlock_requested * 1024); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 360: } -: 361: -: 362:#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 363: SIZE_T working_min = 0, working_max = 0; -: 364: if(!::GetProcessWorkingSetSize(::GetCurrentProcess(), &working_min, &working_max)) -: 365: { -: 366: return 0; -: 367: } -: 368: -: 369: // According to Microsoft MSDN: -: 370: // The maximum number of pages that a process can lock is equal to the number of pages in its minimum working set minus a small overhead -: 371: // In the book "Windows Internals Part 2": the maximum lockable pages are minimum working set size - 8 pages -: 372: // But the information in the book seems to be inaccurate/outdated -: 373: // I've tested this on Windows 8.1 x64, Windows 10 x64 and Windows 7 x86 -: 374: // On all three OS the value is 11 instead of 8 -: 375: const size_t overhead = OS::system_page_size() * 11; -: 376: if(working_min > overhead) -: 377: { -: 378: const size_t lockable_bytes = working_min - overhead; -: 379: return std::min(lockable_bytes, BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB * 1024); -: 380: } -: 381:#endif -: 382: -: 383: // Not supported on this platform -: 384: return 0; -: 385: } -: 386: function _ZN5Botan2OS17read_env_variableERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS6_ called 3759 returned 100% blocks executed 100% 3759: 387:bool OS::read_env_variable(std::string& value_out, const std::string& name) -: 388: { 3759: 389: value_out = ""; call 0 returned 100% -: 390: 3759: 391: if(running_in_privileged_state()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 392: return false; -: 393: -: 394:#if defined(BOTAN_TARGET_OS_HAS_WIN32) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) -: 395: char val[128] = { 0 }; -: 396: size_t req_size = 0; -: 397: if(getenv_s(&req_size, val, sizeof(val), name.c_str()) == 0) -: 398: { -: 399: value_out = std::string(val, req_size); -: 400: return true; -: 401: } -: 402:#else 3759: 403: if(const char* val = std::getenv(name.c_str())) call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% -: 404: { 11: 405: value_out = val; call 0 returned 100% 11: 406: return true; call 0 returned 100% -: 407: } -: 408:#endif -: 409: -: 410: return false; -: 411: } -: 412: function _ZN5Botan2OS20read_env_variable_szERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm called 3747 returned 100% blocks executed 40% 3747: 413:size_t OS::read_env_variable_sz(const std::string& name, size_t def) -: 414: { 7494: 415: std::string value; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3747: 416: if(read_env_variable(value, name)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 1% (fallthrough) branch 4 taken 100% -: 417: { 11: 418: try -: 419: { 3747: 420: const size_t val = std::stoul(value, nullptr); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 421: return val; -: 422: } =====: 423: catch(std::exception&) { /* ignore it */ } call 0 never executed call 1 never executed -: 424: } -: 425: -: 426: return def; -: 427: } -: 428: -: 429:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) -: 430: -: 431:namespace { -: 432: 2917: 433:int get_locked_fd() -: 434: { -: 435:#if defined(BOTAN_TARGET_OS_IS_IOS) || defined(BOTAN_TARGET_OS_IS_MACOS) -: 436: // On Darwin, tagging anonymous pages allows vmmap to track these. -: 437: // Allowed from 240 to 255 for userland applications -: 438: static constexpr int default_locked_fd = 255; -: 439: int locked_fd = default_locked_fd; -: 440: -: 441: if(size_t locked_fdl = OS::read_env_variable_sz("BOTAN_LOCKED_FD", default_locked_fd)) -: 442: { -: 443: if(locked_fdl < 240 || locked_fdl > 255) -: 444: { -: 445: locked_fdl = default_locked_fd; -: 446: } -: 447: locked_fd = static_cast(locked_fdl); -: 448: } -: 449: return VM_MAKE_TAG(locked_fd); -: 450:#else 2917: 451: return -1; -: 452:#endif -: 453: } -: 454: -: 455:} -: 456: -: 457:#endif -: 458: function _ZN5Botan2OS21allocate_locked_pagesEm called 2917 returned 100% blocks executed 79% 2917: 459:std::vector OS::allocate_locked_pages(size_t count) -: 460: { 2917: 461: std::vector result; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 462: -: 463:#if (defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK)) || defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 464: 2917: 465: result.reserve(count); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 466: 2917: 467: const size_t page_size = OS::system_page_size(); call 0 returned 100% -: 468: -: 469:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) 2917: 470: static const int locked_fd = get_locked_fd(); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% call 5 returned 100% -: 471:#endif -: 472: 49589: 473: for(size_t i = 0; i != count; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 474: { 46672: 475: void* ptr = nullptr; -: 476: -: 477:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) -: 478: -: 479:#if !defined(MAP_ANONYMOUS) -: 480: #define MAP_ANONYMOUS MAP_ANON -: 481:#endif -: 482: -: 483:#if !defined(MAP_NOCORE) -: 484:#if defined(MAP_CONCEAL) -: 485: #define MAP_NOCORE MAP_CONCEAL -: 486:#else -: 487: #define MAP_NOCORE 0 -: 488:#endif -: 489:#endif -: 490: -: 491:#if !defined(PROT_MAX) -: 492: #define PROT_MAX(p) 0 -: 493:#endif 46672: 494: const int pflags = PROT_READ | PROT_WRITE; -: 495: 46672: 496: ptr = ::mmap(nullptr, 3*page_size, call 0 returned 100% -: 497: pflags | PROT_MAX(pflags), -: 498: MAP_ANONYMOUS | MAP_PRIVATE | MAP_NOCORE, -: 499: /*fd=*/locked_fd, /*offset=*/0); -: 500: 46672*: 501: if(ptr == MAP_FAILED) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 502: { #####: 503: continue; -: 504: } -: 505: -: 506: // lock the data page 46672*: 507: if(::mlock(static_cast(ptr) + page_size, page_size) != 0) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 508: { #####: 509: ::munmap(ptr, 3*page_size); call 0 never executed #####: 510: continue; -: 511: } -: 512: -: 513:#if defined(MADV_DONTDUMP) -: 514: // we ignore errors here, as DONTDUMP is just a bonus 46672: 515: ::madvise(static_cast(ptr) + page_size, page_size, MADV_DONTDUMP); call 0 returned 100% -: 516:#endif -: 517: -: 518:#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 519: ptr = ::VirtualAlloc(nullptr, 3*page_size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); -: 520: -: 521: if(ptr == nullptr) -: 522: continue; -: 523: -: 524: if(::VirtualLock(static_cast(ptr) + page_size, page_size) == 0) -: 525: { -: 526: ::VirtualFree(ptr, 0, MEM_RELEASE); -: 527: continue; -: 528: } -: 529:#endif -: 530: 46672: 531: std::memset(ptr, 0, 3*page_size); // zero data page and both guard pages call 0 returned 100% -: 532: -: 533: // Make guard page preceeding the data page 46672: 534: page_prohibit_access(static_cast(ptr)); call 0 returned 100% -: 535: // Make guard page following the data page 46672: 536: page_prohibit_access(static_cast(ptr) + 2*page_size); call 0 returned 100% -: 537: 46672: 538: result.push_back(static_cast(ptr) + page_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 539: } -: 540:#else -: 541: BOTAN_UNUSED(count); -: 542:#endif -: 543: 2917: 544: return result; -: 545: } -: 546: function _ZN5Botan2OS17page_allow_accessEPv called 93344 returned 100% blocks executed 100% 93344: 547:void OS::page_allow_access(void* page) -: 548: { -: 549:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) 93344: 550: const size_t page_size = OS::system_page_size(); call 0 returned 100% 93344: 551: ::mprotect(page, page_size, PROT_READ | PROT_WRITE); call 0 returned 100% -: 552:#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 553: const size_t page_size = OS::system_page_size(); -: 554: DWORD old_perms = 0; -: 555: ::VirtualProtect(page, page_size, PAGE_READWRITE, &old_perms); -: 556: BOTAN_UNUSED(old_perms); -: 557:#else -: 558: BOTAN_UNUSED(page); -: 559:#endif 93344: 560: } -: 561: function _ZN5Botan2OS20page_prohibit_accessEPv called 93344 returned 100% blocks executed 100% 93344: 562:void OS::page_prohibit_access(void* page) -: 563: { -: 564:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) 93344: 565: const size_t page_size = OS::system_page_size(); call 0 returned 100% 93344: 566: ::mprotect(page, page_size, PROT_NONE); call 0 returned 100% -: 567:#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 568: const size_t page_size = OS::system_page_size(); -: 569: DWORD old_perms = 0; -: 570: ::VirtualProtect(page, page_size, PAGE_NOACCESS, &old_perms); -: 571: BOTAN_UNUSED(old_perms); -: 572:#else -: 573: BOTAN_UNUSED(page); -: 574:#endif 93344: 575: } -: 576: function _ZN5Botan2OS17free_locked_pagesERKSt6vectorIPvSaIS2_EE called 2917 returned 100% blocks executed 100% 2917: 577:void OS::free_locked_pages(const std::vector& pages) -: 578: { 2917: 579: const size_t page_size = OS::system_page_size(); call 0 returned 100% -: 580: 49589: 581: for(size_t i = 0; i != pages.size(); ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 582: { 46672: 583: void* ptr = pages[i]; call 0 returned 100% -: 584: 46672: 585: secure_scrub_memory(ptr, page_size); call 0 returned 100% -: 586: -: 587: // ptr points to the data page, guard pages are before and after 46672: 588: page_allow_access(static_cast(ptr) - page_size); call 0 returned 100% 46672: 589: page_allow_access(static_cast(ptr) + page_size); call 0 returned 100% -: 590: -: 591:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) 46672: 592: ::munlock(ptr, page_size); call 0 returned 100% 46672: 593: ::munmap(static_cast(ptr) - page_size, 3*page_size); call 0 returned 100% -: 594:#elif defined(BOTAN_TARGET_OS_HAS_VIRTUAL_LOCK) -: 595: ::VirtualUnlock(ptr, page_size); -: 596: ::VirtualFree(static_cast(ptr) - page_size, 0, MEM_RELEASE); -: 597:#endif -: 598: } 2917: 599: } -: 600: -: 601:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && !defined(BOTAN_TARGET_OS_IS_EMSCRIPTEN) -: 602: -: 603:namespace { -: 604: -: 605:static ::sigjmp_buf g_sigill_jmp_buf; -: 606: function _ZN5Botan12_GLOBAL__N_120botan_sigill_handlerEi called 1 returned 0% blocks executed 100% 1: 607:void botan_sigill_handler(int) -: 608: { 1: 609: siglongjmp(g_sigill_jmp_buf, /*non-zero return value*/1); -: 610: } -: 611: -: 612:} -: 613: -: 614:#endif -: 615: function _ZN5Botan2OS25run_cpu_instruction_probeESt8functionIFivEE called 3 returned 67% blocks executed 33% 2: 616:int OS::run_cpu_instruction_probe(std::function probe_fn) -: 617: { 2: 618: volatile int probe_result = -3; -: 619: -: 620:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && !defined(BOTAN_TARGET_OS_IS_EMSCRIPTEN) 2: 621: struct sigaction old_sigaction; 2: 622: struct sigaction sigaction; -: 623: 2: 624: sigaction.sa_handler = botan_sigill_handler; 2: 625: sigemptyset(&sigaction.sa_mask); call 0 returned 100% 2: 626: sigaction.sa_flags = 0; -: 627: 2: 628: int rc = ::sigaction(SIGILL, &sigaction, &old_sigaction); call 0 returned 100% -: 629: 2: 630: if(rc != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 631: throw System_Error("run_cpu_instruction_probe sigaction failed", errno); 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 -: 632: 3: 633: rc = sigsetjmp(g_sigill_jmp_buf, /*save sigs*/1); -: 634: 3: 635: if(rc == 0) branch 0 taken 67% (fallthrough) branch 1 taken 33% -: 636: { -: 637: // first call to sigsetjmp 3: 638: probe_result = probe_fn(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 639: } 1: 640: else if(rc == 1) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 641: { -: 642: // non-local return from siglongjmp in signal handler: return error 1: 643: probe_result = -1; -: 644: } -: 645: -: 646: // Restore old SIGILL handler, if any 2: 647: rc = ::sigaction(SIGILL, &old_sigaction, nullptr); call 0 returned 100% 2: 648: if(rc != 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 649: throw System_Error("run_cpu_instruction_probe sigaction restore failed", errno); 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 -: 650: -: 651:#else -: 652: BOTAN_UNUSED(probe_fn); -: 653:#endif -: 654: 2: 655: return probe_result; -: 656: } -: 657: function _ZN5Botan2OS25suppress_echo_on_terminalEv called 0 returned 0% blocks executed 0% #####: 658:std::unique_ptr OS::suppress_echo_on_terminal() -: 659: { -: 660:#if defined(BOTAN_TARGET_OS_HAS_POSIX1) #####: 661: class POSIX_Echo_Suppression : public Echo_Suppression -: 662: { -: 663: public: function _ZZN5Botan2OS25suppress_echo_on_terminalEvEN22POSIX_Echo_SuppressionC2Ev called 0 returned 0% blocks executed 0% #####: 664: POSIX_Echo_Suppression() #####: 665: { call 0 never executed #####: 666: m_stdin_fd = fileno(stdin); call 0 never executed #####: 667: if(::tcgetattr(m_stdin_fd, &m_old_termios) != 0) call 0 never executed branch 1 never executed branch 2 never executed #####: 668: throw System_Error("Getting terminal status failed", errno); 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 -: 669: #####: 670: struct termios noecho_flags = m_old_termios; #####: 671: noecho_flags.c_lflag &= ~ECHO; #####: 672: noecho_flags.c_lflag |= ECHONL; -: 673: #####: 674: if(::tcsetattr(m_stdin_fd, TCSANOW, &noecho_flags) != 0) call 0 never executed branch 1 never executed branch 2 never executed #####: 675: throw System_Error("Clearing terminal echo bit failed", errno); 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 #####: 676: } -: 677: function _ZZN5Botan2OS25suppress_echo_on_terminalEvEN22POSIX_Echo_Suppression13reenable_echoEv called 0 returned 0% blocks executed 0% #####: 678: void reenable_echo() override -: 679: { #####: 680: if(m_stdin_fd > 0) branch 0 never executed branch 1 never executed -: 681: { #####: 682: if(::tcsetattr(m_stdin_fd, TCSANOW, &m_old_termios) != 0) call 0 never executed branch 1 never executed branch 2 never executed #####: 683: throw System_Error("Restoring terminal echo bit failed", errno); 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 #####: 684: m_stdin_fd = -1; -: 685: } #####: 686: } -: 687: #####: 688: ~POSIX_Echo_Suppression() #####: 689: { #####: 690: try -: 691: { #####: 692: reenable_echo(); -: 693: } =====: 694: catch(...) -: 695: { -: 696: } #####: 697: } ------------------ _ZZN5Botan2OS25suppress_echo_on_terminalEvEN22POSIX_Echo_SuppressionD0Ev: function _ZZN5Botan2OS25suppress_echo_on_terminalEvEN22POSIX_Echo_SuppressionD0Ev called 0 returned 0% blocks executed 0% #####: 688: ~POSIX_Echo_Suppression() -: 689: { -: 690: try -: 691: { -: 692: reenable_echo(); -: 693: } -: 694: catch(...) -: 695: { -: 696: } #####: 697: } call 0 never executed call 1 never executed ------------------ _ZZN5Botan2OS25suppress_echo_on_terminalEvEN22POSIX_Echo_SuppressionD2Ev: function _ZZN5Botan2OS25suppress_echo_on_terminalEvEN22POSIX_Echo_SuppressionD2Ev called 0 returned 0% blocks executed 0% #####: 688: ~POSIX_Echo_Suppression() #####: 689: { #####: 690: try -: 691: { #####: 692: reenable_echo(); call 0 never executed branch 1 never executed branch 2 never executed -: 693: } =====: 694: catch(...) call 0 never executed -: 695: { -: 696: } #####: 697: } ------------------ -: 698: -: 699: private: -: 700: int m_stdin_fd; -: 701: struct termios m_old_termios; -: 702: }; -: 703: #####: 704: return std::unique_ptr(new POSIX_Echo_Suppression); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 705: -: 706:#elif defined(BOTAN_TARGET_OS_HAS_WIN32) -: 707: -: 708: class Win32_Echo_Suppression : public Echo_Suppression -: 709: { -: 710: public: -: 711: Win32_Echo_Suppression() -: 712: { -: 713: m_input_handle = ::GetStdHandle(STD_INPUT_HANDLE); -: 714: if(::GetConsoleMode(m_input_handle, &m_console_state) == 0) -: 715: throw System_Error("Getting console mode failed", ::GetLastError()); -: 716: -: 717: DWORD new_mode = ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT; -: 718: if(::SetConsoleMode(m_input_handle, new_mode) == 0) -: 719: throw System_Error("Setting console mode failed", ::GetLastError()); -: 720: } -: 721: -: 722: void reenable_echo() override -: 723: { -: 724: if(m_input_handle != INVALID_HANDLE_VALUE) -: 725: { -: 726: if(::SetConsoleMode(m_input_handle, m_console_state) == 0) -: 727: throw System_Error("Setting console mode failed", ::GetLastError()); -: 728: m_input_handle = INVALID_HANDLE_VALUE; -: 729: } -: 730: } -: 731: -: 732: ~Win32_Echo_Suppression() -: 733: { -: 734: try -: 735: { -: 736: reenable_echo(); -: 737: } -: 738: catch(...) -: 739: { -: 740: } -: 741: } -: 742: -: 743: private: -: 744: HANDLE m_input_handle; -: 745: DWORD m_console_state; -: 746: }; -: 747: -: 748: return std::unique_ptr(new Win32_Echo_Suppression); -: 749: -: 750:#else -: 751: -: 752: // Not supported on this platform, return null -: 753: return std::unique_ptr(); -: 754:#endif -: 755: } -: 756: -: 757:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#prov#pkcs11#p11_ecc_key.cpp.gcov -: 0:Source:src/lib/prov/pkcs11/p11_ecc_key.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/prov_pkcs11_p11_ecc_key.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/prov_pkcs11_p11_ecc_key.gcda -: 0:Runs:2960 -: 1:/* -: 2:* PKCS#11 ECC -: 3:* (C) 2016 Daniel Neus, Sirrix AG -: 4:* (C) 2016 Philipp Weber, Sirrix AG -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11: -: 12:#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO) -: 13: -: 14:#include -: 15:#include -: 16: -: 17:namespace Botan { -: 18:namespace PKCS11 { -: 19:namespace { -: 20:/// Converts a DER-encoded ANSI X9.62 ECPoint to PointGFp function _ZN5Botan6PKCS1112_GLOBAL__N_119decode_public_pointERKSt6vectorIhNS_16secure_allocatorIhEEERKNS_8EC_GroupE called 11 returned 100% blocks executed 64% 11: 21:PointGFp decode_public_point(const secure_vector& ec_point_data, const EC_Group& group) -: 22: { 11: 23: secure_vector ec_point; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 22: 24: BER_Decoder(ec_point_data).decode(ec_point, OCTET_STRING); 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 22: 25: return group.OS2ECP(ec_point); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 26: } -: 27:} -: 28: function _ZN5Botan6PKCS1132EC_PublicKeyGenerationPropertiesC2ERKSt6vectorIhSaIhEE called 11 returned 100% blocks executed 55% 11: 29:EC_PublicKeyGenerationProperties::EC_PublicKeyGenerationProperties(const std::vector& ec_params) 11: 30: : PublicKeyProperties(KeyType::Ec), m_ec_params(ec_params) 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 call 6 never executed -: 31: { 11: 32: add_binary(AttributeType::EcParams, m_ec_params); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 11: 33: } -: 34: function _ZN5Botan6PKCS1128EC_PublicKeyImportPropertiesC2ERKSt6vectorIhSaIhEES6_ called 4 returned 100% blocks executed 50% 4: 35:EC_PublicKeyImportProperties::EC_PublicKeyImportProperties(const std::vector& ec_params, 4: 36: const std::vector& ec_point) 4: 37: : PublicKeyProperties(KeyType::Ec), m_ec_params(ec_params), m_ec_point(ec_point) 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 never executed branch 8 never executed branch 9 never executed branch 10 never executed call 11 never executed -: 38: { 4: 39: add_binary(AttributeType::EcParams, m_ec_params); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 40: add_binary(AttributeType::EcPoint, m_ec_point); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 41: } -: 42: 9*: 43:PKCS11_EC_PublicKey::PKCS11_EC_PublicKey(Session& session, ObjectHandle handle) 9*: 44: : Object(session, handle) -: 45: { 9*: 46: secure_vector ec_parameters = get_attribute_value(AttributeType::EcParams); 9*: 47: m_domain_params = EC_Group(unlock(ec_parameters)); 18*: 48: m_public_key = decode_public_point(get_attribute_value(AttributeType::EcPoint), m_domain_params); 9*: 49: m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT; 9*: 50: } ------------------ _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC1ERNS0_7SessionEm: function _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC1ERNS0_7SessionEm called 0 returned 0% blocks executed 0% #####: 43:PKCS11_EC_PublicKey::PKCS11_EC_PublicKey(Session& session, ObjectHandle handle) #####: 44: : Object(session, handle) call 0 never executed -: 45: { #####: 46: secure_vector ec_parameters = get_attribute_value(AttributeType::EcParams); call 0 never executed branch 1 never executed branch 2 never executed #####: 47: m_domain_params = EC_Group(unlock(ec_parameters)); 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 call 8 never executed branch 9 never executed branch 10 never executed #####: 48: m_public_key = decode_public_point(get_attribute_value(AttributeType::EcPoint), m_domain_params); 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 call 8 never executed branch 9 never executed branch 10 never executed call 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed #####: 49: m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT; branch 0 never executed branch 1 never executed #####: 50: } ------------------ _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC2ERNS0_7SessionEm: function _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC2ERNS0_7SessionEm called 9 returned 100% blocks executed 59% 9: 43:PKCS11_EC_PublicKey::PKCS11_EC_PublicKey(Session& session, ObjectHandle handle) 9: 44: : Object(session, handle) call 0 returned 100% -: 45: { 9: 46: secure_vector ec_parameters = get_attribute_value(AttributeType::EcParams); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 9: 47: m_domain_params = EC_Group(unlock(ec_parameters)); 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 returned 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% 18: 48: m_public_key = decode_public_point(get_attribute_value(AttributeType::EcPoint), m_domain_params); 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% call 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed 9: 49: m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT; branch 0 taken 100% (fallthrough) branch 1 taken 0% 9: 50: } ------------------ -: 51: 4*: 52:PKCS11_EC_PublicKey::PKCS11_EC_PublicKey(Session& session, const EC_PublicKeyImportProperties& props) 4*: 53: : Object(session, props) -: 54: { 4*: 55: m_domain_params = EC_Group(props.ec_params()); -: 56: 4*: 57: secure_vector ec_point; 8*: 58: BER_Decoder(props.ec_point()).decode(ec_point, OCTET_STRING); 8*: 59: m_public_key = m_domain_params.OS2ECP(ec_point); 4*: 60: m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT; 4*: 61: } ------------------ _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC1ERNS0_7SessionERKNS0_28EC_PublicKeyImportPropertiesE: function _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC1ERNS0_7SessionERKNS0_28EC_PublicKeyImportPropertiesE called 0 returned 0% blocks executed 0% #####: 52:PKCS11_EC_PublicKey::PKCS11_EC_PublicKey(Session& session, const EC_PublicKeyImportProperties& props) #####: 53: : Object(session, props) call 0 never executed -: 54: { #####: 55: m_domain_params = EC_Group(props.ec_params()); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed -: 56: #####: 57: secure_vector ec_point; call 0 never executed branch 1 never executed branch 2 never executed #####: 58: BER_Decoder(props.ec_point()).decode(ec_point, OCTET_STRING); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed call 4 never executed #####: 59: m_public_key = m_domain_params.OS2ECP(ec_point); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed call 6 never executed branch 7 never executed branch 8 never executed #####: 60: m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT; branch 0 never executed branch 1 never executed #####: 61: } ------------------ _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC2ERNS0_7SessionERKNS0_28EC_PublicKeyImportPropertiesE: function _ZN5Botan6PKCS1119PKCS11_EC_PublicKeyC2ERNS0_7SessionERKNS0_28EC_PublicKeyImportPropertiesE called 4 returned 100% blocks executed 64% 4: 52:PKCS11_EC_PublicKey::PKCS11_EC_PublicKey(Session& session, const EC_PublicKeyImportProperties& props) 4: 53: : Object(session, props) call 0 returned 100% -: 54: { 4: 55: m_domain_params = EC_Group(props.ec_params()); 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 returned 100% -: 56: 4: 57: secure_vector ec_point; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 58: BER_Decoder(props.ec_point()).decode(ec_point, OCTET_STRING); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 8: 59: m_public_key = m_domain_params.OS2ECP(ec_point); 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% call 6 never executed branch 7 never executed branch 8 never executed 4: 60: m_domain_encoding = EC_DOMPAR_ENC_EXPLICIT; branch 0 taken 100% (fallthrough) branch 1 taken 0% 4: 61: } ------------------ -: 62: function _ZN5Botan6PKCS1129EC_PrivateKeyImportPropertiesC2ERKSt6vectorIhSaIhEERKNS_6BigIntE called 4 returned 100% blocks executed 50% 4: 63:EC_PrivateKeyImportProperties::EC_PrivateKeyImportProperties(const std::vector& ec_params, const BigInt& value) 4: 64: : PrivateKeyProperties(KeyType::Ec), m_ec_params(ec_params), m_value(value) 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 never executed branch 8 never executed call 9 never executed -: 65: { 4: 66: add_binary(AttributeType::EcParams, m_ec_params); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 67: add_binary(AttributeType::Value, BigInt::encode(m_value)); 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 4: 68: } -: 69: 9*: 70:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, ObjectHandle handle) 9*: 71: : Object(session, handle), m_domain_params(), m_public_key() -: 72: { 9*: 73: secure_vector ec_parameters = get_attribute_value(AttributeType::EcParams); 27*: 74: m_domain_params = EC_Group(unlock(ec_parameters)); 9*: 75: } ------------------ _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC1ERNS0_7SessionEm: function _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC1ERNS0_7SessionEm called 0 returned 0% blocks executed 0% #####: 70:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, ObjectHandle handle) #####: 71: : Object(session, handle), m_domain_params(), m_public_key() call 0 never executed call 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed call 6 never executed -: 72: { #####: 73: secure_vector ec_parameters = get_attribute_value(AttributeType::EcParams); call 0 never executed branch 1 never executed branch 2 never executed #####: 74: m_domain_params = EC_Group(unlock(ec_parameters)); 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 branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed #####: 75: } ------------------ _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC2ERNS0_7SessionEm: function _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC2ERNS0_7SessionEm called 9 returned 100% blocks executed 56% 9: 70:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, ObjectHandle handle) 9: 71: : Object(session, handle), m_domain_params(), m_public_key() call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 never executed call 6 never executed -: 72: { 9: 73: secure_vector ec_parameters = get_attribute_value(AttributeType::EcParams); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 27: 74: m_domain_params = EC_Group(unlock(ec_parameters)); 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 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 100% (fallthrough) branch 9 taken 0% branch 10 never executed branch 11 never executed 9: 75: } ------------------ -: 76: 4*: 77:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, const EC_PrivateKeyImportProperties& props) 4*: 78: : Object(session, props) -: 79: { 4*: 80: m_domain_params = EC_Group(props.ec_params()); 4*: 81: } ------------------ _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC1ERNS0_7SessionERKNS0_29EC_PrivateKeyImportPropertiesE: function _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC1ERNS0_7SessionERKNS0_29EC_PrivateKeyImportPropertiesE called 0 returned 0% blocks executed 0% #####: 77:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, const EC_PrivateKeyImportProperties& props) #####: 78: : Object(session, props) call 0 never executed call 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed call 6 never executed -: 79: { #####: 80: m_domain_params = EC_Group(props.ec_params()); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 81: } ------------------ _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC2ERNS0_7SessionERKNS0_29EC_PrivateKeyImportPropertiesE: function _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC2ERNS0_7SessionERKNS0_29EC_PrivateKeyImportPropertiesE called 4 returned 100% blocks executed 64% 4: 77:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, const EC_PrivateKeyImportProperties& props) 4: 78: : Object(session, props) call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 never executed call 6 never executed -: 79: { 4: 80: m_domain_params = EC_Group(props.ec_params()); 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 returned 100% 4: 81: } ------------------ -: 82: 2*: 83:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, const std::vector& ec_params, #####: 84: const EC_PrivateKeyGenerationProperties& props) 2*: 85: : Object(session) -: 86: { 2*: 87: m_domain_params = EC_Group(ec_params); -: 88: 2*: 89: EC_PublicKeyGenerationProperties pub_key_props(ec_params); 2*: 90: pub_key_props.set_verify(true); 2*: 91: pub_key_props.set_private(false); 2*: 92: pub_key_props.set_token(false); // don't create a persistent public key object -: 93: 2*: 94: ObjectHandle pub_key_handle = CK_INVALID_HANDLE; 2*: 95: ObjectHandle priv_key_handle = CK_INVALID_HANDLE; 2*: 96: Mechanism mechanism = { CKM_EC_KEY_PAIR_GEN, nullptr, 0 }; 2*: 97: session.module()->C_GenerateKeyPair(session.handle(), &mechanism, 2*: 98: pub_key_props.data(), static_cast(pub_key_props.count()), 2*: 99: props.data(), static_cast(props.count()), -: 100: &pub_key_handle, &priv_key_handle); -: 101: 2*: 102: this->reset_handle(priv_key_handle); -: 103: 4*: 104: Object public_key(session, pub_key_handle); 6*: 105: m_public_key = decode_public_point(public_key.get_attribute_value(AttributeType::EcPoint), m_domain_params); 2*: 106: } ------------------ _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC1ERNS0_7SessionERKSt6vectorIhSaIhEERKNS0_33EC_PrivateKeyGenerationPropertiesE: function _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC1ERNS0_7SessionERKSt6vectorIhSaIhEERKNS0_33EC_PrivateKeyGenerationPropertiesE called 0 returned 0% blocks executed 0% #####: 83:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, const std::vector& ec_params, #####: 84: const EC_PrivateKeyGenerationProperties& props) #####: 85: : Object(session) call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 86: { #####: 87: m_domain_params = EC_Group(ec_params); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed -: 88: #####: 89: EC_PublicKeyGenerationProperties pub_key_props(ec_params); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed #####: 90: pub_key_props.set_verify(true); call 0 never executed branch 1 never executed branch 2 never executed #####: 91: pub_key_props.set_private(false); call 0 never executed branch 1 never executed branch 2 never executed #####: 92: pub_key_props.set_token(false); // don't create a persistent public key object call 0 never executed branch 1 never executed branch 2 never executed -: 93: #####: 94: ObjectHandle pub_key_handle = CK_INVALID_HANDLE; #####: 95: ObjectHandle priv_key_handle = CK_INVALID_HANDLE; #####: 96: Mechanism mechanism = { CKM_EC_KEY_PAIR_GEN, nullptr, 0 }; #####: 97: session.module()->C_GenerateKeyPair(session.handle(), &mechanism, call 0 never executed branch 1 never executed branch 2 never executed #####: 98: pub_key_props.data(), static_cast(pub_key_props.count()), call 0 never executed branch 1 never executed branch 2 never executed #####: 99: props.data(), static_cast(props.count()), call 0 never executed branch 1 never executed branch 2 never executed -: 100: &pub_key_handle, &priv_key_handle); -: 101: #####: 102: this->reset_handle(priv_key_handle); call 0 never executed branch 1 never executed branch 2 never executed -: 103: #####: 104: Object public_key(session, pub_key_handle); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed #####: 105: m_public_key = decode_public_point(public_key.get_attribute_value(AttributeType::EcPoint), m_domain_params); 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 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 #####: 106: } ------------------ _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC2ERNS0_7SessionERKSt6vectorIhSaIhEERKNS0_33EC_PrivateKeyGenerationPropertiesE: function _ZN5Botan6PKCS1120PKCS11_EC_PrivateKeyC2ERNS0_7SessionERKSt6vectorIhSaIhEERKNS0_33EC_PrivateKeyGenerationPropertiesE called 2 returned 100% blocks executed 68% 2: 83:PKCS11_EC_PrivateKey::PKCS11_EC_PrivateKey(Session& session, const std::vector& ec_params, -: 84: const EC_PrivateKeyGenerationProperties& props) 2: 85: : Object(session) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed call 5 never executed -: 86: { 2: 87: m_domain_params = EC_Group(ec_params); 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 returned 100% -: 88: 2: 89: EC_PublicKeyGenerationProperties pub_key_props(ec_params); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed 2: 90: pub_key_props.set_verify(true); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 91: pub_key_props.set_private(false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 92: pub_key_props.set_token(false); // don't create a persistent public key object call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 93: 2: 94: ObjectHandle pub_key_handle = CK_INVALID_HANDLE; 2: 95: ObjectHandle priv_key_handle = CK_INVALID_HANDLE; 2: 96: Mechanism mechanism = { CKM_EC_KEY_PAIR_GEN, nullptr, 0 }; 2: 97: session.module()->C_GenerateKeyPair(session.handle(), &mechanism, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 98: pub_key_props.data(), static_cast(pub_key_props.count()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 99: props.data(), static_cast(props.count()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 100: &pub_key_handle, &priv_key_handle); -: 101: 2: 102: this->reset_handle(priv_key_handle); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 103: 4: 104: Object public_key(session, pub_key_handle); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 6: 105: m_public_key = decode_public_point(public_key.get_attribute_value(AttributeType::EcPoint), m_domain_params); 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 tak