.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#internal#socket_udp.h.gcov -: 0:Source:build/include/botan/internal/socket_udp.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_udp.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2015,2016,2017 Jack Lloyd -: 3:* (C) 2019 Nuno Goncalves -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_SOCKET_UDP_H_ -: 9:#define BOTAN_SOCKET_UDP_H_ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14: -: 15:namespace Botan { -: 16: -: 17:namespace OS { -: 18: -: 19:/* -: 20:* This header is internal (not installed) and these functions are not -: 21:* intended to be called by applications. However they are given public -: 22:* visibility (using BOTAN_TEST_API macro) for the tests. This also probably -: 23:* allows them to be overridden by the application on ELF systems, but -: 24:* this hasn't been tested. -: 25:*/ -: 26: -: 27: -: 28:/** -: 29:* A wrapper around a simple blocking UDP socket -: 30:*/ 6: 31:class BOTAN_TEST_API SocketUDP call 0 returned 100% -: 32: { -: 33: public: -: 34: /** -: 35: * The socket will be closed upon destruction -: 36: */ -: 37: virtual ~SocketUDP() = default; -: 38: -: 39: /** -: 40: * Write to the socket. Returns immediately. -: 41: * Throws on error. -: 42: */ -: 43: virtual void write(const uint8_t buf[], size_t len) = 0; -: 44: -: 45: /** -: 46: * Reads up to len bytes, returns bytes written to buf. -: 47: * Returns 0 on EOF. Throws on error. -: 48: */ -: 49: virtual size_t read(uint8_t buf[], size_t len) = 0; -: 50: }; -: 51: -: 52:/** -: 53:* Open up a socket. Will throw on error. Returns null if sockets are -: 54:* not available on this platform. -: 55:*/ -: 56:std::unique_ptr -: 57:BOTAN_TEST_API open_socket_udp(const std::string& hostname, -: 58: const std::string& service, -: 59: std::chrono::microseconds timeout); -: 60: -: 61:/** -: 62:* Open up a socket. Will throw on error. Returns null if sockets are -: 63:* not available on this platform. -: 64:*/ -: 65:std::unique_ptr -: 66:BOTAN_TEST_API open_socket_udp(const std::string& uri, -: 67: std::chrono::microseconds timeout); -: 68: -: 69: -: 70:} // OS -: 71:} // Botan -: 72: -: 73:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#x86_64-linux-gnu#bits#socket2.h.gcov -: 0:Source:/usr/include/x86_64-linux-gnu/bits/socket2.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_server.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_server.gcda -: 0:Runs:723 -: 1:/* Checking macros for socket functions. -: 2: Copyright (C) 2005-2020 Free Software Foundation, Inc. -: 3: This file is part of the GNU C Library. -: 4: -: 5: The GNU C Library is free software; you can redistribute it and/or -: 6: modify it under the terms of the GNU Lesser General Public -: 7: License as published by the Free Software Foundation; either -: 8: version 2.1 of the License, or (at your option) any later version. -: 9: -: 10: The GNU C Library is distributed in the hope that it will be useful, -: 11: but WITHOUT ANY WARRANTY; without even the implied warranty of -: 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -: 13: Lesser General Public License for more details. -: 14: -: 15: You should have received a copy of the GNU Lesser General Public -: 16: License along with the GNU C Library; if not, see -: 17: . */ -: 18: -: 19:#ifndef _SYS_SOCKET_H -: 20:# error "Never include directly; use instead." -: 21:#endif -: 22: -: 23:extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, -: 24: int __flags); -: 25:extern ssize_t __REDIRECT (__recv_alias, (int __fd, void *__buf, size_t __n, -: 26: int __flags), recv); -: 27:extern ssize_t __REDIRECT (__recv_chk_warn, -: 28: (int __fd, void *__buf, size_t __n, size_t __buflen, -: 29: int __flags), __recv_chk) -: 30: __warnattr ("recv called with bigger length than size of destination " -: 31: "buffer"); -: 32: -: 33:__fortify_function ssize_t 6: 34:recv (int __fd, void *__buf, size_t __n, int __flags) -: 35:{ 6: 36: if (__bos0 (__buf) != (size_t) -1) -: 37: { 6: 38: if (!__builtin_constant_p (__n)) -: 39: return __recv_chk (__fd, __buf, __n, __bos0 (__buf), __flags); -: 40: 6: 41: if (__n > __bos0 (__buf)) -: 42: return __recv_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags); -: 43: } 6: 44: return __recv_alias (__fd, __buf, __n, __flags); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 45:} -: 46: -: 47:extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, -: 48: size_t __buflen, int __flags, -: 49: __SOCKADDR_ARG __addr, -: 50: socklen_t *__restrict __addr_len); -: 51:extern ssize_t __REDIRECT (__recvfrom_alias, -: 52: (int __fd, void *__restrict __buf, size_t __n, -: 53: int __flags, __SOCKADDR_ARG __addr, -: 54: socklen_t *__restrict __addr_len), recvfrom); -: 55:extern ssize_t __REDIRECT (__recvfrom_chk_warn, -: 56: (int __fd, void *__restrict __buf, size_t __n, -: 57: size_t __buflen, int __flags, -: 58: __SOCKADDR_ARG __addr, -: 59: socklen_t *__restrict __addr_len), __recvfrom_chk) -: 60: __warnattr ("recvfrom called with bigger length than size of " -: 61: "destination buffer"); -: 62: -: 63:__fortify_function ssize_t #####: 64:recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, -: 65: __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) -: 66:{ #####: 67: if (__bos0 (__buf) != (size_t) -1) -: 68: { -: 69: if (!__builtin_constant_p (__n)) -: 70: return __recvfrom_chk (__fd, __buf, __n, __bos0 (__buf), __flags, -: 71: __addr, __addr_len); -: 72: if (__n > __bos0 (__buf)) -: 73: return __recvfrom_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags, -: 74: __addr, __addr_len); -: 75: } #####: 76: return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); call 0 never executed branch 1 never executed branch 2 never executed -: 77:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#math#bigint#big_code.cpp.gcov -: 0:Source:src/lib/math/bigint/big_code.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/math_bigint_big_code.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_bigint_big_code.gcda -: 0:Runs:2960 -: 1:/* -: 2:* BigInt Encoding/Decoding -: 3:* (C) 1999-2010,2012,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: -: 13:namespace Botan { -: 14: function _ZNK5Botan6BigInt13to_dec_stringB5cxx11Ev called 32 returned 100% blocks executed 64% 32: 15:std::string BigInt::to_dec_string() const -: 16: { 32: 17: BigInt copy = *this; call 0 returned 100% 32: 18: copy.set_sign(Positive); -: 19: 32: 20: uint8_t remainder; 64: 21: std::vector digits; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 22: 426: 23: while(copy > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 92% (fallthrough) branch 4 taken 8% -: 24: { 394: 25: ct_divide_u8(copy, 10, copy, remainder); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 394: 26: digits.push_back(remainder); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 27: } -: 28: 32: 29: std::string s; -: 30: 426: 31: for(auto i = digits.rbegin(); i != digits.rend(); ++i) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 32: { 394: 33: s.push_back(Charset::digit2char(*i)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 34: } -: 35: 32: 36: if(s.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 37: s += "0"; call 0 never executed branch 1 never executed branch 2 never executed -: 38: 64: 39: return s; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 40: } -: 41: function _ZNK5Botan6BigInt13to_hex_stringB5cxx11Ev called 94 returned 100% blocks executed 67% 94: 42:std::string BigInt::to_hex_string() const -: 43: { 188: 44: const std::vector bits = BigInt::encode(*this); call 0 returned 100% 94: 45: if(bits.empty()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 46: return "00"; call 0 never executed branch 1 never executed branch 2 never executed -: 47: else 94: 48: return hex_encode(bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 49: } -: 50: -: 51:/* -: 52:* Encode a BigInt -: 53:*/ function _ZN5Botan6BigInt6encodeEPhRKS0_NS0_4BaseE called 0 returned 0% blocks executed 0% #####: 54:void BigInt::encode(uint8_t output[], const BigInt& n, Base base) -: 55: { #####: 56: secure_vector enc = n.encode_locked(base); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 57: copy_mem(output, enc.data(), enc.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 58: } -: 59: -: 60:namespace { -: 61: function _ZN5Botan12_GLOBAL__N_113str_to_vectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 62:std::vector str_to_vector(const std::string& s) -: 63: { #####: 64: std::vector v(s.size()); call 0 never executed #####: 65: std::memcpy(v.data(), s.data(), s.size()); #####: 66: return v; -: 67: } -: 68: function _ZN5Botan12_GLOBAL__N_114str_to_lvectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 69:secure_vector str_to_lvector(const std::string& s) -: 70: { #####: 71: secure_vector v(s.size()); call 0 never executed #####: 72: std::memcpy(v.data(), s.data(), s.size()); #####: 73: return v; -: 74: } -: 75: -: 76:} -: 77: -: 78:/* -: 79:* Encode a BigInt -: 80:*/ function _ZN5Botan6BigInt6encodeERKS0_NS0_4BaseE called 0 returned 0% blocks executed 0% #####: 81:std::vector BigInt::encode(const BigInt& n, Base base) -: 82: { #####: 83: if(base == Binary) branch 0 never executed branch 1 never executed #####: 84: return BigInt::encode(n); call 0 never executed #####: 85: else if(base == Hexadecimal) branch 0 never executed branch 1 never executed #####: 86: return str_to_vector(n.to_hex_string()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed #####: 87: else if(base == Decimal) branch 0 never executed branch 1 never executed #####: 88: return str_to_vector(n.to_dec_string()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 89: else #####: 90: throw Invalid_Argument("Unknown BigInt encoding base"); 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 -: 91: } -: 92: -: 93:/* -: 94:* Encode a BigInt -: 95:*/ function _ZN5Botan6BigInt13encode_lockedERKS0_NS0_4BaseE called 0 returned 0% blocks executed 0% #####: 96:secure_vector BigInt::encode_locked(const BigInt& n, Base base) -: 97: { #####: 98: if(base == Binary) branch 0 never executed branch 1 never executed #####: 99: return BigInt::encode_locked(n); call 0 never executed #####: 100: else if(base == Hexadecimal) branch 0 never executed branch 1 never executed #####: 101: return str_to_lvector(n.to_hex_string()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed #####: 102: else if(base == Decimal) branch 0 never executed branch 1 never executed #####: 103: return str_to_lvector(n.to_dec_string()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 104: else #####: 105: throw Invalid_Argument("Unknown BigInt encoding base"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 106: } -: 107: -: 108:/* -: 109:* Encode a BigInt, with leading 0s if needed -: 110:*/ function _ZN5Botan6BigInt11encode_1363ERKS0_m called 19094 returned 99% blocks executed 57% 19094: 111:secure_vector BigInt::encode_1363(const BigInt& n, size_t bytes) -: 112: { 19094: 113: if(n.bytes() > bytes) call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 99% 306: 114: throw Encoding_Error("encode_1363: n is too large to encode properly"); 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 -: 115: 18941: 116: secure_vector output(bytes); call 0 returned 100% 18941: 117: n.binary_encode(output.data(), output.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 18941: 118: return output; -: 119: } -: 120: -: 121://static function _ZN5Botan6BigInt11encode_1363EPhmRKS0_ called 3347 returned 100% blocks executed 28% 3347: 122:void BigInt::encode_1363(uint8_t output[], size_t bytes, const BigInt& n) -: 123: { 3347: 124: if(n.bytes() > bytes) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% #####: 125: throw Encoding_Error("encode_1363: n is too large to encode properly"); 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 -: 126: 3347: 127: n.binary_encode(output, bytes); call 0 returned 100% 3347: 128: } -: 129: -: 130:/* -: 131:* Encode two BigInt, with leading 0s if needed, and concatenate -: 132:*/ function _ZN5Botan6BigInt28encode_fixed_length_int_pairERKS0_S2_m called 638 returned 100% blocks executed 35% 638: 133:secure_vector BigInt::encode_fixed_length_int_pair(const BigInt& n1, const BigInt& n2, size_t bytes) -: 134: { 638: 135: if(n1.bytes() > bytes || n2.bytes() > bytes) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% call 3 returned 100% branch 4 taken 0% (fallthrough) branch 5 taken 100% #####: 136: throw Encoding_Error("encode_fixed_length_int_pair: values too large to encode properly"); 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 638: 137: secure_vector output(2 * bytes); call 0 returned 100% 638: 138: n1.binary_encode(output.data() , bytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 638: 139: n2.binary_encode(output.data() + bytes, bytes); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 638: 140: return output; -: 141: } -: 142: -: 143:/* -: 144:* Decode a BigInt -: 145:*/ function _ZN5Botan6BigInt6decodeEPKhmNS0_4BaseE called 22632 returned 100% blocks executed 38% 22632: 146:BigInt BigInt::decode(const uint8_t buf[], size_t length, Base base) -: 147: { 22632: 148: BigInt r; branch 0 taken 0% (fallthrough) branch 1 taken 100% 22632: 149: if(base == Binary) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 150: { #####: 151: r.binary_decode(buf, length); call 0 never executed branch 1 never executed branch 2 never executed -: 152: } 22632: 153: else if(base == Hexadecimal) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 154: { 39942: 155: secure_vector binary; branch 0 taken 18% (fallthrough) branch 1 taken 82% -: 156: 19971: 157: if(length % 2) branch 0 taken 18% (fallthrough) branch 1 taken 82% -: 158: { -: 159: // Handle lack of leading 0 3636: 160: const char buf0_with_leading_0[2] = 3636: 161: { '0', static_cast(buf[0]) }; -: 162: 7272: 163: binary = hex_decode_locked(buf0_with_leading_0, 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 164: 7272: 165: binary += hex_decode_locked(cast_uint8_ptr_to_char(&buf[1]), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 166: length - 1, 3636: 167: false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 168: } -: 169: else 32670: 170: binary = hex_decode_locked(cast_uint8_ptr_to_char(buf), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 16335: 171: length, false); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 172: 19971: 173: r.binary_decode(binary.data(), binary.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 174: } 2661: 175: else if(base == Decimal) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 176: { 280417: 177: for(size_t i = 0; i != length; ++i) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 178: { 277756*: 179: if(Charset::is_space(buf[i])) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 180: continue; -: 181: 277756: 182: if(!Charset::is_digit(buf[i])) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 183: throw Invalid_Argument("BigInt::decode: " #####: 184: "Invalid character in decimal input"); 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 -: 185: 277756: 186: const uint8_t x = Charset::char2digit(buf[i]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 187: 277756: 188: if(x >= 10) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 189: throw Invalid_Argument("BigInt: Invalid decimal string"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 190: 277756: 191: r *= 10; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 277756: 192: r += x; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 193: } -: 194: } -: 195: else #####: 196: throw Invalid_Argument("Unknown BigInt decoding method"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed 22632: 197: return r; -: 198: } -: 199: -: 200:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#compression#lzma#lzma.cpp.gcov -: 0:Source:src/lib/compression/lzma/lzma.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/compression_lzma.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/compression_lzma.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Lzma Compressor -: 3:* (C) 2001 Peter J Jones -: 4:* 2001-2007,2014 Jack Lloyd -: 5:* 2006 Matt Johnston -: 6:* 2012 Vojtech Kral -: 7:* -: 8:* Botan is released under the Simplified BSD License (see license.txt) -: 9:*/ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15: -: 16:namespace Botan { -: 17: -: 18:namespace { -: 19: -: 20:class LZMA_Stream : public Zlib_Style_Stream -: 21: { -: 22: public: 52: 23: LZMA_Stream() 52: 24: { 52: 25: m_allocator.opaque = alloc(); call 0 returned 100% branch 1 taken 81% (fallthrough) branch 2 taken 19% 52: 26: m_allocator.alloc = Compression_Alloc_Info::malloc; 52: 27: m_allocator.free = Compression_Alloc_Info::free; 52: 28: streamp()->allocator = &m_allocator; call 0 returned 100% branch 1 taken 81% (fallthrough) branch 2 taken 19% -: 29: } -: 30: #####: 31: ~LZMA_Stream() #####: 32: { call 0 never executed call 1 never executed #####: 33: ::lzma_end(streamp()); #####: 34: } ------------------ _ZN5Botan12_GLOBAL__N_111LZMA_StreamD0Ev: function _ZN5Botan12_GLOBAL__N_111LZMA_StreamD0Ev called 0 returned 0% blocks executed 0% #####: 31: ~LZMA_Stream() #####: 32: { call 0 never executed #####: 33: ::lzma_end(streamp()); call 0 never executed #####: 34: } call 0 never executed ------------------ _ZN5Botan12_GLOBAL__N_111LZMA_StreamD2Ev: function _ZN5Botan12_GLOBAL__N_111LZMA_StreamD2Ev called 0 returned 0% blocks executed 0% #####: 31: ~LZMA_Stream() #####: 32: { call 0 never executed #####: 33: ::lzma_end(streamp()); call 0 never executed #####: 34: } ------------------ -: 35: function _ZN5Botan12_GLOBAL__N_111LZMA_Stream3runEj called 128 returned 100% blocks executed 50% 128: 36: bool run(uint32_t flags) override -: 37: { 128: 38: lzma_ret rc = ::lzma_code(streamp(), static_cast(flags)); call 0 returned 100% -: 39: 128: 40: if(rc != LZMA_OK && rc != LZMA_STREAM_END) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 41: throw Compression_Error("lzma_code", ErrorType::LzmaError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 42: 128: 43: return (rc == LZMA_STREAM_END); -: 44: } -: 45: function _ZNK5Botan12_GLOBAL__N_111LZMA_Stream8run_flagEv called 74 returned 100% blocks executed 100% 74: 46: uint32_t run_flag() const override { return LZMA_RUN; } function _ZNK5Botan12_GLOBAL__N_111LZMA_Stream10flush_flagEv called 10 returned 100% blocks executed 100% 10: 47: uint32_t flush_flag() const override { return LZMA_FULL_FLUSH; } function _ZNK5Botan12_GLOBAL__N_111LZMA_Stream11finish_flagEv called 32 returned 100% blocks executed 100% 32: 48: uint32_t finish_flag() const override { return LZMA_FINISH; } -: 49: private: -: 50: ::lzma_allocator m_allocator; -: 51: }; -: 52: -: 53:class LZMA_Compression_Stream final : public LZMA_Stream -: 54: { -: 55: public: function _ZN5Botan12_GLOBAL__N_123LZMA_Compression_StreamC2Em called 32 returned 100% blocks executed 50% 32: 56: explicit LZMA_Compression_Stream(size_t level) 32: 57: { call 0 returned 100% call 1 never executed 32: 58: if(level == 0) branch 0 taken 81% (fallthrough) branch 1 taken 19% -: 59: level = 6; // default 26: 60: else if(level > 9) -: 61: level = 9; // clamp to maximum allowed value -: 62: 32: 63: lzma_ret rc = ::lzma_easy_encoder(streamp(), level, LZMA_CHECK_CRC64); call 0 returned 100% -: 64: 32: 65: if(rc != LZMA_OK) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 66: throw Compression_Error("lzam_easy_encoder", ErrorType::LzmaError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 32: 67: } -: 68: }; -: 69: -: 70:class LZMA_Decompression_Stream final : public LZMA_Stream -: 71: { -: 72: public: function _ZN5Botan12_GLOBAL__N_125LZMA_Decompression_StreamC2Ev called 20 returned 100% blocks executed 42% 20: 73: LZMA_Decompression_Stream() 20: 74: { call 0 returned 100% call 1 never executed 20: 75: lzma_ret rc = ::lzma_stream_decoder(streamp(), UINT64_MAX, call 0 returned 100% -: 76: LZMA_TELL_UNSUPPORTED_CHECK); -: 77: 20: 78: if(rc != LZMA_OK) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 79: throw Compression_Error("lzma_stream_decoder", ErrorType::LzmaError, rc); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed 20: 80: } -: 81: }; -: 82: -: 83:} -: 84: function _ZNK5Botan16LZMA_Compression11make_streamEm called 32 returned 100% blocks executed 80% 32: 85:Compression_Stream* LZMA_Compression::make_stream(size_t level) const -: 86: { 32: 87: return new LZMA_Compression_Stream(level); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 88: } -: 89: function _ZNK5Botan18LZMA_Decompression11make_streamEv called 20 returned 100% blocks executed 80% 20: 90:Compression_Stream* LZMA_Decompression::make_stream() const -: 91: { 20: 92: return new LZMA_Decompression_Stream; call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 93: } -: 94: -: 95:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#stream#ctr#ctr.cpp.gcov -: 0:Source:src/lib/stream/ctr/ctr.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/stream_ctr.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/stream_ctr.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Counter mode -: 3:* (C) 1999-2011,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:#include -: 12: -: 13:namespace Botan { -: 14: function _ZN5Botan6CTR_BEC2EPNS_11BlockCipherE called 1783 returned 100% blocks executed 56% 1783: 15:CTR_BE::CTR_BE(BlockCipher* ciph) : -: 16: m_cipher(ciph), 1783: 17: m_block_size(m_cipher->block_size()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 18: m_ctr_size(m_block_size), 3566: 19: m_ctr_blocks(m_cipher->parallel_bytes() / m_block_size), -: 20: m_counter(m_cipher->parallel_bytes()), -: 21: m_pad(m_counter.size()), 5349: 22: m_pad_pos(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) branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed -: 23: { 1783: 24: } -: 25: function _ZN5Botan6CTR_BEC2EPNS_11BlockCipherEm called 8921 returned 100% blocks executed 41% 8921: 26:CTR_BE::CTR_BE(BlockCipher* cipher, size_t ctr_size) : -: 27: m_cipher(cipher), 8921: 28: m_block_size(m_cipher->block_size()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 29: m_ctr_size(ctr_size), 17842: 30: m_ctr_blocks(m_cipher->parallel_bytes() / m_block_size), -: 31: m_counter(m_cipher->parallel_bytes()), -: 32: m_pad(m_counter.size()), 26763: 33: m_pad_pos(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) branch 15 taken 100% (fallthrough) branch 16 taken 0% branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed -: 34: { 8921*: 35: BOTAN_ARG_CHECK(m_ctr_size >= 4 && m_ctr_size <= m_block_size, branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% call 4 never executed -: 36: "Invalid CTR-BE counter size"); 8921: 37: } -: 38: function _ZN5Botan6CTR_BE5clearEv called 2342 returned 100% blocks executed 100% 2342: 39:void CTR_BE::clear() -: 40: { 2342: 41: m_cipher->clear(); call 0 returned 100% 2342: 42: zeroise(m_pad); branch 0 taken 100% (fallthrough) branch 1 taken 0% 2342: 43: zeroise(m_counter); branch 0 taken 100% (fallthrough) branch 1 taken 0% 2342: 44: zap(m_iv); call 0 returned 100% 2342: 45: m_pad_pos = 0; 2342: 46: } -: 47: function _ZNK5Botan6CTR_BE17default_iv_lengthEv called 1880 returned 100% blocks executed 100% 1880: 48:size_t CTR_BE::default_iv_length() const -: 49: { 1880: 50: return m_block_size; -: 51: } -: 52: function _ZNK5Botan6CTR_BE15valid_iv_lengthEm called 30927 returned 100% blocks executed 100% 30927: 53:bool CTR_BE::valid_iv_length(size_t iv_len) const -: 54: { 30927: 55: return (iv_len <= m_block_size); -: 56: } -: 57: function _ZNK5Botan6CTR_BE8key_specEv called 14716 returned 100% blocks executed 100% 14716: 58:Key_Length_Specification CTR_BE::key_spec() const -: 59: { 14716: 60: return m_cipher->key_spec(); call 0 returned 100% -: 61: } -: 62: function _ZNK5Botan6CTR_BE5cloneEv called 940 returned 100% blocks executed 83% 940: 63:CTR_BE* CTR_BE::clone() const -: 64: { 940: 65: return new CTR_BE(m_cipher->clone(), m_ctr_size); 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 -: 66: } -: 67: function _ZN5Botan6CTR_BE12key_scheduleEPKhm called 8391 returned 100% blocks executed 100% 8391: 68:void CTR_BE::key_schedule(const uint8_t key[], size_t key_len) -: 69: { 8391: 70: m_cipher->set_key(key, key_len); call 0 returned 100% -: 71: -: 72: // Set a default all-zeros IV 8391: 73: set_iv(nullptr, 0); call 0 returned 100% 8391: 74: } -: 75: function _ZNK5Botan6CTR_BE4nameB5cxx11Ev called 7277 returned 100% blocks executed 34% 7277: 76:std::string CTR_BE::name() const -: 77: { 7277: 78: if(m_ctr_size == m_block_size) branch 0 taken 92% (fallthrough) branch 1 taken 8% 13418: 79: return ("CTR-BE(" + 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 call 11 never executed -: 80: else 1136: 81: return ("CTR-BE(" + m_cipher->name() + "," + std::to_string(m_ctr_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) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% (throw) call 13 returned 100% branch 14 taken 100% (fallthrough) branch 15 taken 0% (throw) branch 16 taken 0% (fallthrough) branch 17 taken 100% branch 18 taken 0% (fallthrough) branch 19 taken 100% branch 20 taken 0% (fallthrough) branch 21 taken 100% branch 22 taken 0% (fallthrough) branch 23 taken 100% branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed -: 82: -: 83: } -: 84: function _ZN5Botan6CTR_BE6cipherEPKhPhm called 28900 returned 91% blocks executed 100% 28900: 85:void CTR_BE::cipher(const uint8_t in[], uint8_t out[], size_t length) -: 86: { 28900: 87: verify_key_set(m_iv.empty() == false); branch 0 taken 9% (fallthrough) branch 1 taken 91% -: 88: 26349: 89: const uint8_t* pad_bits = &m_pad[0]; branch 0 taken 35% (fallthrough) branch 1 taken 65% 26349: 90: const size_t pad_size = m_pad.size(); branch 0 taken 35% (fallthrough) branch 1 taken 65% -: 91: 26349: 92: if(m_pad_pos > 0) branch 0 taken 35% (fallthrough) branch 1 taken 65% -: 93: { 9319: 94: const size_t avail = pad_size - m_pad_pos; 9319: 95: const size_t take = std::min(length, avail); branch 0 taken 34% (fallthrough) branch 1 taken 66% 9319: 96: xor_buf(out, in, pad_bits + m_pad_pos, take); call 0 returned 100% 9319: 97: length -= take; 9319: 98: in += take; 9319: 99: out += take; 9319: 100: m_pad_pos += take; -: 101: 9319: 102: if(take == avail) branch 0 taken 35% (fallthrough) branch 1 taken 65% -: 103: { 3285: 104: add_counter(m_ctr_blocks); call 0 returned 100% 3285: 105: m_cipher->encrypt_n(m_counter.data(), m_pad.data(), m_ctr_blocks); call 0 returned 100% 3285: 106: m_pad_pos = 0; -: 107: } -: 108: } -: 109: 44265: 110: while(length >= pad_size) branch 0 taken 40% (fallthrough) branch 1 taken 60% -: 111: { 17916: 112: xor_buf(out, in, pad_bits, pad_size); call 0 returned 100% 17916: 113: length -= pad_size; 17916: 114: in += pad_size; 17916: 115: out += pad_size; -: 116: 17916: 117: add_counter(m_ctr_blocks); call 0 returned 100% 17916: 118: m_cipher->encrypt_n(m_counter.data(), m_pad.data(), m_ctr_blocks); call 0 returned 100% -: 119: } -: 120: 26349: 121: xor_buf(out, in, pad_bits, length); call 0 returned 100% 26349: 122: m_pad_pos += length; 26349: 123: } -: 124: function _ZN5Botan6CTR_BE6set_ivEPKhm called 28083 returned 91% blocks executed 76% 28083: 125:void CTR_BE::set_iv(const uint8_t iv[], size_t iv_len) -: 126: { 28083: 127: if(!valid_iv_length(iv_len)) call 0 returned 100% branch 1 taken 3% (fallthrough) branch 2 taken 97% 1904: 128: throw Invalid_IV_Length(name(), iv_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 -: 129: 27131: 130: m_iv.resize(m_block_size); call 0 returned 100% 27131: 131: zeroise(m_iv); branch 0 taken 100% (fallthrough) branch 1 taken 0% 27131: 132: buffer_insert(m_iv, 0, iv, iv_len); call 0 returned 100% -: 133: 27131: 134: seek(0); call 0 returned 94% 25555: 135: } -: 136: function _ZN5Botan6CTR_BE11add_counterEm called 21343 returned 100% blocks executed 100% 21343: 137:void CTR_BE::add_counter(const uint64_t counter) -: 138: { 21343: 139: const size_t ctr_size = m_ctr_size; 21343: 140: const size_t ctr_blocks = m_ctr_blocks; 21343: 141: const size_t BS = m_block_size; -: 142: 21343: 143: if(ctr_size == 4) branch 0 taken 78% (fallthrough) branch 1 taken 22% -: 144: { 16616: 145: const size_t off = (BS - 4); 16616: 146: const uint32_t low32 = static_cast(counter + load_be(&m_counter[off], 0)); -: 147: 267088: 148: for(size_t i = 0; i != ctr_blocks; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 149: { 250472: 150: store_be(uint32_t(low32 + i), &m_counter[i*BS+off]); -: 151: } -: 152: } 4727: 153: else if(ctr_size == 8) branch 0 taken 70% (fallthrough) branch 1 taken 30% -: 154: { 3310: 155: const size_t off = (BS - 8); 3310: 156: const uint64_t low64 = counter + load_be(&m_counter[off], 0); -: 157: 17558: 158: for(size_t i = 0; i != ctr_blocks; ++i) branch 0 taken 81% (fallthrough) branch 1 taken 19% -: 159: { 14248: 160: store_be(uint64_t(low64 + i), &m_counter[i*BS+off]); -: 161: } -: 162: } 1417: 163: else if(ctr_size == 16) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 164: { 1415: 165: const size_t off = (BS - 16); 1415: 166: uint64_t b0 = load_be(&m_counter[off], 0); branch 0 taken 100% (fallthrough) branch 1 taken 1% 1415: 167: uint64_t b1 = load_be(&m_counter[off], 1); 1415: 168: b1 += counter; 1415: 169: b0 += (b1 < counter) ? 1 : 0; // carry branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 170: 23263: 171: for(size_t i = 0; i != ctr_blocks; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 172: { 21848: 173: store_be(b0, &m_counter[i*BS+off]); 21848: 174: store_be(b1, &m_counter[i*BS+off+8]); 21848: 175: b1 += 1; 21848: 176: b0 += (b1 == 0); // carry -: 177: } -: 178: } -: 179: else -: 180: { 18: 181: for(size_t i = 0; i != ctr_blocks; ++i) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 182: { 16: 183: uint64_t local_counter = counter; 16: 184: uint16_t carry = static_cast(local_counter); 32: 185: for(size_t j = 0; (carry || local_counter) && j != ctr_size; ++j) branch 0 taken 50% (fallthrough) branch 1 taken 50% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 186: { 16: 187: const size_t off = i*BS + (BS-1-j); 16: 188: const uint16_t cnt = static_cast(m_counter[off]) + carry; 16: 189: m_counter[off] = static_cast(cnt); 16: 190: local_counter = (local_counter >> 8); 16: 191: carry = (cnt >> 8) + static_cast(local_counter); -: 192: } -: 193: } -: 194: } 21343: 195: } -: 196: function _ZN5Botan6CTR_BE4seekEm called 28997 returned 91% blocks executed 87% 28997: 197:void CTR_BE::seek(uint64_t offset) -: 198: { 28997: 199: verify_key_set(m_iv.empty() == false); branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 200: 28057: 201: const uint64_t base_counter = m_ctr_blocks * (offset / m_counter.size()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 202: 28057: 203: zeroise(m_counter); branch 0 taken 100% (fallthrough) branch 1 taken 0% 28057: 204: buffer_insert(m_counter, 0, m_iv); call 0 returned 100% -: 205: 28057: 206: const size_t BS = m_block_size; -: 207: -: 208: // Set m_counter blocks to IV, IV + 1, ... IV + n -: 209: 28057: 210: if(m_ctr_size == 4 && BS >= 8) branch 0 taken 42% (fallthrough) branch 1 taken 58% branch 2 taken 0% branch 3 taken 100% (fallthrough) -: 211: { 16376: 212: const uint32_t low32 = load_be(&m_counter[BS-4], 0); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 213: 16376*: 214: if(m_ctr_blocks >= 4 && is_power_of_2(m_ctr_blocks)) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 215: { -: 216: size_t written = 1; 79437: 217: while(written < m_ctr_blocks) branch 0 taken 79% (fallthrough) branch 1 taken 21% -: 218: { 63061: 219: copy_mem(&m_counter[written*BS], &m_counter[0], BS*written); call 0 returned 100% 63061: 220: written *= 2; -: 221: } -: 222: } -: 223: else -: 224: { #####: 225: for(size_t i = 1; i != m_ctr_blocks; ++i) branch 0 never executed branch 1 never executed -: 226: { #####: 227: copy_mem(&m_counter[i*BS], &m_counter[0], BS - 4); call 0 never executed -: 228: } -: 229: } -: 230: 243824: 231: for(size_t i = 1; i != m_ctr_blocks; ++i) branch 0 taken 93% (fallthrough) branch 1 taken 7% -: 232: { 227448: 233: const uint32_t c = static_cast(low32 + i); 227448: 234: store_be(c, &m_counter[(BS-4)+i*BS]); -: 235: } -: 236: } -: 237: else -: 238: { -: 239: // do everything sequentially: 148288: 240: for(size_t i = 1; i != m_ctr_blocks; ++i) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 241: { 136607: 242: buffer_insert(m_counter, i*BS, &m_counter[(i-1)*BS], BS); call 0 returned 100% -: 243: 138025: 244: for(size_t j = 0; j != m_ctr_size; ++j) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% 137997: 245: if(++m_counter[i*BS + (BS - 1 - j)]) branch 0 taken 1% (fallthrough) branch 1 taken 99% -: 246: break; -: 247: } -: 248: } -: 249: 28057: 250: if(base_counter > 0) branch 0 taken 1% (fallthrough) branch 1 taken 99% 142: 251: add_counter(base_counter); call 0 returned 100% -: 252: 28057: 253: m_cipher->encrypt_n(m_counter.data(), m_pad.data(), m_ctr_blocks); call 0 returned 94% 26481: 254: m_pad_pos = offset % m_counter.size(); 26481: 255: } -: 256:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#tests#test_c25519.cpp.gcov -: 0:Source:src/tests/test_c25519.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_c25519.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_c25519.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2014,2015 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "tests.h" -: 8: -: 9:#if defined(BOTAN_HAS_CURVE_25519) -: 10: #include "test_pubkey.h" -: 11: #include -: 12: #include -: 13: #include -: 14: #include -: 15:#endif -: 16: -: 17:namespace Botan_Tests { -: 18: -: 19:#if defined(BOTAN_HAS_CURVE_25519) -: 20: -: 21:class Curve25519_Sclarmult_Tests final : public Text_Based_Test -: 22: { -: 23: public: function _ZN11Botan_Tests26Curve25519_Sclarmult_TestsC2Ev called 1 returned 100% blocks executed 45% 1: 24: Curve25519_Sclarmult_Tests() : Text_Based_Test( -: 25: "pubkey/c25519_scalar.vec", 3: 26: "Secret,Basepoint,Out") {} call 0 returned 100% branch 1 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 taken 0% (fallthrough) branch 15 taken 100% -: 27: function _ZN11Botan_Tests26Curve25519_Sclarmult_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 18 returned 100% blocks executed 40% 18: 28: Test::Result run_one_test(const std::string&, const VarMap& vars) override -: 29: { 18: 30: const std::vector secret = vars.get_req_bin("Secret"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed 36: 31: const std::vector basepoint = vars.get_req_bin("Basepoint"); call 0 returned 100% 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% 36: 32: const std::vector expected = vars.get_req_bin("Out"); call 0 returned 100% 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% -: 33: 36: 34: std::vector got(32); 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 18: 35: Botan::curve25519_donna(got.data(), secret.data(), basepoint.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 36: 18: 37: Test::Result result("Curve25519 scalarmult"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 18: 38: result.test_eq("basemult", got, expected); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 36: 39: return result; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 40: } -: 41: }; -: 42:BOTAN_REGISTER_TEST("pubkey", "curve25519_scalar", Curve25519_Sclarmult_Tests); -: 43: -: 44:class Curve25519_Agreement_Tests final : public PK_Key_Agreement_Test -: 45: { -: 46: public: function _ZN11Botan_Tests26Curve25519_Agreement_TestsC2Ev called 1 returned 100% blocks executed 39% 1: 47: Curve25519_Agreement_Tests() : PK_Key_Agreement_Test( -: 48: "X25519", -: 49: "pubkey/x25519.vec", 4: 50: "Secret,CounterKey,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) 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% branch 16 taken 100% (fallthrough) branch 17 taken 0% branch 18 taken 0% (fallthrough) branch 19 taken 100% -: 51: function _ZNK11Botan_Tests26Curve25519_Agreement_Tests11default_kdfB5cxx11ERKNS_6VarMapE called 72 returned 100% blocks executed 100% 72: 52: std::string default_kdf(const VarMap&) const override -: 53: { 72: 54: return "Raw"; call 0 returned 100% -: 55: } -: 56: function _ZN11Botan_Tests26Curve25519_Agreement_Tests12load_our_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 72 returned 100% blocks executed 47% 72: 57: std::unique_ptr load_our_key(const std::string&, -: 58: const VarMap& vars) override -: 59: { 72: 60: const std::vector secret_vec = vars.get_req_bin("Secret"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed 144: 61: Botan::secure_vector secret(secret_vec.begin(), secret_vec.end()); 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 144: 62: return std::unique_ptr(new Botan::Curve25519_PrivateKey(secret)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% call 8 never executed -: 63: } -: 64: function _ZN11Botan_Tests26Curve25519_Agreement_Tests14load_their_keyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 72 returned 100% blocks executed 45% 72: 65: std::vector load_their_key(const std::string&, const VarMap& vars) override -: 66: { 144: 67: return vars.get_req_bin("CounterKey"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 68: } -: 69: }; -: 70:BOTAN_REGISTER_TEST("pubkey", "curve25519_agreement", Curve25519_Agreement_Tests); -: 71: 1: 72:class Curve25519_Roundtrip_Test final : public Test -: 73: { -: 74: public: function _ZN11Botan_Tests25Curve25519_Roundtrip_Test3runEv called 1 returned 100% blocks executed 43% 1: 75: std::vector run() override -: 76: { 1: 77: std::vector results; -: 78: 11: 79: for(size_t i = 0; i < 10; ++i) branch 0 taken 91% (fallthrough) branch 1 taken 9% -: 80: { 20: 81: Test::Result result("Curve25519 roundtrip"); call 0 returned 100% branch 1 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 -: 82: 20: 83: Botan::Curve25519_PrivateKey a_priv_gen(Test::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 never executed 20: 84: Botan::Curve25519_PrivateKey b_priv_gen(Test::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 never executed -: 85: -: 86:#if defined(BOTAN_HAS_PKCS5_PBES2) && defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_AEAD_GCM) && defined(BOTAN_HAS_SHA2_32) -: 87: // Then serialize to encrypted storage -: 88: 10: 89: const std::string a_pass = "alice pass"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 20: 90: const std::string b_pass = "bob pass"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 10: 91: const auto pbe_time = std::chrono::milliseconds(10); 20: 92: const std::string a_priv_pem = Botan::PKCS8::PEM_encode(a_priv_gen, Test::rng(), a_pass, pbe_time); call 0 returned 100% branch 1 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% 20: 93: const std::string b_priv_pem = Botan::PKCS8::PEM_encode(b_priv_gen, Test::rng(), b_pass, pbe_time); call 0 returned 100% branch 1 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% -: 94: -: 95: // Reload back into memory 20: 96: Botan::DataSource_Memory a_priv_ds(a_priv_pem); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 20: 97: Botan::DataSource_Memory b_priv_ds(b_priv_pem); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 98: 50: 99: std::unique_ptr a_priv(Botan::PKCS8::load_key(a_priv_ds, Test::rng(), [a_pass]() { return a_pass; })); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) call 10 returned 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% (throw) branch 13 taken 100% (fallthrough) branch 14 taken 0% branch 15 taken 0% (fallthrough) branch 16 taken 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 20: 100: std::unique_ptr b_priv(Botan::PKCS8::load_key(b_priv_ds, Test::rng(), b_pass)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% -: 101:#else -: 102: const std::string a_priv_pem = Botan::PKCS8::PEM_encode(a_priv_gen); -: 103: const std::string b_priv_pem = Botan::PKCS8::PEM_encode(b_priv_gen); -: 104: -: 105: // Reload back into memory -: 106: Botan::DataSource_Memory a_priv_ds(a_priv_pem); -: 107: Botan::DataSource_Memory b_priv_ds(b_priv_pem); -: 108: -: 109: std::unique_ptr a_priv(Botan::PKCS8::load_key(a_priv_ds, Test::rng())); -: 110: std::unique_ptr b_priv(Botan::PKCS8::load_key(b_priv_ds, Test::rng())); -: 111:#endif -: 112: -: 113: // Export public keys as PEM 20: 114: const std::string a_pub_pem = Botan::X509::PEM_encode(*a_priv); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 20: 115: const std::string b_pub_pem = Botan::X509::PEM_encode(*b_priv); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 116: 20: 117: Botan::DataSource_Memory a_pub_ds(a_pub_pem); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 20: 118: Botan::DataSource_Memory b_pub_ds(b_pub_pem); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 119: 20: 120: std::unique_ptr a_pub(Botan::X509::load_key(a_pub_ds)); call 0 returned 100% 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% 20: 121: std::unique_ptr b_pub(Botan::X509::load_key(b_pub_ds)); 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% -: 122: 10: 123: Botan::Curve25519_PublicKey* a_pub_key = dynamic_cast(a_pub.get()); branch 0 taken 100% (fallthrough) branch 1 taken 0% 10: 124: Botan::Curve25519_PublicKey* b_pub_key = dynamic_cast(b_pub.get()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 125: 10: 126: if(a_pub_key && b_pub_key) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 127: { 30: 128: Botan::PK_Key_Agreement a_ka(*a_priv, Test::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% call 14 returned 100% call 15 never executed 20: 129: Botan::PK_Key_Agreement b_ka(*b_priv, Test::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% call 14 never executed -: 130: 20: 131: const std::string context = "shared context value"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 20: 132: Botan::SymmetricKey a_key = a_ka.derive_key(32, b_pub_key->public_value(), context); call 0 returned 100% 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 20: 133: Botan::SymmetricKey b_key = b_ka.derive_key(32, a_pub_key->public_value(), context); call 0 returned 100% 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 -: 134: 40: 135: if(!result.test_eq("key agreement", a_key.bits_of(), b_key.bits_of())) call 0 returned 100% branch 1 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 taken 100% (fallthrough) branch 14 taken 0% 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 -: 136: { #####: 137: result.test_note(a_priv_pem); call 0 never executed branch 1 never executed branch 2 never executed #####: 138: result.test_note(b_priv_pem); call 0 never executed branch 1 never executed branch 2 never executed -: 139: } -: 140: } -: 141: else -: 142: { #####: 143: result.test_failure("Cast back to Curve25519 failed"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed -: 144: } -: 145: 10: 146: results.push_back(result); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 147: } -: 148: 1: 149: return results; -: 150: } -: 151: }; -: 152: -: 153:BOTAN_REGISTER_TEST("pubkey", "curve25519_rt", Curve25519_Roundtrip_Test); -: 154: 1: 155:class Curve25519_Keygen_Tests final : public PK_Key_Generation_Test -: 156: { -: 157: public: function _ZNK11Botan_Tests23Curve25519_Keygen_Tests13keygen_paramsB5cxx11Ev called 1 returned 100% blocks executed 47% 1: 158: std::vector keygen_params() const override -: 159: { 2: 160: return { "" }; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 0% (throw) branch 5 taken 100% (fallthrough) branch 6 taken 50% (fallthrough) branch 7 taken 50% branch 8 taken 0% (fallthrough) branch 9 taken 100% branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed -: 161: } function _ZNK11Botan_Tests23Curve25519_Keygen_Tests9algo_nameB5cxx11Ev called 3 returned 100% blocks executed 100% 3: 162: std::string algo_name() const override -: 163: { 3: 164: return "Curve25519"; call 0 returned 100% -: 165: } -: 166: }; -: 167: -: 168:BOTAN_REGISTER_TEST("pubkey", "curve25519_keygen", Curve25519_Keygen_Tests); -: 169: -: 170:#endif -: 171: -: 172:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#tests#test_tls_messages.cpp.gcov -: 0:Source:src/tests/test_tls_messages.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_tls_messages.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_tls_messages.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2016 Juraj Somorovsky -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "tests.h" -: 8: -: 9:#if defined(BOTAN_HAS_TLS) -: 10: #include -: 11: #include -: 12: #include -: 13: #include -: 14: #include -: 15: #include -: 16: #include -: 17: #include -: 18:#endif -: 19: -: 20:namespace Botan_Tests { -: 21: -: 22:namespace { -: 23: -: 24:#if defined(BOTAN_HAS_TLS) function _ZN11Botan_Tests12_GLOBAL__N_125test_hello_verify_requestEv called 1 returned 100% blocks executed 43% 1: 25:Test::Result test_hello_verify_request() -: 26: { 1: 27: Test::Result result("hello_verify_request construction"); call 0 returned 100% branch 1 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 -: 28: 1: 29: std::vector test_data; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 30: std::vector key_data(32); 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 2: 31: Botan::SymmetricKey sk(key_data); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 32: -: 33: // Compute cookie over an empty string with an empty test data 2: 34: Botan::TLS::Hello_Verify_Request hfr(test_data, "", sk); call 0 returned 100% 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% -: 35: -: 36: // Compute HMAC 3: 37: std::unique_ptr hmac(Botan::MessageAuthenticationCode::create("HMAC(SHA-256)")); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 100% (fallthrough) branch 12 taken 0% 1: 38: hmac->set_key(sk); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 39: hmac->update_be(uint64_t(0)); // length of client hello call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 40: hmac->update_be(uint64_t(0)); // length of client identity call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3: 41: std::vector test = unlock(hmac->final()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 100% (fallthrough) branch 6 taken 0% branch 7 never executed branch 8 never executed -: 42: 1: 43: result.test_eq("Cookie comparison", hfr.cookie(), test); call 0 returned 100% 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: 44: return result; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 45: } -: 46: -: 47:class TLS_Message_Parsing_Test final : public Text_Based_Test -: 48: { -: 49: public: function _ZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_TestC2Ev called 1 returned 100% blocks executed 38% 1: 50: TLS_Message_Parsing_Test() 3: 51: : Text_Based_Test("tls", "Buffer,Protocol,Ciphersuite,AdditionalData,Name,Exception") {} call 0 returned 100% branch 1 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 taken 0% (fallthrough) branch 15 taken 100% -: 52: function _ZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 49 returned 100% blocks executed 45% 49: 53: Test::Result run_one_test(const std::string& algo, const VarMap& vars) override -: 54: { 49: 55: const std::vector buffer = vars.get_req_bin("Buffer"); call 0 returned 100% branch 1 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: 56: const std::vector protocol = vars.get_opt_bin("Protocol"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% 98: 57: const std::vector ciphersuite = vars.get_opt_bin("Ciphersuite"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 55% (fallthrough) branch 7 taken 45% 98: 58: const std::string exception = vars.get_req_str("Exception"); call 0 returned 100% 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 12% (fallthrough) branch 7 taken 88% 147: 59: const std::string expected_name = vars.get_opt_str("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) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 taken 63% (fallthrough) branch 12 taken 37% 49: 60: const bool is_positive_test = exception.empty(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 61: 49: 62: Test::Result result(algo + " parsing"); call 0 returned 100% 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 -: 63: 49: 64: if(is_positive_test) branch 0 taken 37% (fallthrough) branch 1 taken 63% -: 65: { 18: 66: try -: 67: { 18: 68: if(algo == "cert_verify") call 0 returned 100% branch 1 taken 22% (fallthrough) branch 2 taken 78% -: 69: { 4: 70: Botan::TLS::Protocol_Version pv(protocol[0], protocol[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 8: 71: Botan::TLS::Certificate_Verify message(buffer, pv); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 72: } 14: 73: else if(algo == "client_hello") call 0 returned 100% branch 1 taken 21% (fallthrough) branch 2 taken 79% -: 74: { 6: 75: const std::string extensions = vars.get_req_str("AdditionalData"); call 0 returned 100% 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: 76: Botan::TLS::Protocol_Version pv(protocol[0], protocol[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 77: Botan::TLS::Client_Hello message(buffer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 67% (fallthrough) branch 4 taken 33% 6: 78: result.test_eq("Protocol version", message.version().to_string(), pv.to_string()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) 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 6: 79: std::vector buf; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 18: 80: for(Botan::TLS::Handshake_Extension_Type const& type : message.extension_types()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 83% (fallthrough) branch 4 taken 17% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) -: 81: { 15: 82: uint16_t u16type = static_cast(type); 15: 83: buf.push_back(Botan::get_byte(0, u16type)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 15: 84: buf.push_back(Botan::get_byte(1, u16type)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 85: } 8: 86: result.test_eq("Hello extensions", Botan::hex_encode(buf), extensions); call 0 returned 100% branch 1 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 67% (fallthrough) branch 10 taken 33% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed -: 87: } 11: 88: else if(algo == "hello_verify") call 0 returned 100% branch 1 taken 9% (fallthrough) branch 2 taken 91% -: 89: { 2: 90: Botan::TLS::Hello_Verify_Request message(buffer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 91: } 10: 92: else if(algo == "hello_request") call 0 returned 100% branch 1 taken 10% (fallthrough) branch 2 taken 90% -: 93: { 1: 94: Botan::TLS::Hello_Request message(buffer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 95: } 9: 96: else if(algo == "new_session_ticket") call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 97: { 6: 98: Botan::TLS::New_Session_Ticket message(buffer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 99: } 6: 100: else if(algo == "server_hello") call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 101: { 4: 102: const std::string extensions = vars.get_req_str("AdditionalData"); call 0 returned 100% 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: 103: Botan::TLS::Protocol_Version pv(protocol[0], protocol[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 104: Botan::TLS::Ciphersuite cs = Botan::TLS::Ciphersuite::by_id(Botan::make_uint16(ciphersuite[0], ciphersuite[1])); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 105: Botan::TLS::Server_Hello message(buffer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 4: 106: result.test_eq("Protocol version", message.version().to_string(), pv.to_string()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) 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 4: 107: result.confirm("Ciphersuite", (message.ciphersuite() == cs.ciphersuite_code())); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 4: 108: std::vector buf; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 11: 109: for(Botan::TLS::Handshake_Extension_Type const& type : message.extension_types()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 82% (fallthrough) branch 4 taken 18% call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) -: 110: { 9: 111: uint16_t u16type = static_cast(type); 9: 112: buf.push_back(Botan::get_byte(0, u16type)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 9: 113: buf.push_back(Botan::get_byte(1, u16type)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 never executed -: 114: } 6: 115: result.test_eq("Hello extensions", Botan::hex_encode(buf), extensions); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed -: 116: } 4: 117: else if(algo == "alert") call 0 returned 100% branch 1 taken 75% (fallthrough) branch 2 taken 25% -: 118: { 6: 119: Botan::secure_vector sb(buffer.begin(), buffer.end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed 3: 120: Botan::TLS::Alert message(sb); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 121: result.test_lt("Alert type vectors result to UNKNOWN_CA or ACCESS_DENIED, which is shorter than 15", call 0 returned 100% 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% 6: 122: message.type_string().size(), 15); 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 -: 123: } 1: 124: else if(algo == "cert_status") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 125: { 2: 126: Botan::TLS::Certificate_Status message(buffer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 127: 2: 128: Botan::OCSP::Response resp(message.response()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 never executed -: 129: 2: 130: const std::vector CNs = resp.signer_name().get_attribute("CN"); call 0 returned 100% branch 1 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 -: 131: -: 132: // This is not requird by OCSP protocol, we are just using it as a test here 2: 133: if(result.test_eq("OCSP response has signer name", CNs.size(), 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 100% (fallthrough) branch 7 taken 0% branch 8 taken 100% (fallthrough) branch 9 taken 0% -: 134: { 2: 135: result.test_eq("Expected name", CNs[0], expected_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) -: 136: } -: 137: } -: 138: else -: 139: { #####: 140: throw Test_Error("Unknown message type " + algo + " in TLS parsing tests"); 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 -: 141: } 36: 142: result.test_success("Correct parsing"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 143: } =====: 144: catch(std::exception& e) call 0 never executed call 1 never executed -: 145: { =====: 146: result.test_failure(e.what()); 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 -: 147: } -: 148: } -: 149: else -: 150: { 31: 151: if(algo == "cert_verify") call 0 returned 100% branch 1 taken 13% (fallthrough) branch 2 taken 87% -: 152: { 4: 153: Botan::TLS::Protocol_Version pv(protocol[0], protocol[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) function _ZZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapEENKUlvE_clEv.isra.0 called 4 returned 0% blocks executed 40% 12: 154: result.test_throws("invalid cert_verify input", exception, [&buffer, &pv]() call 0 returned 100% 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% -: 155: { 4*: 156: Botan::TLS::Certificate_Verify message(buffer, pv); call 0 returned 0% #####: 157: }); -: 158: } 27: 159: else if(algo == "client_hello") call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 160: { 27: 161: result.test_throws("invalid client_hello input", exception, [&buffer]() call 0 returned 100% 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% -: 162: { 9*: 163: Botan::TLS::Client_Hello message(buffer); call 0 returned 0% call 1 never executed -: 164: }); -: 165: } 18: 166: else if(algo == "hello_verify") call 0 returned 100% branch 1 taken 22% (fallthrough) branch 2 taken 78% -: 167: { function _ZZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapEENKUlvE1_clEv.isra.0 called 4 returned 0% blocks executed 40% 12: 168: result.test_throws("invalid hello_verify input", exception, [&buffer]() call 0 returned 100% 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% -: 169: { 4*: 170: Botan::TLS::Hello_Verify_Request message(buffer); call 0 returned 0% #####: 171: }); -: 172: } 14: 173: else if(algo == "hello_request") call 0 returned 100% branch 1 taken 7% (fallthrough) branch 2 taken 93% -: 174: { 3: 175: result.test_throws("invalid hello_request input", exception, [&buffer]() call 0 returned 100% 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% -: 176: { 1*: 177: Botan::TLS::Hello_Request message(buffer); call 0 returned 0% -: 178: }); -: 179: } 13: 180: else if(algo == "cert_status") call 0 returned 100% branch 1 taken 31% (fallthrough) branch 2 taken 69% -: 181: { function _ZZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapEENKUlvE3_clEv.isra.0 called 4 returned 0% blocks executed 40% 12: 182: result.test_throws("invalid cert_status input", exception, [&buffer]() call 0 returned 100% 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% -: 183: { 4*: 184: Botan::TLS::Certificate_Status message(buffer); call 0 returned 0% #####: 185: }); -: 186: } 9: 187: else if(algo == "new_session_ticket") call 0 returned 100% branch 1 taken 22% (fallthrough) branch 2 taken 78% -: 188: { function _ZZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapEENKUlvE4_clEv.isra.0 called 2 returned 0% blocks executed 40% 6: 189: result.test_throws("invalid new_session_ticket input", exception, [&buffer]() call 0 returned 100% 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% -: 190: { 2*: 191: Botan::TLS::New_Session_Ticket message(buffer); call 0 returned 0% #####: 192: }); -: 193: } 7: 194: else if(algo == "server_hello") call 0 returned 100% branch 1 taken 57% (fallthrough) branch 2 taken 43% -: 195: { 12: 196: result.test_throws("invalid server_hello input", exception, [&buffer]() call 0 returned 100% 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% -: 197: { 4*: 198: Botan::TLS::Server_Hello message(buffer); call 0 returned 0% call 1 never executed -: 199: }); -: 200: } 3: 201: else if(algo == "alert") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 202: { function _ZZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapEENKUlvE6_clEv.isra.0 called 3 returned 0% blocks executed 60% 9: 203: result.test_throws("invalid alert input", exception, [&buffer]() call 0 returned 100% 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 -: 204: { 3*: 205: Botan::secure_vector sb(buffer.begin(), buffer.end()); call 0 returned 100% 3: 206: Botan::TLS::Alert message(sb); call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% (throw) #####: 207: }); -: 208: } -: 209: else -: 210: { #####: 211: throw Test_Error("Unknown message type " + algo + " in TLS parsing tests"); 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 -: 212: } -: 213: } -: 214: 98: 215: return result; branch 0 taken 2% (fallthrough) branch 1 taken 98% -: 216: } -: 217: function _ZN11Botan_Tests12_GLOBAL__N_124TLS_Message_Parsing_Test15run_final_testsEv called 1 returned 100% blocks executed 62% 1: 218: std::vector run_final_tests() override -: 219: { 1: 220: std::vector results; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 221: 2: 222: results.push_back(test_hello_verify_request()); 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 -: 223: 1: 224: return results; -: 225: } -: 226: }; -: 227: -: 228:BOTAN_REGISTER_TEST("tls", "tls_messages", TLS_Message_Parsing_Test); -: 229: -: 230:#endif -: 231: -: 232:} -: 233: -: 234:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#error.hpp.gcov -: 0:Source:/usr/include/boost/asio/error.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:// -: 2:// error.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_ERROR_HPP -: 12:#define BOOST_ASIO_ERROR_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:#if defined(BOOST_ASIO_WINDOWS) \ -: 23: || defined(__CYGWIN__) \ -: 24: || defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 25:# include -: 26:#else -: 27:# include -: 28:# include -: 29:#endif -: 30: -: 31:#if defined(GENERATING_DOCUMENTATION) -: 32:/// INTERNAL ONLY. -: 33:# define BOOST_ASIO_NATIVE_ERROR(e) implementation_defined -: 34:/// INTERNAL ONLY. -: 35:# define BOOST_ASIO_SOCKET_ERROR(e) implementation_defined -: 36:/// INTERNAL ONLY. -: 37:# define BOOST_ASIO_NETDB_ERROR(e) implementation_defined -: 38:/// INTERNAL ONLY. -: 39:# define BOOST_ASIO_GETADDRINFO_ERROR(e) implementation_defined -: 40:/// INTERNAL ONLY. -: 41:# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) implementation_defined -: 42:#elif defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 43:# define BOOST_ASIO_NATIVE_ERROR(e) __HRESULT_FROM_WIN32(e) -: 44:# define BOOST_ASIO_SOCKET_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e) -: 45:# define BOOST_ASIO_NETDB_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e) -: 46:# define BOOST_ASIO_GETADDRINFO_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e) -: 47:# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win -: 48:#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) -: 49:# define BOOST_ASIO_NATIVE_ERROR(e) e -: 50:# define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e -: 51:# define BOOST_ASIO_NETDB_ERROR(e) WSA ## e -: 52:# define BOOST_ASIO_GETADDRINFO_ERROR(e) WSA ## e -: 53:# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win -: 54:#else -: 55:# define BOOST_ASIO_NATIVE_ERROR(e) e -: 56:# define BOOST_ASIO_SOCKET_ERROR(e) e -: 57:# define BOOST_ASIO_NETDB_ERROR(e) e -: 58:# define BOOST_ASIO_GETADDRINFO_ERROR(e) e -: 59:# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_posix -: 60:#endif -: 61: -: 62:#include -: 63: -: 64:namespace boost { -: 65:namespace asio { -: 66:namespace error { -: 67: -: 68:enum basic_errors -: 69:{ -: 70: /// Permission denied. -: 71: access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES), -: 72: -: 73: /// Address family not supported by protocol. -: 74: address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(EAFNOSUPPORT), -: 75: -: 76: /// Address already in use. -: 77: address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE), -: 78: -: 79: /// Transport endpoint is already connected. -: 80: already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN), -: 81: -: 82: /// Operation already in progress. -: 83: already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY), -: 84: -: 85: /// Broken pipe. -: 86: broken_pipe = BOOST_ASIO_WIN_OR_POSIX( -: 87: BOOST_ASIO_NATIVE_ERROR(ERROR_BROKEN_PIPE), -: 88: BOOST_ASIO_NATIVE_ERROR(EPIPE)), -: 89: -: 90: /// A connection has been aborted. -: 91: connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED), -: 92: -: 93: /// Connection refused. -: 94: connection_refused = BOOST_ASIO_SOCKET_ERROR(ECONNREFUSED), -: 95: -: 96: /// Connection reset by peer. -: 97: connection_reset = BOOST_ASIO_SOCKET_ERROR(ECONNRESET), -: 98: -: 99: /// Bad file descriptor. -: 100: bad_descriptor = BOOST_ASIO_SOCKET_ERROR(EBADF), -: 101: -: 102: /// Bad address. -: 103: fault = BOOST_ASIO_SOCKET_ERROR(EFAULT), -: 104: -: 105: /// No route to host. -: 106: host_unreachable = BOOST_ASIO_SOCKET_ERROR(EHOSTUNREACH), -: 107: -: 108: /// Operation now in progress. -: 109: in_progress = BOOST_ASIO_SOCKET_ERROR(EINPROGRESS), -: 110: -: 111: /// Interrupted system call. -: 112: interrupted = BOOST_ASIO_SOCKET_ERROR(EINTR), -: 113: -: 114: /// Invalid argument. -: 115: invalid_argument = BOOST_ASIO_SOCKET_ERROR(EINVAL), -: 116: -: 117: /// Message too long. -: 118: message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE), -: 119: -: 120: /// The name was too long. -: 121: name_too_long = BOOST_ASIO_SOCKET_ERROR(ENAMETOOLONG), -: 122: -: 123: /// Network is down. -: 124: network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN), -: 125: -: 126: /// Network dropped connection on reset. -: 127: network_reset = BOOST_ASIO_SOCKET_ERROR(ENETRESET), -: 128: -: 129: /// Network is unreachable. -: 130: network_unreachable = BOOST_ASIO_SOCKET_ERROR(ENETUNREACH), -: 131: -: 132: /// Too many open files. -: 133: no_descriptors = BOOST_ASIO_SOCKET_ERROR(EMFILE), -: 134: -: 135: /// No buffer space available. -: 136: no_buffer_space = BOOST_ASIO_SOCKET_ERROR(ENOBUFS), -: 137: -: 138: /// Cannot allocate memory. -: 139: no_memory = BOOST_ASIO_WIN_OR_POSIX( -: 140: BOOST_ASIO_NATIVE_ERROR(ERROR_OUTOFMEMORY), -: 141: BOOST_ASIO_NATIVE_ERROR(ENOMEM)), -: 142: -: 143: /// Operation not permitted. -: 144: no_permission = BOOST_ASIO_WIN_OR_POSIX( -: 145: BOOST_ASIO_NATIVE_ERROR(ERROR_ACCESS_DENIED), -: 146: BOOST_ASIO_NATIVE_ERROR(EPERM)), -: 147: -: 148: /// Protocol not available. -: 149: no_protocol_option = BOOST_ASIO_SOCKET_ERROR(ENOPROTOOPT), -: 150: -: 151: /// No such device. -: 152: no_such_device = BOOST_ASIO_WIN_OR_POSIX( -: 153: BOOST_ASIO_NATIVE_ERROR(ERROR_BAD_UNIT), -: 154: BOOST_ASIO_NATIVE_ERROR(ENODEV)), -: 155: -: 156: /// Transport endpoint is not connected. -: 157: not_connected = BOOST_ASIO_SOCKET_ERROR(ENOTCONN), -: 158: -: 159: /// Socket operation on non-socket. -: 160: not_socket = BOOST_ASIO_SOCKET_ERROR(ENOTSOCK), -: 161: -: 162: /// Operation cancelled. -: 163: operation_aborted = BOOST_ASIO_WIN_OR_POSIX( -: 164: BOOST_ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED), -: 165: BOOST_ASIO_NATIVE_ERROR(ECANCELED)), -: 166: -: 167: /// Operation not supported. -: 168: operation_not_supported = BOOST_ASIO_SOCKET_ERROR(EOPNOTSUPP), -: 169: -: 170: /// Cannot send after transport endpoint shutdown. -: 171: shut_down = BOOST_ASIO_SOCKET_ERROR(ESHUTDOWN), -: 172: -: 173: /// Connection timed out. -: 174: timed_out = BOOST_ASIO_SOCKET_ERROR(ETIMEDOUT), -: 175: -: 176: /// Resource temporarily unavailable. -: 177: try_again = BOOST_ASIO_WIN_OR_POSIX( -: 178: BOOST_ASIO_NATIVE_ERROR(ERROR_RETRY), -: 179: BOOST_ASIO_NATIVE_ERROR(EAGAIN)), -: 180: -: 181: /// The socket is marked non-blocking and the requested operation would block. -: 182: would_block = BOOST_ASIO_SOCKET_ERROR(EWOULDBLOCK) -: 183:}; -: 184: -: 185:enum netdb_errors -: 186:{ -: 187: /// Host not found (authoritative). -: 188: host_not_found = BOOST_ASIO_NETDB_ERROR(HOST_NOT_FOUND), -: 189: -: 190: /// Host not found (non-authoritative). -: 191: host_not_found_try_again = BOOST_ASIO_NETDB_ERROR(TRY_AGAIN), -: 192: -: 193: /// The query is valid but does not have associated address data. -: 194: no_data = BOOST_ASIO_NETDB_ERROR(NO_DATA), -: 195: -: 196: /// A non-recoverable error occurred. -: 197: no_recovery = BOOST_ASIO_NETDB_ERROR(NO_RECOVERY) -: 198:}; -: 199: -: 200:enum addrinfo_errors -: 201:{ -: 202: /// The service is not supported for the given socket type. -: 203: service_not_found = BOOST_ASIO_WIN_OR_POSIX( -: 204: BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND), -: 205: BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE)), -: 206: -: 207: /// The socket type is not supported. -: 208: socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX( -: 209: BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT), -: 210: BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE)) -: 211:}; -: 212: -: 213:enum misc_errors -: 214:{ -: 215: /// Already open. -: 216: already_open = 1, -: 217: -: 218: /// End of file or stream. -: 219: eof, -: 220: -: 221: /// Element not found. -: 222: not_found, -: 223: -: 224: /// The descriptor cannot fit into the select system call's fd_set. -: 225: fd_set_failure -: 226:}; -: 227: #####: 228:inline const boost::system::error_category& get_system_category() -: 229:{ #####: 230: return boost::system::system_category(); call 0 never executed call 1 never executed call 2 never executed call 3 never executed call 4 never executed call 5 never executed call 6 never executed call 7 never executed call 8 never executed call 9 never executed call 10 never executed call 11 never executed call 12 never executed call 13 never executed -: 231:} -: 232: -: 233:#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) -: 234: -: 235:extern BOOST_ASIO_DECL -: 236:const boost::system::error_category& get_netdb_category(); -: 237: -: 238:extern BOOST_ASIO_DECL -: 239:const boost::system::error_category& get_addrinfo_category(); -: 240: -: 241:#else // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) -: 242: -: 243:inline const boost::system::error_category& get_netdb_category() -: 244:{ -: 245: return get_system_category(); -: 246:} -: 247: -: 248:inline const boost::system::error_category& get_addrinfo_category() -: 249:{ -: 250: return get_system_category(); -: 251:} -: 252: -: 253:#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__) -: 254: -: 255:extern BOOST_ASIO_DECL -: 256:const boost::system::error_category& get_misc_category(); -: 257: -: 258:static const boost::system::error_category& -: 259: system_category BOOST_ASIO_UNUSED_VARIABLE -: 260: = boost::asio::error::get_system_category(); -: 261:static const boost::system::error_category& -: 262: netdb_category BOOST_ASIO_UNUSED_VARIABLE -: 263: = boost::asio::error::get_netdb_category(); -: 264:static const boost::system::error_category& -: 265: addrinfo_category BOOST_ASIO_UNUSED_VARIABLE -: 266: = boost::asio::error::get_addrinfo_category(); -: 267:static const boost::system::error_category& -: 268: misc_category BOOST_ASIO_UNUSED_VARIABLE -: 269: = boost::asio::error::get_misc_category(); -: 270: -: 271:} // namespace error -: 272:} // namespace asio -: 273:} // namespace boost -: 274: -: 275:namespace boost { -: 276:namespace system { -: 277: -: 278:template<> struct is_error_code_enum -: 279:{ -: 280: static const bool value = true; -: 281:}; -: 282: -: 283:template<> struct is_error_code_enum -: 284:{ -: 285: static const bool value = true; -: 286:}; -: 287: -: 288:template<> struct is_error_code_enum -: 289:{ -: 290: static const bool value = true; -: 291:}; -: 292: -: 293:template<> struct is_error_code_enum -: 294:{ -: 295: static const bool value = true; -: 296:}; -: 297: -: 298:} // namespace system -: 299:} // namespace boost -: 300: -: 301:namespace boost { -: 302:namespace asio { -: 303:namespace error { -: 304: function _ZN5boost4asio5error15make_error_codeENS1_12basic_errorsE called 0 returned 0% blocks executed 0% #####: 305:inline boost::system::error_code make_error_code(basic_errors e) -: 306:{ #####: 307: return boost::system::error_code( call 0 never executed call 1 never executed #####: 308: static_cast(e), get_system_category()); -: 309:} -: 310: function _ZN5boost4asio5error15make_error_codeENS1_12netdb_errorsE called 0 returned 0% blocks executed 0% #####: 311:inline boost::system::error_code make_error_code(netdb_errors e) -: 312:{ #####: 313: return boost::system::error_code( call 0 never executed call 1 never executed #####: 314: static_cast(e), get_netdb_category()); -: 315:} -: 316: function _ZN5boost4asio5error15make_error_codeENS1_15addrinfo_errorsE called 0 returned 0% blocks executed 0% #####: 317:inline boost::system::error_code make_error_code(addrinfo_errors e) -: 318:{ #####: 319: return boost::system::error_code( call 0 never executed call 1 never executed #####: 320: static_cast(e), get_addrinfo_category()); -: 321:} -: 322: function _ZN5boost4asio5error15make_error_codeENS1_11misc_errorsE called 0 returned 0% blocks executed 0% #####: 323:inline boost::system::error_code make_error_code(misc_errors e) -: 324:{ #####: 325: return boost::system::error_code( call 0 never executed call 1 never executed #####: 326: static_cast(e), get_misc_category()); -: 327:} -: 328: -: 329:} // namespace error -: 330:namespace stream_errc { -: 331: // Simulates the proposed stream_errc scoped enum. -: 332: using error::eof; -: 333: using error::not_found; -: 334:} // namespace stream_errc -: 335:namespace socket_errc { -: 336: // Simulates the proposed socket_errc scoped enum. -: 337: using error::already_open; -: 338: using error::not_found; -: 339:} // namespace socket_errc -: 340:namespace resolver_errc { -: 341: // Simulates the proposed resolver_errc scoped enum. -: 342: using error::host_not_found; -: 343: const error::netdb_errors try_again = error::host_not_found_try_again; -: 344: using error::service_not_found; -: 345:} // namespace resolver_errc -: 346:} // namespace asio -: 347:} // namespace boost -: 348: -: 349:#include -: 350: -: 351:#undef BOOST_ASIO_NATIVE_ERROR -: 352:#undef BOOST_ASIO_SOCKET_ERROR -: 353:#undef BOOST_ASIO_NETDB_ERROR -: 354:#undef BOOST_ASIO_GETADDRINFO_ERROR -: 355:#undef BOOST_ASIO_WIN_OR_POSIX -: 356: -: 357:#if defined(BOOST_ASIO_HEADER_ONLY) -: 358:# include -: 359:#endif // defined(BOOST_ASIO_HEADER_ONLY) -: 360: -: 361:#endif // BOOST_ASIO_ERROR_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#ec_group#point_mul.cpp.gcov -: 0:Source:src/lib/pubkey/ec_group/point_mul.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_ec_group_point_mul.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_ec_group_point_mul.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2015,2018 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:namespace { -: 17: 3796: 18:size_t blinding_size(const BigInt& group_order) -: 19: { 556: 20: return (group_order.bits() + 1) / 2; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 21: } -: 22: -: 23:} -: 24: function _ZN5Botan18multi_exponentiateERKNS_8PointGFpERKNS_6BigIntES2_S5_ called 0 returned 0% blocks executed 0% #####: 25:PointGFp multi_exponentiate(const PointGFp& x, const BigInt& z1, -: 26: const PointGFp& y, const BigInt& z2) -: 27: { #####: 28: PointGFp_Multi_Point_Precompute xy_mul(x, y); call 0 never executed #####: 29: return xy_mul.multi_exp(z1, z2); call 0 never executed branch 1 never executed branch 2 never executed -: 30: } -: 31: function _ZN5Botan22Blinded_Point_MultiplyC2ERKNS_8PointGFpERKNS_6BigIntEm called 0 returned 0% blocks executed 0% #####: 32:Blinded_Point_Multiply::Blinded_Point_Multiply(const PointGFp& base, -: 33: const BigInt& order, #####: 34: size_t h) : -: 35: m_ws(PointGFp::WORKSPACE_SIZE), #####: 36: m_order(order) call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 37: { #####: 38: BOTAN_UNUSED(h); #####: 39: Null_RNG null_rng; #####: 40: m_point_mul.reset(new PointGFp_Var_Point_Precompute(base, null_rng, m_ws)); 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 #####: 41: } -: 42: function _ZN5Botan22Blinded_Point_MultiplyD2Ev called 0 returned 0% blocks executed 0% #####: 43:Blinded_Point_Multiply::~Blinded_Point_Multiply() call 0 never executed call 1 never executed -: 44: { -: 45: /* for ~unique_ptr */ #####: 46: } -: 47: function _ZN5Botan22Blinded_Point_Multiply16blinded_multiplyERKNS_6BigIntERNS_21RandomNumberGeneratorE called 0 returned 0% blocks executed 0% #####: 48:PointGFp Blinded_Point_Multiply::blinded_multiply(const BigInt& scalar, -: 49: RandomNumberGenerator& rng) -: 50: { #####: 51: return m_point_mul->mul(scalar, rng, m_order, m_ws); call 0 never executed -: 52: } -: 53: function _ZN5Botan30PointGFp_Base_Point_PrecomputeC2ERKNS_8PointGFpERKNS_15Modular_ReducerE called 556 returned 100% blocks executed 65% 556: 54:PointGFp_Base_Point_Precompute::PointGFp_Base_Point_Precompute(const PointGFp& base, 556: 55: const Modular_Reducer& mod_order) : -: 56: m_base_point(base), -: 57: m_mod_order(mod_order), 556: 58: m_p_words(base.get_curve().get_p().sig_words()) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 59: { 1112: 60: std::vector ws(PointGFp::WORKSPACE_SIZE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 never executed branch 5 never executed -: 61: 556: 62: const size_t p_bits = base.get_curve().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) -: 63: -: 64: /* -: 65: * Some of the curves (eg secp160k1) have an order slightly larger than -: 66: * the size of the prime modulus. In all cases they are at most 1 bit -: 67: * longer. The +1 compensates for this. -: 68: */ 556: 69: const size_t T_bits = round_up(p_bits + blinding_size(mod_order.get_modulus()) + 1, WINDOW_BITS) / WINDOW_BITS; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 81% (fallthrough) branch 4 taken 19% -: 70: 1112: 71: std::vector T(WINDOW_SIZE*T_bits); 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 -: 72: 1112: 73: PointGFp g = base; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 1112: 74: PointGFp g2, g4; call 0 returned 100% call 1 returned 100% call 2 never executed -: 75: 87947: 76: for(size_t i = 0; i != T_bits; i++) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 77: { 87391: 78: g2 = g; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 87391: 79: g2.mult2(ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 87391: 80: g4 = g2; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 87391: 81: g4.mult2(ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 82: 87391: 83: T[7*i+0] = g; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 87391: 84: T[7*i+1] = std::move(g2); branch 0 taken 100% (fallthrough) branch 1 taken 0% 262173: 85: T[7*i+2] = T[7*i+1].plus(T[7*i+0], ws); // g2+g 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 87391: 86: T[7*i+3] = g4; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 262173: 87: T[7*i+4] = T[7*i+3].plus(T[7*i+0], ws); // g4+g 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 262173: 88: T[7*i+5] = T[7*i+3].plus(T[7*i+1], ws); // g4+g2 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 262173: 89: T[7*i+6] = T[7*i+3].plus(T[7*i+2], ws); // g4+g2+g 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 call 7 never executed -: 90: 87391: 91: g.swap(g4); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 87391: 92: g.mult2(ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 93: } -: 94: 556: 95: PointGFp::force_all_affine(T, ws[0].get_word_vector()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 96: 556: 97: m_W.resize(T.size() * 2 * m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 98: 556: 99: word* p = &m_W[0]; 612293: 100: for(size_t i = 0; i != T.size(); ++i) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 101: { 611737: 102: T[i].get_x().encode_words(p, m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 611737: 103: p += m_p_words; 611737: 104: T[i].get_y().encode_words(p, m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 611737: 105: p += m_p_words; -: 106: } 556: 107: } -: 108: function _ZNK5Botan30PointGFp_Base_Point_Precompute3mulERKNS_6BigIntERNS_21RandomNumberGeneratorES3_RSt6vectorIS1_SaIS1_EE called 1612 returned 100% blocks executed 60% 1612: 109:PointGFp PointGFp_Base_Point_Precompute::mul(const BigInt& k, -: 110: RandomNumberGenerator& rng, -: 111: const BigInt& group_order, -: 112: std::vector& ws) const -: 113: { 1612: 114: if(k.is_negative()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 115: throw Invalid_Argument("PointGFp_Base_Point_Precompute scalar must be positive"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 116: -: 117: // Instead of reducing k mod group order should we alter the mask size?? 1612: 118: BigInt scalar = m_mod_order.reduce(k); call 0 returned 100% -: 119: 1612: 120: if(rng.is_seeded()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 98% (fallthrough) branch 4 taken 2% -: 121: { -: 122: // Choose a small mask m and use k' = k + m*order (Coron's 1st countermeasure) 3168: 123: const BigInt mask(rng, blinding_size(group_order)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 3168: 124: scalar += group_order * mask; call 0 returned 100% 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 -: 125: } -: 126: else -: 127: { -: 128: /* -: 129: When we don't have an RNG we cannot do scalar blinding. Instead use the -: 130: same trick as OpenSSL and add one or two copies of the order to normalize -: 131: the length of the scalar at order.bits()+1. This at least ensures the loop -: 132: bound does not leak information about the high bits of the scalar. -: 133: */ 28: 134: scalar += group_order; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 28: 135: if(scalar.bits() == group_order.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 29% (fallthrough) branch 7 taken 71% 8: 136: scalar += group_order; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1612: 137: BOTAN_DEBUG_ASSERT(scalar.bits() == group_order.bits() + 1); -: 138: } -: 139: 1612: 140: const size_t windows = round_up(scalar.bits(), WINDOW_BITS) / WINDOW_BITS; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 25% (fallthrough) branch 4 taken 75% -: 141: 1612: 142: const size_t elem_size = 2*m_p_words; -: 143: 1612*: 144: BOTAN_ASSERT(windows <= m_W.size() / (3*elem_size), branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed -: 145: "Precomputed sufficient values for scalar mult"); -: 146: 1612: 147: PointGFp R = m_base_point.zero(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 148: 1612: 149: if(ws.size() < PointGFp::WORKSPACE_SIZE) branch 0 taken 92% (fallthrough) branch 1 taken 8% 1491: 150: ws.resize(PointGFp::WORKSPACE_SIZE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 151: -: 152: // the precomputed multiples are not secret so use std::vector 3224: 153: std::vector Wt(elem_size); 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 -: 154: 245615: 155: for(size_t i = 0; i != windows; ++i) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 156: { 244003: 157: const size_t window = windows - i - 1; 244003: 158: const size_t base_addr = (WINDOW_SIZE*window)*elem_size; -: 159: 244003: 160: const word w = scalar.get_substring(WINDOW_BITS*window, WINDOW_BITS); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 161: 244003: 162: const auto w_is_1 = CT::Mask::is_equal(w, 1); 244003: 163: const auto w_is_2 = CT::Mask::is_equal(w, 2); 244003: 164: const auto w_is_3 = CT::Mask::is_equal(w, 3); 244003: 165: const auto w_is_4 = CT::Mask::is_equal(w, 4); 244003: 166: const auto w_is_5 = CT::Mask::is_equal(w, 5); 244003: 167: const auto w_is_6 = CT::Mask::is_equal(w, 6); 244003: 168: const auto w_is_7 = CT::Mask::is_equal(w, 7); -: 169: 2937615: 170: for(size_t j = 0; j != elem_size; ++j) branch 0 taken 92% (fallthrough) branch 1 taken 8% -: 171: { 2693612: 172: const word w1 = w_is_1.if_set_return(m_W[base_addr + 0*elem_size + j]); 2693612: 173: const word w2 = w_is_2.if_set_return(m_W[base_addr + 1*elem_size + j]); 2693612: 174: const word w3 = w_is_3.if_set_return(m_W[base_addr + 2*elem_size + j]); 2693612: 175: const word w4 = w_is_4.if_set_return(m_W[base_addr + 3*elem_size + j]); 2693612: 176: const word w5 = w_is_5.if_set_return(m_W[base_addr + 4*elem_size + j]); 2693612: 177: const word w6 = w_is_6.if_set_return(m_W[base_addr + 5*elem_size + j]); 2693612: 178: const word w7 = w_is_7.if_set_return(m_W[base_addr + 6*elem_size + j]); -: 179: 2693612: 180: Wt[j] = w1 | w2 | w3 | w4 | w5 | w6 | w7; -: 181: } -: 182: 244003: 183: R.add_affine(&Wt[0], m_p_words, &Wt[m_p_words], m_p_words, ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 184: 244003: 185: if(i == 0 && rng.is_seeded()) branch 0 taken 1% (fallthrough) branch 1 taken 99% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 98% (fallthrough) branch 6 taken 2% -: 186: { -: 187: /* -: 188: * Since we start with the top bit of the exponent we know the -: 189: * first window must have a non-zero element, and thus R is -: 190: * now a point other than the point at infinity. -: 191: */ 1584: 192: BOTAN_DEBUG_ASSERT(w != 0); 1584: 193: R.randomize_repr(rng, ws[0].get_word_vector()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 194: } -: 195: } -: 196: 1612: 197: BOTAN_DEBUG_ASSERT(R.on_the_curve()); -: 198: 3224: 199: return R; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 200: } -: 201: function _ZN5Botan29PointGFp_Var_Point_PrecomputeC2ERKNS_8PointGFpERNS_21RandomNumberGeneratorERSt6vectorINS_6BigIntESaIS7_EE called 1656 returned 100% blocks executed 73% 1656: 202:PointGFp_Var_Point_Precompute::PointGFp_Var_Point_Precompute(const PointGFp& point, -: 203: RandomNumberGenerator& rng, 1656: 204: std::vector& ws) : -: 205: m_curve(point.get_curve()), 1656: 206: m_p_words(m_curve.get_p().sig_words()), branch 0 taken 0% (fallthrough) branch 1 taken 100% 3312: 207: m_window_bits(4) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 24% (fallthrough) branch 5 taken 76% branch 6 never executed branch 7 never executed -: 208: { 1656: 209: if(ws.size() < PointGFp::WORKSPACE_SIZE) branch 0 taken 24% (fallthrough) branch 1 taken 76% 400: 210: ws.resize(PointGFp::WORKSPACE_SIZE); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 211: 3312: 212: std::vector U(static_cast(1) << m_window_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 never executed branch 5 never executed 3312: 213: U[0] = point.zero(); 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 1656: 214: U[1] = point; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 215: 13248: 216: for(size_t i = 2; i < U.size(); i += 2) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 217: { 34776: 218: U[i] = U[i/2].double_of(ws); 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 34776: 219: U[i+1] = U[i].plus(point, ws); 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 call 7 never executed -: 220: } -: 221: -: 222: // Hack to handle Blinded_Point_Multiply 1656: 223: 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% -: 224: { 1656: 225: BigInt& mask = ws[0]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1656: 226: BigInt& mask2 = ws[1]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1656: 227: BigInt& mask3 = ws[2]; 1656: 228: BigInt& new_x = ws[3]; 1656: 229: BigInt& new_y = ws[4]; 1656: 230: BigInt& new_z = ws[5]; 1656: 231: secure_vector& tmp = ws[6].get_word_vector(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 232: 1656: 233: const CurveGFp& curve = U[0].get_curve(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 234: 1656: 235: const size_t p_bits = curve.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) -: 236: -: 237: // Skipping zero point since it can't be randomized 26496: 238: for(size_t i = 1; i != U.size(); ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 239: { 24840: 240: mask.randomize(rng, p_bits - 1, false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 241: // Easy way of ensuring mask != 0 24840: 242: mask.set_bit(0); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 243: 24840: 244: curve.sqr(mask2, mask, tmp); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 24840: 245: curve.mul(mask3, mask, mask2, tmp); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 246: 24840: 247: curve.mul(new_x, U[i].get_x(), mask2, tmp); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 24840: 248: curve.mul(new_y, U[i].get_y(), mask3, tmp); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 24840: 249: curve.mul(new_z, U[i].get_z(), mask, tmp); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 250: 24840: 251: U[i].swap_coords(new_x, new_y, new_z); call 0 returned 100% -: 252: } -: 253: } -: 254: 1656: 255: m_T.resize(U.size() * 3 * m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 256: 1656: 257: word* p = &m_T[0]; 28152: 258: for(size_t i = 0; i != U.size(); ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 259: { 26496: 260: U[i].get_x().encode_words(p , m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 26496: 261: U[i].get_y().encode_words(p + m_p_words, m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 26496: 262: U[i].get_z().encode_words(p + 2*m_p_words, m_p_words); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 26496: 263: p += 3*m_p_words; -: 264: } 1656: 265: } -: 266: function _ZNK5Botan29PointGFp_Var_Point_Precompute3mulERKNS_6BigIntERNS_21RandomNumberGeneratorES3_RSt6vectorIS1_SaIS1_EE called 1656 returned 100% blocks executed 61% 1656: 267:PointGFp PointGFp_Var_Point_Precompute::mul(const BigInt& k, -: 268: RandomNumberGenerator& rng, -: 269: const BigInt& group_order, -: 270: std::vector& ws) const -: 271: { 1656: 272: if(k.is_negative()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 273: throw Invalid_Argument("PointGFp_Var_Point_Precompute scalar must be positive"); 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 1656: 274: if(ws.size() < PointGFp::WORKSPACE_SIZE) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 275: ws.resize(PointGFp::WORKSPACE_SIZE); call 0 never executed -: 276: -: 277: // Choose a small mask m and use k' = k + m*order (Coron's 1st countermeasure) 1656: 278: const BigInt mask(rng, blinding_size(group_order), false); call 0 returned 100% call 1 returned 100% 3312: 279: const BigInt scalar = k + group_order * mask; call 0 returned 100% 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 -: 280: 1656: 281: const size_t elem_size = 3*m_p_words; 1656: 282: const size_t window_elems = static_cast(1) << m_window_bits; -: 283: 1656: 284: size_t windows = round_up(scalar.bits(), m_window_bits) / m_window_bits; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% 1656: 285: PointGFp R(m_curve); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3312: 286: secure_vector e(elem_size); 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 -: 287: 1656: 288: if(windows > 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 289: { 1656: 290: windows--; -: 291: 1656: 292: const uint32_t w = scalar.get_substring(windows*m_window_bits, m_window_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 293: 1656: 294: clear_mem(e.data(), e.size()); branch 0 taken 100% (fallthrough) branch 1 taken 0% 26496: 295: for(size_t i = 1; i != window_elems; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 296: { 24840: 297: const auto wmask = CT::Mask::is_equal(w, i); -: 298: 358650: 299: for(size_t j = 0; j != elem_size; ++j) branch 0 taken 93% (fallthrough) branch 1 taken 7% -: 300: { 333810: 301: e[j] |= wmask.if_set_return(m_T[i * elem_size + j]); -: 302: } -: 303: } -: 304: 1656: 305: R.add(&e[0], m_p_words, &e[m_p_words], m_p_words, &e[2*m_p_words], m_p_words, ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 306: -: 307: /* -: 308: Randomize after adding the first nibble as before the addition R -: 309: is zero, and we cannot effectively randomize the point -: 310: representation of the zero point. -: 311: */ 1656: 312: R.randomize_repr(rng, ws[0].get_word_vector()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 313: } -: 314: 171991: 315: while(windows) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 316: { 170335: 317: R.mult2i(m_window_bits, ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 318: 170335: 319: const uint32_t w = scalar.get_substring((windows-1)*m_window_bits, m_window_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 320: 170335: 321: clear_mem(e.data(), e.size()); branch 0 taken 100% (fallthrough) branch 1 taken 0% 2725360: 322: for(size_t i = 1; i != window_elems; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 323: { 2555025: 324: const auto wmask = CT::Mask::is_equal(w, i); -: 325: 42404370: 326: for(size_t j = 0; j != elem_size; ++j) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 327: { 39849345: 328: e[j] |= wmask.if_set_return(m_T[i * elem_size + j]); -: 329: } -: 330: } -: 331: 170335: 332: R.add(&e[0], m_p_words, &e[m_p_words], m_p_words, &e[2*m_p_words], m_p_words, ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 333: -: 334: windows--; -: 335: } -: 336: 1656: 337: BOTAN_DEBUG_ASSERT(R.on_the_curve()); -: 338: 3312: 339: return R; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 340: } -: 341: -: 342: function _ZN5Botan31PointGFp_Multi_Point_PrecomputeC2ERKNS_8PointGFpES3_ called 5581 returned 100% blocks executed 58% 5581: 343:PointGFp_Multi_Point_Precompute::PointGFp_Multi_Point_Precompute(const PointGFp& x, 5581: 344: const PointGFp& y) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 345: { 11162: 346: std::vector ws(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 -: 347: 11162: 348: PointGFp x2 = x; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 5581: 349: x2.mult2(ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 350: 11162: 351: const PointGFp x3(x2.plus(x, ws)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 352: 11162: 353: PointGFp y2 = y; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed 5581: 354: y2.mult2(ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 355: 5581: 356: const PointGFp y3(y2.plus(y, ws)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 357: 5581: 358: m_M.reserve(15); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 359: 5581: 360: m_M.push_back(x); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5581: 361: m_M.push_back(x2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 5581: 362: m_M.push_back(x3); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 363: 5581: 364: m_M.push_back(y); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 11162: 365: m_M.push_back(y.plus(x, 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) call 6 returned 100% call 7 never executed 11162: 366: m_M.push_back(y.plus(x2, 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) call 6 returned 100% call 7 never executed 11162: 367: m_M.push_back(y.plus(x3, 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) call 6 returned 100% call 7 never executed -: 368: 5581: 369: m_M.push_back(y2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 11162: 370: m_M.push_back(y2.plus(x, 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) call 6 returned 100% call 7 never executed 11162: 371: m_M.push_back(y2.plus(x2, 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) call 6 returned 100% call 7 never executed 11162: 372: m_M.push_back(y2.plus(x3, 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) call 6 returned 100% call 7 never executed -: 373: 5581: 374: m_M.push_back(y3); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 11162: 375: m_M.push_back(y3.plus(x, 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) call 6 returned 100% call 7 never executed 11162: 376: m_M.push_back(y3.plus(x2, 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) call 6 returned 100% call 7 never executed 11162: 377: m_M.push_back(y3.plus(x3, 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) call 6 returned 100% call 7 never executed call 8 never executed -: 378: 5581: 379: bool no_infinity = true; 89296: 380: for(auto& pt : m_M) branch 0 taken 94% (fallthrough) branch 1 taken 6% branch 2 taken 90% (fallthrough) branch 3 taken 10% -: 381: { 158875: 382: if(pt.is_zero()) branch 0 taken 90% (fallthrough) branch 1 taken 10% branch 2 taken 1% (fallthrough) branch 3 taken 100% 84: 383: no_infinity = false; -: 384: } -: 385: 5581: 386: if(no_infinity) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 387: { 5553: 388: PointGFp::force_all_affine(m_M, ws[0].get_word_vector()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 389: } -: 390: 5581: 391: m_no_infinity = no_infinity; call 0 returned 100% 5581: 392: } -: 393: function _ZNK5Botan31PointGFp_Multi_Point_Precompute9multi_expERKNS_6BigIntES3_ called 5645 returned 100% blocks executed 85% 5645: 394:PointGFp PointGFp_Multi_Point_Precompute::multi_exp(const BigInt& z1, -: 395: const BigInt& z2) const -: 396: { 5645: 397: std::vector ws(PointGFp::WORKSPACE_SIZE); call 0 returned 100% -: 398: 7688: 399: const size_t z_bits = round_up(std::max(z1.bits(), z2.bits()), 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) branch 6 taken 36% (fallthrough) branch 7 taken 64% branch 8 taken 33% (fallthrough) branch 9 taken 67% call 10 never executed -: 400: 5645: 401: PointGFp H = m_M[0].zero(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 402: 887742: 403: for(size_t i = 0; i != z_bits; i += 2) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 404: { 882097: 405: if(i > 0) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 406: { 876452: 407: H.mult2i(2, ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 408: } -: 409: 882097: 410: const uint32_t z1_b = z1.get_substring(z_bits - i - 2, 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 882097: 411: const uint32_t z2_b = z2.get_substring(z_bits - i - 2, 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 412: 882097: 413: const uint32_t z12 = (4*z2_b) + z1_b; -: 414: -: 415: // This function is not intended to be const time 882097: 416: if(z12) branch 0 taken 93% (fallthrough) branch 1 taken 7% -: 417: { 819527: 418: if(m_no_infinity) branch 0 taken 99% (fallthrough) branch 1 taken 1% 814032: 419: H.add_affine(m_M[z12-1], ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 420: else 5495: 421: H.add(m_M[z12-1], ws); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 422: } -: 423: } -: 424: 5645: 425: if(z1.is_negative() != z2.is_negative()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 426: H.negate(); call 0 never executed branch 1 never executed branch 2 never executed -: 427: 5645: 428: return H; call 0 returned 100% -: 429: } -: 430: -: 431:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#emsa_x931.h.gcov -: 0:Source:build/include/botan/emsa_x931.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pk_pad_emsa_x931.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pk_pad_emsa_x931.gcda -: 0:Runs:2960 -: 1:/* -: 2:* X9.31 EMSA -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_EMSA_X931_H_ -: 9:#define BOTAN_EMSA_X931_H_ -: 10: -: 11:#include -: 12:#include -: 13: -: 14:BOTAN_FUTURE_INTERNAL_HEADER(emsa_x931.h) -: 15: -: 16:namespace Botan { -: 17: -: 18:/** -: 19:* EMSA from X9.31 (EMSA2 in IEEE 1363) -: 20:* Useful for Rabin-Williams, also sometimes used with RSA in -: 21:* odd protocols. -: 22:*/ -: 23:class BOTAN_PUBLIC_API(2,0) EMSA_X931 final : public EMSA -: 24: { -: 25: public: -: 26: /** -: 27: * @param hash the hash function to use -: 28: */ -: 29: explicit EMSA_X931(HashFunction* hash); -: 30: function _ZN5Botan9EMSA_X9315cloneEv called 0 returned 0% blocks executed 0% #####: 31: EMSA* clone() override { return new EMSA_X931(m_hash->clone()); } call 0 never executed call 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed -: 32: -: 33: std::string name() const override; -: 34: -: 35: private: -: 36: void update(const uint8_t[], size_t) override; -: 37: secure_vector raw_data() override; -: 38: -: 39: secure_vector encoding_of(const secure_vector&, size_t, -: 40: RandomNumberGenerator& rng) override; -: 41: -: 42: bool verify(const secure_vector&, const secure_vector&, -: 43: size_t) override; -: 44: -: 45: secure_vector m_empty_hash; -: 46: std::unique_ptr m_hash; -: 47: uint8_t m_hash_id; -: 48: }; -: 49: -: 50:} -: 51: -: 52:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#tls#tls_algos.cpp.gcov -: 0:Source:src/lib/tls/tls_algos.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/tls_algos.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/tls_algos.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2017 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include -: 8:#include -: 9: -: 10:namespace Botan { -: 11: -: 12:namespace TLS { -: 13: function _ZN5Botan3TLS18kdf_algo_to_stringB5cxx11ENS0_8KDF_AlgoE called 418134 returned 100% blocks executed 32% 418134: 14:std::string kdf_algo_to_string(KDF_Algo algo) -: 15: { 418134: 16: switch(algo) branch 0 taken 28% branch 1 taken 52% branch 2 taken 20% branch 3 taken 0% -: 17: { 117145: 18: case KDF_Algo::SHA_1: 117145: 19: return "SHA-1"; call 0 returned 100% 218881: 20: case KDF_Algo::SHA_256: 218881: 21: return "SHA-256"; call 0 returned 100% 82108: 22: case KDF_Algo::SHA_384: 82108: 23: return "SHA-384"; call 0 returned 100% -: 24: } -: 25: #####: 26: throw Invalid_State("kdf_algo_to_string unknown enum value"); 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 -: 27: } -: 28: function _ZN5Botan3TLS20kex_method_to_stringB5cxx11ENS0_8Kex_AlgoE called 11974 returned 100% blocks executed 46% 11974: 29:std::string kex_method_to_string(Kex_Algo method) -: 30: { 11974: 31: switch(method) branch 0 taken 9% branch 1 taken 29% branch 2 taken 25% branch 3 taken 12% branch 4 taken 1% branch 5 taken 9% branch 6 taken 8% branch 7 taken 7% branch 8 taken 0% -: 32: { 1113: 33: case Kex_Algo::STATIC_RSA: 1113: 34: return "RSA"; call 0 returned 100% 3491: 35: case Kex_Algo::DH: 3491: 36: return "DH"; call 0 returned 100% 3038: 37: case Kex_Algo::ECDH: 3038: 38: return "ECDH"; call 0 returned 100% 1421: 39: case Kex_Algo::CECPQ1: 1421: 40: return "CECPQ1"; call 0 returned 100% 61: 41: case Kex_Algo::SRP_SHA: 61: 42: return "SRP_SHA"; call 0 returned 100% 1030: 43: case Kex_Algo::PSK: 1030: 44: return "PSK"; call 0 returned 100% 991: 45: case Kex_Algo::DHE_PSK: 991: 46: return "DHE_PSK"; call 0 returned 100% 829: 47: case Kex_Algo::ECDHE_PSK: 829: 48: return "ECDHE_PSK"; call 0 returned 100% -: 49: } -: 50: #####: 51: throw Invalid_State("kex_method_to_string unknown enum value"); 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 -: 52: } -: 53: function _ZN5Botan3TLS22kex_method_from_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 8 returned 100% blocks executed 60% 8: 54:Kex_Algo kex_method_from_string(const std::string& str) -: 55: { 8: 56: if(str == "RSA") call 0 returned 100% branch 1 taken 88% (fallthrough) branch 2 taken 12% -: 57: return Kex_Algo::STATIC_RSA; -: 58: 7: 59: if(str == "DH") call 0 returned 100% branch 1 taken 86% (fallthrough) branch 2 taken 14% -: 60: return Kex_Algo::DH; -: 61: 6: 62: if(str == "ECDH") call 0 returned 100% branch 1 taken 83% (fallthrough) branch 2 taken 17% -: 63: return Kex_Algo::ECDH; -: 64: 5: 65: if(str == "CECPQ1") call 0 returned 100% branch 1 taken 80% (fallthrough) branch 2 taken 20% -: 66: return Kex_Algo::CECPQ1; -: 67: 4: 68: if(str == "SRP_SHA") call 0 returned 100% branch 1 taken 75% (fallthrough) branch 2 taken 25% -: 69: return Kex_Algo::SRP_SHA; -: 70: 3: 71: if(str == "PSK") call 0 returned 100% branch 1 taken 67% (fallthrough) branch 2 taken 33% -: 72: return Kex_Algo::PSK; -: 73: 2: 74: if(str == "DHE_PSK") call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% -: 75: return Kex_Algo::DHE_PSK; -: 76: 1: 77: if(str == "ECDHE_PSK") call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 78: return Kex_Algo::ECDHE_PSK; -: 79: #####: 80: throw Invalid_Argument("Unknown kex method " + str); 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 -: 81: } -: 82: function _ZN5Botan3TLS21auth_method_to_stringB5cxx11ENS0_11Auth_MethodE called 9589 returned 100% blocks executed 38% 9589: 83:std::string auth_method_to_string(Auth_Method method) -: 84: { 9589: 85: switch(method) branch 0 taken 64% branch 1 taken 2% branch 2 taken 28% branch 3 taken 4% branch 4 taken 2% branch 5 taken 0% -: 86: { 6092: 87: case Auth_Method::RSA: 6092: 88: return "RSA"; call 0 returned 100% 193: 89: case Auth_Method::DSA: 193: 90: return "DSA"; call 0 returned 100% 2712: 91: case Auth_Method::ECDSA: 2712: 92: return "ECDSA"; call 0 returned 100% 414: 93: case Auth_Method::IMPLICIT: 414: 94: return "IMPLICIT"; call 0 returned 100% 178: 95: case Auth_Method::ANONYMOUS: 178: 96: return "ANONYMOUS"; call 0 returned 100% -: 97: } -: 98: #####: 99: throw Invalid_State("auth_method_to_string unknown enum value"); 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 -: 100: } -: 101: function _ZN5Botan3TLS23auth_method_from_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 5 returned 100% blocks executed 48% 5: 102:Auth_Method auth_method_from_string(const std::string& str) -: 103: { 5: 104: if(str == "RSA") call 0 returned 100% branch 1 taken 80% (fallthrough) branch 2 taken 20% -: 105: return Auth_Method::RSA; 4: 106: if(str == "DSA") call 0 returned 100% branch 1 taken 75% (fallthrough) branch 2 taken 25% -: 107: return Auth_Method::DSA; 3: 108: if(str == "ECDSA") call 0 returned 100% branch 1 taken 67% (fallthrough) branch 2 taken 33% -: 109: return Auth_Method::ECDSA; 2: 110: if(str == "IMPLICIT") call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% -: 111: return Auth_Method::IMPLICIT; 1*: 112: if(str == "ANONYMOUS" || str == "") call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% branch 3 never executed branch 4 never executed 1: 113: return Auth_Method::ANONYMOUS; -: 114: #####: 115: throw Invalid_Argument("Bad signature method " + str); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 116: } -: 117: function _ZN5Botan3TLS17group_param_is_dhENS0_12Group_ParamsE called 58747 returned 100% blocks executed 100% 58747: 118:bool group_param_is_dh(Group_Params group) -: 119: { 58747: 120: uint16_t group_id = static_cast(group); 58747: 121: return (group_id >= 256 && group_id < 512); -: 122: } -: 123: function _ZN5Botan3TLS23group_param_from_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 121 returned 100% blocks executed 100% 121: 124:Group_Params group_param_from_string(const std::string& group_name) -: 125: { 121: 126: if(group_name == "secp256r1") call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% -: 127: return Group_Params::SECP256R1; 116: 128: if(group_name == "secp384r1") call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% -: 129: return Group_Params::SECP384R1; 111: 130: if(group_name == "secp521r1") call 0 returned 100% branch 1 taken 79% (fallthrough) branch 2 taken 21% -: 131: return Group_Params::SECP521R1; 88: 132: if(group_name == "brainpool256r1") call 0 returned 100% branch 1 taken 73% (fallthrough) branch 2 taken 27% -: 133: return Group_Params::BRAINPOOL256R1; 64: 134: if(group_name == "brainpool384r1") call 0 returned 100% branch 1 taken 94% (fallthrough) branch 2 taken 6% -: 135: return Group_Params::BRAINPOOL384R1; 60: 136: if(group_name == "brainpool512r1") call 0 returned 100% branch 1 taken 93% (fallthrough) branch 2 taken 7% -: 137: return Group_Params::BRAINPOOL512R1; 56: 138: if(group_name == "x25519") call 0 returned 100% branch 1 taken 66% (fallthrough) branch 2 taken 34% -: 139: return Group_Params::X25519; -: 140: 37: 141: if(group_name == "ffdhe/ietf/2048") call 0 returned 100% branch 1 taken 70% (fallthrough) branch 2 taken 30% -: 142: return Group_Params::FFDHE_2048; 26: 143: if(group_name == "ffdhe/ietf/3072") call 0 returned 100% branch 1 taken 85% (fallthrough) branch 2 taken 15% -: 144: return Group_Params::FFDHE_3072; 22: 145: if(group_name == "ffdhe/ietf/4096") call 0 returned 100% branch 1 taken 82% (fallthrough) branch 2 taken 18% -: 146: return Group_Params::FFDHE_4096; 18: 147: if(group_name == "ffdhe/ietf/6144") call 0 returned 100% branch 1 taken 83% (fallthrough) branch 2 taken 17% -: 148: return Group_Params::FFDHE_6144; 15: 149: if(group_name == "ffdhe/ietf/8192") call 0 returned 100% branch 1 taken 20% (fallthrough) branch 2 taken 80% 3: 150: return Group_Params::FFDHE_8192; -: 151: -: 152: return Group_Params::NONE; // unknown -: 153: } -: 154: function _ZN5Botan3TLS21group_param_to_stringB5cxx11ENS0_12Group_ParamsE called 1060 returned 100% blocks executed 93% 1060: 155:std::string group_param_to_string(Group_Params group) -: 156: { 1060: 157: switch(group) branch 0 taken 2% branch 1 taken 2% branch 2 taken 2% branch 3 taken 2% branch 4 taken 1% branch 5 taken 1% branch 6 taken 87% branch 7 taken 2% branch 8 taken 1% branch 9 taken 1% branch 10 taken 1% branch 11 taken 1% branch 12 taken 0% -: 158: { 23: 159: case Group_Params::SECP256R1: 23: 160: return "secp256r1"; call 0 returned 100% 16: 161: case Group_Params::SECP384R1: 16: 162: return "secp384r1"; call 0 returned 100% 20: 163: case Group_Params::SECP521R1: 20: 164: return "secp521r1"; call 0 returned 100% 16: 165: case Group_Params::BRAINPOOL256R1: 16: 166: return "brainpool256r1"; call 0 returned 100% 8: 167: case Group_Params::BRAINPOOL384R1: 8: 168: return "brainpool384r1"; call 0 returned 100% 8: 169: case Group_Params::BRAINPOOL512R1: 8: 170: return "brainpool512r1"; call 0 returned 100% 921: 171: case Group_Params::X25519: 921: 172: return "x25519"; call 0 returned 100% -: 173: 20: 174: case Group_Params::FFDHE_2048: 20: 175: return "ffdhe/ietf/2048"; call 0 returned 100% 8: 176: case Group_Params::FFDHE_3072: 8: 177: return "ffdhe/ietf/3072"; call 0 returned 100% 8: 178: case Group_Params::FFDHE_4096: 8: 179: return "ffdhe/ietf/4096"; call 0 returned 100% 6: 180: case Group_Params::FFDHE_6144: 6: 181: return "ffdhe/ietf/6144"; call 0 returned 100% 6: 182: case Group_Params::FFDHE_8192: 6: 183: return "ffdhe/ietf/8192"; call 0 returned 100% -: 184: #####: 185: default: #####: 186: return ""; call 0 never executed -: 187: } -: 188: } -: 189: -: 190: function _ZN5Botan3TLS23hash_function_of_schemeB5cxx11ENS0_16Signature_SchemeE called 82043 returned 100% blocks executed 36% 82043: 191:std::string hash_function_of_scheme(Signature_Scheme scheme) -: 192: { 82043: 193: switch(scheme) branch 0 taken 19% branch 1 taken 29% branch 2 taken 27% branch 3 taken 25% branch 4 taken 0% branch 5 taken 1% branch 6 taken 0% -: 194: { 15534: 195: case Signature_Scheme::DSA_SHA1: 15534: 196: case Signature_Scheme::ECDSA_SHA1: 15534: 197: case Signature_Scheme::RSA_PKCS1_SHA1: 15534: 198: return "SHA-1"; call 0 returned 100% -: 199: 23733: 200: case Signature_Scheme::DSA_SHA256: 23733: 201: case Signature_Scheme::ECDSA_SHA256: 23733: 202: case Signature_Scheme::RSA_PKCS1_SHA256: 23733: 203: case Signature_Scheme::RSA_PSS_SHA256: 23733: 204: return "SHA-256"; call 0 returned 100% -: 205: 21894: 206: case Signature_Scheme::DSA_SHA384: 21894: 207: case Signature_Scheme::ECDSA_SHA384: 21894: 208: case Signature_Scheme::RSA_PKCS1_SHA384: 21894: 209: case Signature_Scheme::RSA_PSS_SHA384: 21894: 210: return "SHA-384"; call 0 returned 100% -: 211: 20881: 212: case Signature_Scheme::DSA_SHA512: 20881: 213: case Signature_Scheme::ECDSA_SHA512: 20881: 214: case Signature_Scheme::RSA_PKCS1_SHA512: 20881: 215: case Signature_Scheme::RSA_PSS_SHA512: 20881: 216: return "SHA-512"; call 0 returned 100% -: 217: #####: 218: case Signature_Scheme::EDDSA_25519: #####: 219: case Signature_Scheme::EDDSA_448: #####: 220: return "Pure"; call 0 never executed -: 221: 1: 222: case Signature_Scheme::NONE: 1: 223: return ""; call 0 returned 100% -: 224: } -: 225: #####: 226: throw Invalid_State("hash_function_of_scheme: Unknown signature algorithm enum"); 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 -: 227: } -: 228: function _ZN5Botan3TLS21all_signature_schemesEv called 5009 returned 100% blocks executed 90% 5009: 229:const std::vector& all_signature_schemes() -: 230: { -: 231: /* -: 232: * This is ordered in some approximate order of preference -: 233: */ 5009: 234: static const std::vector all_schemes = { -: 235: //Signature_Scheme::EDDSA_448, -: 236: //Signature_Scheme::EDDSA_25519, -: 237: -: 238: Signature_Scheme::RSA_PSS_SHA384, -: 239: Signature_Scheme::RSA_PSS_SHA256, -: 240: Signature_Scheme::RSA_PSS_SHA512, -: 241: -: 242: Signature_Scheme::RSA_PKCS1_SHA384, -: 243: Signature_Scheme::RSA_PKCS1_SHA512, -: 244: Signature_Scheme::RSA_PKCS1_SHA256, -: 245: -: 246: Signature_Scheme::ECDSA_SHA384, -: 247: Signature_Scheme::ECDSA_SHA512, -: 248: Signature_Scheme::ECDSA_SHA256, -: 249: -: 250: Signature_Scheme::DSA_SHA384, -: 251: Signature_Scheme::DSA_SHA512, -: 252: Signature_Scheme::DSA_SHA256, -: 253: -: 254: Signature_Scheme::RSA_PKCS1_SHA1, -: 255: Signature_Scheme::ECDSA_SHA1, -: 256: Signature_Scheme::DSA_SHA1, 5009: 257: }; branch 0 taken 34% (fallthrough) branch 1 taken 66% call 2 returned 100% 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% call 9 returned 100% call 10 never executed -: 258: 5009: 259: return all_schemes; -: 260: } -: 261: function _ZN5Botan3TLS25signature_scheme_is_knownENS0_16Signature_SchemeE called 85546 returned 100% blocks executed 100% 85546: 262:bool signature_scheme_is_known(Signature_Scheme scheme) -: 263: { 85546: 264: switch(scheme) branch 0 taken 1% branch 1 taken 99% -: 265: { -: 266: case Signature_Scheme::RSA_PKCS1_SHA1: -: 267: case Signature_Scheme::RSA_PKCS1_SHA256: -: 268: case Signature_Scheme::RSA_PKCS1_SHA384: -: 269: case Signature_Scheme::RSA_PKCS1_SHA512: -: 270: case Signature_Scheme::RSA_PSS_SHA256: -: 271: case Signature_Scheme::RSA_PSS_SHA384: -: 272: case Signature_Scheme::RSA_PSS_SHA512: -: 273: -: 274: case Signature_Scheme::DSA_SHA1: -: 275: case Signature_Scheme::DSA_SHA256: -: 276: case Signature_Scheme::DSA_SHA384: -: 277: case Signature_Scheme::DSA_SHA512: -: 278: -: 279: case Signature_Scheme::ECDSA_SHA1: -: 280: case Signature_Scheme::ECDSA_SHA256: -: 281: case Signature_Scheme::ECDSA_SHA384: -: 282: case Signature_Scheme::ECDSA_SHA512: -: 283: return true; -: 284: 695: 285: default: 695: 286: return false; -: 287: } -: 288: -: 289: } -: 290: function _ZN5Botan3TLS29signature_algorithm_of_schemeB5cxx11ENS0_16Signature_SchemeE called 82774 returned 100% blocks executed 59% 82774: 291:std::string signature_algorithm_of_scheme(Signature_Scheme scheme) -: 292: { 82774: 293: switch(scheme) branch 0 taken 49% branch 1 taken 24% branch 2 taken 27% branch 3 taken 0% branch 4 taken 0% branch 5 taken 0% branch 6 taken 1% -: 294: { 40740: 295: case Signature_Scheme::RSA_PKCS1_SHA1: 40740: 296: case Signature_Scheme::RSA_PKCS1_SHA256: 40740: 297: case Signature_Scheme::RSA_PKCS1_SHA384: 40740: 298: case Signature_Scheme::RSA_PKCS1_SHA512: 40740: 299: case Signature_Scheme::RSA_PSS_SHA256: 40740: 300: case Signature_Scheme::RSA_PSS_SHA384: 40740: 301: case Signature_Scheme::RSA_PSS_SHA512: 40740: 302: return "RSA"; call 0 returned 100% -: 303: 20070: 304: case Signature_Scheme::DSA_SHA1: 20070: 305: case Signature_Scheme::DSA_SHA256: 20070: 306: case Signature_Scheme::DSA_SHA384: 20070: 307: case Signature_Scheme::DSA_SHA512: 20070: 308: return "DSA"; call 0 returned 100% -: 309: 21961: 310: case Signature_Scheme::ECDSA_SHA1: 21961: 311: case Signature_Scheme::ECDSA_SHA256: 21961: 312: case Signature_Scheme::ECDSA_SHA384: 21961: 313: case Signature_Scheme::ECDSA_SHA512: 21961: 314: return "ECDSA"; call 0 returned 100% -: 315: #####: 316: case Signature_Scheme::EDDSA_25519: #####: 317: return "Ed25519"; call 0 never executed -: 318: #####: 319: case Signature_Scheme::EDDSA_448: #####: 320: return "Ed448"; call 0 never executed -: 321: #####: 322: case Signature_Scheme::NONE: #####: 323: return ""; call 0 never executed -: 324: } -: 325: 9: 326: throw Invalid_State("signature_algorithm_of_scheme: Unknown signature algorithm enum"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 327: } -: 328: function _ZN5Botan3TLS20sig_scheme_to_stringB5cxx11ENS0_16Signature_SchemeE called 24 returned 100% blocks executed 53% 24: 329:std::string sig_scheme_to_string(Signature_Scheme scheme) -: 330: { 24: 331: switch(scheme) branch 0 taken 4% branch 1 taken 8% branch 2 taken 8% branch 3 taken 8% branch 4 taken 4% branch 5 taken 4% branch 6 taken 4% branch 7 taken 4% branch 8 taken 4% branch 9 taken 8% branch 10 taken 8% branch 11 taken 8% branch 12 taken 8% branch 13 taken 8% branch 14 taken 8% branch 15 taken 0% branch 16 taken 0% branch 17 taken 0% branch 18 taken 0% -: 332: { 1: 333: case Signature_Scheme::RSA_PKCS1_SHA1: 1: 334: return "RSA_PKCS1_SHA1"; call 0 returned 100% 2: 335: case Signature_Scheme::RSA_PKCS1_SHA256: 2: 336: return "RSA_PKCS1_SHA256"; call 0 returned 100% 2: 337: case Signature_Scheme::RSA_PKCS1_SHA384: 2: 338: return "RSA_PKCS1_SHA384"; call 0 returned 100% 2: 339: case Signature_Scheme::RSA_PKCS1_SHA512: 2: 340: return "RSA_PKCS1_SHA512"; call 0 returned 100% -: 341: 1: 342: case Signature_Scheme::DSA_SHA1: 1: 343: return "DSA_SHA1"; call 0 returned 100% 1: 344: case Signature_Scheme::DSA_SHA256: 1: 345: return "DSA_SHA256"; call 0 returned 100% 1: 346: case Signature_Scheme::DSA_SHA384: 1: 347: return "DSA_SHA384"; call 0 returned 100% 1: 348: case Signature_Scheme::DSA_SHA512: 1: 349: return "DSA_SHA512"; call 0 returned 100% -: 350: 1: 351: case Signature_Scheme::ECDSA_SHA1: 1: 352: return "ECDSA_SHA1"; call 0 returned 100% 2: 353: case Signature_Scheme::ECDSA_SHA256: 2: 354: return "ECDSA_SHA256"; call 0 returned 100% 2: 355: case Signature_Scheme::ECDSA_SHA384: 2: 356: return "ECDSA_SHA384"; call 0 returned 100% 2: 357: case Signature_Scheme::ECDSA_SHA512: 2: 358: return "ECDSA_SHA512"; call 0 returned 100% -: 359: 2: 360: case Signature_Scheme::RSA_PSS_SHA256: 2: 361: return "RSA_PSS_SHA256"; call 0 returned 100% 2: 362: case Signature_Scheme::RSA_PSS_SHA384: 2: 363: return "RSA_PSS_SHA384"; call 0 returned 100% 2: 364: case Signature_Scheme::RSA_PSS_SHA512: 2: 365: return "RSA_PSS_SHA512"; call 0 returned 100% -: 366: #####: 367: case Signature_Scheme::EDDSA_25519: #####: 368: return "EDDSA_25519"; call 0 never executed #####: 369: case Signature_Scheme::EDDSA_448: #####: 370: return "EDDSA_448"; call 0 never executed -: 371: #####: 372: case Signature_Scheme::NONE: #####: 373: return ""; call 0 never executed -: 374: } -: 375: #####: 376: throw Invalid_State("sig_scheme_to_string: Unknown signature algorithm enum"); 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 -: 377: } -: 378: function _ZN5Botan3TLS25padding_string_for_schemeB5cxx11ENS0_16Signature_SchemeE called 1642 returned 100% blocks executed 47% 1642: 379:std::string padding_string_for_scheme(Signature_Scheme scheme) -: 380: { 1642: 381: switch(scheme) branch 0 taken 1% branch 1 taken 2% branch 2 taken 1% branch 3 taken 1% branch 4 taken 1% branch 5 taken 12% branch 6 taken 10% branch 7 taken 1% branch 8 taken 67% branch 9 taken 4% branch 10 taken 1% branch 11 taken 0% branch 12 taken 0% branch 13 taken 0% branch 14 taken 0% -: 382: { 12: 383: case Signature_Scheme::RSA_PKCS1_SHA1: 12: 384: return "EMSA_PKCS1(SHA-1)"; call 0 returned 100% 35: 385: case Signature_Scheme::RSA_PKCS1_SHA256: 35: 386: return "EMSA_PKCS1(SHA-256)"; call 0 returned 100% 13: 387: case Signature_Scheme::RSA_PKCS1_SHA384: 13: 388: return "EMSA_PKCS1(SHA-384)"; call 0 returned 100% 12: 389: case Signature_Scheme::RSA_PKCS1_SHA512: 12: 390: return "EMSA_PKCS1(SHA-512)"; call 0 returned 100% -: 391: 11: 392: case Signature_Scheme::DSA_SHA1: 11: 393: case Signature_Scheme::ECDSA_SHA1: 11: 394: return "EMSA1(SHA-1)"; call 0 returned 100% 193: 395: case Signature_Scheme::DSA_SHA256: 193: 396: case Signature_Scheme::ECDSA_SHA256: 193: 397: return "EMSA1(SHA-256)"; call 0 returned 100% 167: 398: case Signature_Scheme::DSA_SHA384: 167: 399: case Signature_Scheme::ECDSA_SHA384: 167: 400: return "EMSA1(SHA-384)"; call 0 returned 100% 15: 401: case Signature_Scheme::DSA_SHA512: 15: 402: case Signature_Scheme::ECDSA_SHA512: 15: 403: return "EMSA1(SHA-512)"; call 0 returned 100% -: 404: 1101: 405: case Signature_Scheme::RSA_PSS_SHA256: 1101: 406: return "PSSR(SHA-256,MGF1,32)"; call 0 returned 100% 70: 407: case Signature_Scheme::RSA_PSS_SHA384: 70: 408: return "PSSR(SHA-384,MGF1,48)"; call 0 returned 100% 13: 409: case Signature_Scheme::RSA_PSS_SHA512: 13: 410: return "PSSR(SHA-512,MGF1,64)"; call 0 returned 100% -: 411: #####: 412: case Signature_Scheme::EDDSA_25519: #####: 413: return "Pure"; call 0 never executed #####: 414: case Signature_Scheme::EDDSA_448: #####: 415: return "Pure"; call 0 never executed -: 416: #####: 417: case Signature_Scheme::NONE: #####: 418: return ""; call 0 never executed -: 419: } -: 420: #####: 421: throw Invalid_State("padding_string_for_scheme: Unknown signature algorithm enum"); 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 -: 422: } -: 423: -: 424:} -: 425: -: 426:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#tls_algos.h.gcov -: 0:Source:build/include/botan/tls_algos.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/tls_msg_client_kex.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/tls_msg_client_kex.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2017 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#ifndef BOTAN_TLS_ALGO_IDS_H_ -: 8:#define BOTAN_TLS_ALGO_IDS_H_ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14://BOTAN_FUTURE_INTERNAL_HEADER(tls_algos.h) -: 15: -: 16:namespace Botan { -: 17: -: 18:namespace TLS { -: 19: -: 20:enum class Cipher_Algo { -: 21: CHACHA20_POLY1305, -: 22: -: 23: AES_128_CBC_HMAC_SHA1 = 100, -: 24: AES_128_CBC_HMAC_SHA256, -: 25: AES_128_CCM, -: 26: AES_128_CCM_8, -: 27: AES_128_GCM, -: 28: AES_128_OCB, -: 29: -: 30: AES_256_CBC_HMAC_SHA1 = 200, -: 31: AES_256_CBC_HMAC_SHA256, -: 32: AES_256_CBC_HMAC_SHA384, -: 33: AES_256_CCM, -: 34: AES_256_CCM_8, -: 35: AES_256_GCM, -: 36: AES_256_OCB, -: 37: -: 38: CAMELLIA_128_CBC_HMAC_SHA1 = 300, -: 39: CAMELLIA_128_CBC_HMAC_SHA256, -: 40: CAMELLIA_128_GCM, -: 41: -: 42: CAMELLIA_256_CBC_HMAC_SHA1 = 400, -: 43: CAMELLIA_256_CBC_HMAC_SHA256, -: 44: CAMELLIA_256_CBC_HMAC_SHA384, -: 45: CAMELLIA_256_GCM, -: 46: -: 47: ARIA_128_GCM = 500, -: 48: ARIA_256_GCM, -: 49: -: 50: DES_EDE_CBC_HMAC_SHA1 = 1000, -: 51: SEED_CBC_HMAC_SHA1, -: 52:}; -: 53: -: 54:enum class KDF_Algo { -: 55: SHA_1, -: 56: SHA_256, -: 57: SHA_384, -: 58:}; -: 59: -: 60:std::string BOTAN_DLL kdf_algo_to_string(KDF_Algo algo); -: 61: -: 62:enum class Nonce_Format { -: 63: CBC_MODE, -: 64: AEAD_IMPLICIT_4, -: 65: AEAD_XOR_12, -: 66:}; -: 67: -: 68:// TODO encoding should match signature_algorithms extension -: 69:// TODO this should include hash etc as in TLS v1.3 -: 70:enum class Auth_Method { -: 71: RSA, -: 72: DSA, -: 73: ECDSA, -: 74: -: 75: // These are placed outside the encodable range -: 76: IMPLICIT = 0x10000, -: 77: ANONYMOUS -: 78:}; -: 79: -: 80:std::string BOTAN_TEST_API auth_method_to_string(Auth_Method method); -: 81:Auth_Method BOTAN_TEST_API auth_method_from_string(const std::string& str); -: 82: -: 83:/* -: 84:* This matches the wire encoding -: 85:*/ -: 86:enum class Signature_Scheme : uint16_t { -: 87: NONE = 0x0000, -: 88: -: 89: RSA_PKCS1_SHA1 = 0x0201, -: 90: RSA_PKCS1_SHA256 = 0x0401, -: 91: RSA_PKCS1_SHA384 = 0x0501, -: 92: RSA_PKCS1_SHA512 = 0x0601, -: 93: -: 94: DSA_SHA1 = 0x0202, -: 95: DSA_SHA256 = 0x0402, -: 96: DSA_SHA384 = 0x0502, -: 97: DSA_SHA512 = 0x0602, -: 98: -: 99: ECDSA_SHA1 = 0x0203, -: 100: ECDSA_SHA256 = 0x0403, -: 101: ECDSA_SHA384 = 0x0503, -: 102: ECDSA_SHA512 = 0x0603, -: 103: -: 104: RSA_PSS_SHA256 = 0x0804, -: 105: RSA_PSS_SHA384 = 0x0805, -: 106: RSA_PSS_SHA512 = 0x0806, -: 107: -: 108: EDDSA_25519 = 0x0807, -: 109: EDDSA_448 = 0x0808, -: 110:}; -: 111: -: 112:BOTAN_UNSTABLE_API const std::vector& all_signature_schemes(); -: 113: -: 114:bool BOTAN_UNSTABLE_API signature_scheme_is_known(Signature_Scheme scheme); -: 115:std::string BOTAN_UNSTABLE_API sig_scheme_to_string(Signature_Scheme scheme); -: 116:std::string BOTAN_UNSTABLE_API hash_function_of_scheme(Signature_Scheme scheme); -: 117:std::string BOTAN_UNSTABLE_API padding_string_for_scheme(Signature_Scheme scheme); -: 118:std::string signature_algorithm_of_scheme(Signature_Scheme scheme); -: 119: -: 120:/* -: 121:* Matches with wire encoding -: 122:*/ -: 123:enum class Group_Params : uint16_t { -: 124: NONE = 0, -: 125: -: 126: SECP256R1 = 23, -: 127: SECP384R1 = 24, -: 128: SECP521R1 = 25, -: 129: BRAINPOOL256R1 = 26, -: 130: BRAINPOOL384R1 = 27, -: 131: BRAINPOOL512R1 = 28, -: 132: -: 133: X25519 = 29, -: 134: -: 135: FFDHE_2048 = 256, -: 136: FFDHE_3072 = 257, -: 137: FFDHE_4096 = 258, -: 138: FFDHE_6144 = 259, -: 139: FFDHE_8192 = 260, -: 140:}; -: 141: -: 142:std::string group_param_to_string(Group_Params group); -: 143:Group_Params group_param_from_string(const std::string& group_name); -: 144:bool group_param_is_dh(Group_Params group); -: 145: -: 146:enum class Kex_Algo { -: 147: STATIC_RSA, -: 148: DH, -: 149: ECDH, -: 150: CECPQ1, -: 151: SRP_SHA, -: 152: PSK, -: 153: DHE_PSK, -: 154: ECDHE_PSK, -: 155:}; -: 156: -: 157:std::string BOTAN_TEST_API kex_method_to_string(Kex_Algo method); -: 158:Kex_Algo BOTAN_TEST_API kex_method_from_string(const std::string& str); -: 159: 927: 160:inline bool key_exchange_is_psk(Kex_Algo m) -: 161: { 927: 162: return (m == Kex_Algo::PSK || 927: 163: m == Kex_Algo::DHE_PSK || branch 0 taken 5% (fallthrough) branch 1 taken 95% -: 164: m == Kex_Algo::ECDHE_PSK); -: 165: } -: 166: -: 167:} -: 168: -: 169:} -: 170: -: 171:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#utils#ghash#ghash_vperm#ghash_vperm.cpp.gcov -: 0:Source:src/lib/utils/ghash/ghash_vperm/ghash_vperm.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_ghash_vperm.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_ghash_vperm.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2017 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include -: 8:#include -: 9: -: 10:namespace Botan { -: 11: -: 12:// TODO: extend this to support NEON and AltiVec -: 13: -: 14:BOTAN_FUNC_ISA("ssse3") function _ZN5Botan5GHASH20ghash_multiply_vpermEPhPKmPKhm called 1864 returned 100% blocks executed 100% 1864: 15:void GHASH::ghash_multiply_vperm(uint8_t x[16], -: 16: const uint64_t HM[256], -: 17: const uint8_t input_bytes[], size_t blocks) -: 18: { 1864: 19: const __m128i BSWAP_MASK = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); call 0 returned 100% -: 20: 1864: 21: const __m128i* HM_mm = reinterpret_cast(HM); -: 22: 1864: 23: __m128i X = _mm_loadu_si128(reinterpret_cast<__m128i*>(x)); call 0 returned 100% 1864: 24: X = _mm_shuffle_epi8(X, BSWAP_MASK); call 0 returned 100% -: 25: 1864: 26: const __m128i ones = _mm_set1_epi8(-1); -: 27: 4792: 28: for(size_t b = 0; b != blocks; ++b) branch 0 taken 61% (fallthrough) branch 1 taken 39% -: 29: { 2928: 30: __m128i M = _mm_loadu_si128(reinterpret_cast(input_bytes) + b); call 0 returned 100% 2928: 31: M = _mm_shuffle_epi8(M, BSWAP_MASK); call 0 returned 100% -: 32: 2928: 33: X = _mm_xor_si128(X, M); -: 34: 2928: 35: __m128i Z = _mm_setzero_si128(); -: 36: 96624: 37: for(size_t i = 0; i != 64; i += 2) branch 0 taken 97% (fallthrough) branch 1 taken 3% -: 38: { 93696: 39: const __m128i HM0 = _mm_loadu_si128(HM_mm + 2*i); call 0 returned 100% 93696: 40: const __m128i HM1 = _mm_loadu_si128(HM_mm + 2*i + 1); 93696: 41: const __m128i HM2 = _mm_loadu_si128(HM_mm + 2*i + 2); 93696: 42: const __m128i HM3 = _mm_loadu_si128(HM_mm + 2*i + 3); -: 43: 93696: 44: const __m128i XMASK1 = _mm_add_epi64(_mm_srli_epi64(X, 63), ones); call 0 returned 100% call 1 returned 100% 93696: 45: X = _mm_slli_epi64(X, 1); call 0 returned 100% 93696: 46: const __m128i XMASK2 = _mm_add_epi64(_mm_srli_epi64(X, 63), ones); call 0 returned 100% call 1 returned 100% 93696: 47: X = _mm_slli_epi64(X, 1); call 0 returned 100% -: 48: 93696: 49: Z = _mm_xor_si128(Z, _mm_andnot_si128(_mm_unpackhi_epi64(XMASK1, XMASK1), HM0)); call 0 returned 100% call 1 returned 100% call 2 returned 100% 93696: 50: Z = _mm_xor_si128(Z, _mm_andnot_si128(_mm_unpacklo_epi64(XMASK1, XMASK1), HM1)); call 0 returned 100% call 1 returned 100% call 2 returned 100% 93696: 51: Z = _mm_xor_si128(Z, _mm_andnot_si128(_mm_unpackhi_epi64(XMASK2, XMASK2), HM2)); call 0 returned 100% call 1 returned 100% call 2 returned 100% 93696: 52: Z = _mm_xor_si128(Z, _mm_andnot_si128(_mm_unpacklo_epi64(XMASK2, XMASK2), HM3)); call 0 returned 100% call 1 returned 100% -: 53: } -: 54: 2928: 55: X = _mm_shuffle_epi32(Z, _MM_SHUFFLE(1, 0, 3, 2)); call 0 returned 100% -: 56: } -: 57: 1864: 58: X = _mm_shuffle_epi8(X, BSWAP_MASK); call 0 returned 100% 1864: 59: _mm_storeu_si128(reinterpret_cast<__m128i*>(x), X); 1864: 60: } -: 61: -: 62:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#filters#filter.cpp.gcov -: 0:Source:src/lib/filters/filter.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/filters_filter.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/filters_filter.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Filter -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10: -: 11:namespace Botan { -: 12: -: 13:/* -: 14:* Filter Constructor -: 15:*/ function _ZN5Botan6FilterC2Ev called 2168 returned 100% blocks executed 30% 2168: 16:Filter::Filter() 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 -: 17: { 2168: 18: m_next.resize(1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2168: 19: m_port_num = 0; 2168: 20: m_filter_owns = 0; 2168: 21: m_owned = false; 2168: 22: } -: 23: -: 24:/* -: 25:* Send data to all ports -: 26:*/ function _ZN5Botan6Filter4sendEPKhm called 1203 returned 100% blocks executed 71% 1203: 27:void Filter::send(const uint8_t input[], size_t length) -: 28: { 1203: 29: if(!length) branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 30: return; -: 31: -: 32: bool nothing_attached = true; 2352: 33: for(size_t j = 0; j != total_ports(); ++j) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% 1177: 34: if(m_next[j]) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 35: { 1177: 36: if(m_write_queue.size()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 37: m_next[j]->write(m_write_queue.data(), m_write_queue.size()); call 0 never executed 1177: 38: m_next[j]->write(input, length); call 0 returned 100% 1177: 39: nothing_attached = false; call 0 returned 100% -: 40: } -: 41: 1175: 42: if(nothing_attached) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 43: m_write_queue += std::make_pair(input, length); call 0 never executed -: 44: else 1175: 45: m_write_queue.clear(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 46: } -: 47: -: 48:/* -: 49:* Start a new message -: 50:*/ function _ZN5Botan6Filter7new_msgEv called 2239 returned 100% blocks executed 100% 2239: 51:void Filter::new_msg() -: 52: { 2239: 53: start_msg(); 3397: 54: for(size_t j = 0; j != total_ports(); ++j) call 0 returned 100% call 1 returned 100% branch 2 taken 34% (fallthrough) branch 3 taken 66% 1158: 55: if(m_next[j]) branch 0 taken 100% (fallthrough) branch 1 taken 0% 1158: 56: m_next[j]->new_msg(); call 0 returned 100% 2239: 57: } -: 58: -: 59:/* -: 60:* End the current message -: 61:*/ function _ZN5Botan6Filter10finish_msgEv called 2239 returned 100% blocks executed 100% 2239: 62:void Filter::finish_msg() -: 63: { 2239: 64: end_msg(); 3397: 65: for(size_t j = 0; j != total_ports(); ++j) call 0 returned 100% call 1 returned 100% branch 2 taken 34% (fallthrough) branch 3 taken 66% 1158: 66: if(m_next[j]) branch 0 taken 100% (fallthrough) branch 1 taken 0% 1158: 67: m_next[j]->finish_msg(); call 0 returned 100% 2239: 68: } -: 69: -: 70:/* -: 71:* Attach a filter to the current port -: 72:*/ function _ZN5Botan6Filter6attachEPS0_ called 20 returned 100% blocks executed 100% 20: 73:void Filter::attach(Filter* new_filter) -: 74: { 20: 75: if(new_filter) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 76: { -: 77: Filter* last = this; 24: 78: while(last->get_next()) call 0 returned 100% branch 1 taken 17% (fallthrough) branch 2 taken 83% 4: 79: last = last->get_next(); call 0 returned 100% 20: 80: last->m_next[last->current_port()] = new_filter; -: 81: } 20: 82: } -: 83: -: 84:/* -: 85:* Set the active port on a filter -: 86:*/ function _ZN5Botan6Filter8set_portEm called 0 returned 0% blocks executed 0% #####: 87:void Filter::set_port(size_t new_port) -: 88: { #####: 89: if(new_port >= total_ports()) call 0 never executed branch 1 never executed branch 2 never executed #####: 90: throw Invalid_Argument("Filter: Invalid port number"); 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 #####: 91: m_port_num = new_port; #####: 92: } -: 93: -: 94:/* -: 95:* Return the next Filter in the logical chain -: 96:*/ function _ZNK5Botan6Filter8get_nextEv called 28 returned 100% blocks executed 100% 28: 97:Filter* Filter::get_next() const -: 98: { 28: 99: if(m_port_num < m_next.size()) branch 0 taken 100% (fallthrough) branch 1 taken 0% 28: 100: return m_next[m_port_num]; -: 101: return nullptr; -: 102: } -: 103: -: 104:/* -: 105:* Set the next Filters -: 106:*/ function _ZN5Botan6Filter8set_nextEPPS0_m called 1097 returned 100% blocks executed 100% 1097: 107:void Filter::set_next(Filter* filters[], size_t size) -: 108: { 1097: 109: m_next.clear(); branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 110: 1097: 111: m_port_num = 0; 1097: 112: m_filter_owns = 0; -: 113: 1103: 114: while(size && filters && (filters[size-1] == nullptr)) branch 0 taken 1% (fallthrough) branch 1 taken 99% branch 2 taken 60% (fallthrough) branch 3 taken 40% 6: 115: --size; -: 116: 1097: 117: if(filters && size) branch 0 taken 1% (fallthrough) branch 1 taken 100% 4: 118: m_next.assign(filters, filters + size); call 0 returned 100% 1097: 119: } -: 120: -: 121:/* -: 122:* Return the total number of ports -: 123:*/ function _ZNK5Botan6Filter11total_portsEv called 23265 returned 100% blocks executed 100% 23265: 124:size_t Filter::total_ports() const -: 125: { 23265: 126: return m_next.size(); -: 127: } -: 128: -: 129:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#base58.h.gcov -: 0:Source:build/include/botan/base58.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/codec.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/codec.gcda -: 0:Runs:723 -: 1:/* -: 2:* (C) 2018 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#ifndef BOTAN_BASE58_CODEC_H_ -: 8:#define BOTAN_BASE58_CODEC_H_ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:/** -: 17:* Perform base58 encoding -: 18:* -: 19:* This is raw base58 encoding, without the checksum -: 20:*/ -: 21:std::string -: 22:BOTAN_PUBLIC_API(2,9) base58_encode(const uint8_t input[], -: 23: size_t input_length); -: 24: -: 25:/** -: 26:* Perform base58 encoding with checksum -: 27:*/ -: 28:std::string -: 29:BOTAN_PUBLIC_API(2,9) base58_check_encode(const uint8_t input[], -: 30: size_t input_length); -: 31: -: 32: -: 33:/** -: 34:* Perform base58 decoding -: 35:* -: 36:* This is raw base58 encoding, without the checksum -: 37:*/ -: 38:std::vector -: 39:BOTAN_PUBLIC_API(2,9) base58_decode(const char input[], -: 40: size_t input_length); -: 41: -: 42:/** -: 43:* Perform base58 decoding with checksum -: 44:*/ -: 45:std::vector -: 46:BOTAN_PUBLIC_API(2,9) base58_check_decode(const char input[], -: 47: size_t input_length); -: 48: -: 49: -: 50:// Some convenience wrappers: -: 51: -: 52:template 1: 53:inline std::string base58_encode(const std::vector& vec) -: 54: { 1: 55: return base58_encode(vec.data(), vec.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 56: } -: 57: -: 58:template 1: 59:inline std::string base58_check_encode(const std::vector& vec) -: 60: { 1: 61: return base58_check_encode(vec.data(), vec.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 62: } -: 63: 1: 64:inline std::vector base58_decode(const std::string& s) -: 65: { 1: 66: return base58_decode(s.data(), s.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 67: } -: 68: 1: 69:inline std::vector base58_check_decode(const std::string& s) -: 70: { 1: 71: return base58_check_decode(s.data(), s.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 72: } -: 73: -: 74:} -: 75: -: 76:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#tls_server.cpp.gcov -: 0:Source:src/fuzzer/tls_server.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/tls_server.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/fuzzer/tls_server.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2015,2016 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "fuzzers.h" -: 8:#include -: 9:#include -: 10: -: 11:const char* fixed_rsa_key = -: 12: "-----BEGIN PRIVATE KEY-----\n" -: 13: "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCe6qqpMQVJ7zCJ\n" -: 14: "oSnpxia0yO6M7Ie3FGqPcd0DzueC+kWPvuHQ+PpP5vfO6qqRaDVII37PFX5NUZQm\n" -: 15: "GK/rAm7spjIHTCMgqSZ8pN13LU8m1gDwIdu9al16LXN9zZjB67uLlFn2trtLi234\n" -: 16: "i0cnyeF8IC0cz7tgCOzMSVEBcqJjkdgGrZ3WUgOXecVm2lXVrYlEiaSxFp4VOE9k\n" -: 17: "RFeVrELCjmNtc4hRd1yJsF+vObCtvyqGYQE1Qcb0MVSQDBHMkiUVmO6zuW7td5ef\n" -: 18: "O/1OyntQJGyVa+SnWbkSLCybta2J7MreHENrF5GA0K1KL140SNRHeWifRMuNQua7\n" -: 19: "qmKXMBTFAgMBAAECggEAIk3fxyQI0zvpy1vZ01ft1QqmzA7nAPNMSWi33/GS8iga\n" -: 20: "SfxXfKeySPs/tQ/dAARxs//NiOBH4mLgyxR7LQzaawU5OXALCSraXv+ruuUx990s\n" -: 21: "WKnGaG4EfbJAAwEVn47Gbkv425P4fEc91vAhzQn8PbIoatbAyOtESpjs/pYDTeC/\n" -: 22: "mnJId8gqO90cqyRECEMjk9sQ8iEjWPlik4ayGlUVbeeMu6/pJ9F8IZEgkLZiNDAB\n" -: 23: "4anmOFaT7EmqUjI4IlcaqfbbXyDXlvWUYukidEss+CNvPuqbQHBDnpFVvBxdDR2N\n" -: 24: "Uj2D5Xd5blcIe2/+1IVRnznjoQ5zvutzb7ThBmMehQKBgQDOITKG0ht2kXLxjVoR\n" -: 25: "r/pVpx+f3hs3H7wE0+vrLHoQgkVjpMWXQ47YuZTT9rCOOYNI2cMoH2D27t1j78/B\n" -: 26: "9kGYABUVpvQQ+6amqJDI1eYI6e68TPueEDjeALfSCdmPNiI3lZZrCIK9XLpkoy8K\n" -: 27: "tGYBRRJ+JJxjj1zPXj9SGshPgwKBgQDFXUtoxY3mCStH3+0b1qxGG9r1L5goHEmd\n" -: 28: "Am8WBYDheNpL0VqPNzouhuM/ZWMGyyAs/py6aLATe+qhR1uX5vn7LVZwjCSONZ4j\n" -: 29: "7ieEEUh1BHetPI1oI5PxgokRYfVuckotqVseanI/536Er3Yf2FXNQ1/ceVp9WykX\n" -: 30: "3mYTKMhQFwKBgQDKakcXpZNaZ5IcKdZcsBZ/rdGcR5sqEnursf9lvRNQytwg8Vkn\n" -: 31: "JSxNHlBLpV/TCh8lltHRwJ6TXhUBYij+KzhWbx5FWOErHDOWTMmArqtp7W6GcoJT\n" -: 32: "wVJWjxXzp8CApYQMWVSQXpckJL7UvHohZO0WKiHyxTjde5aD++TqV2qEyQKBgBbD\n" -: 33: "jvoTpy08K4DLxCZs2Uvw1I1pIuylbpwsdrGciuP2s38BM6fHH+/T4Qwj3osfDKQD\n" -: 34: "7gHWJ1Dn/wUBHQBlRLoC3bB3iZPZfVb5lhc2gxv0GvWhQVIcoGi/vJ2DpfJKPmIL\n" -: 35: "4ZWdg3X5dm9JaZ98rVDSj5D3ckd5J0E4hp95GbmbAoGBAJJHM4O9lx60tIjw9Sf/\n" -: 36: "QmKWyUk0NLnt8DcgRMW7fVxtzPNDy9DBKGIkDdWZ2s+ForICA3C9WSxBC1EOEHGG\n" -: 37: "xkg2xKt66CeutGroP6M191mHQrRClt1VbEYzQFX21BCk5kig9i/BURyoTHtFiV+t\n" -: 38: "kbf4VLg8Vk9u/R3RU1HsYWhe\n" -: 39: "-----END PRIVATE KEY-----\n"; -: 40: -: 41:const char* fixed_rsa_cert = -: 42: "-----BEGIN CERTIFICATE-----\n" -: 43: "MIIDUDCCAjgCCQD7pIb1ZsoafjANBgkqhkiG9w0BAQsFADBqMQswCQYDVQQGEwJW\n" -: 44: "VDEQMA4GA1UECAwHVmVybW9udDEWMBQGA1UEBwwNVGhlIEludGVybmV0czEUMBIG\n" -: 45: "A1UECgwLTWFuZ29zIFIgVXMxGzAZBgNVBAMMEnNlcnZlci5leGFtcGxlLmNvbTAe\n" -: 46: "Fw0xNjAxMDYxNzQ3MjNaFw0yNjAxMDMxNzQ3MjNaMGoxCzAJBgNVBAYTAlZUMRAw\n" -: 47: "DgYDVQQIDAdWZXJtb250MRYwFAYDVQQHDA1UaGUgSW50ZXJuZXRzMRQwEgYDVQQK\n" -: 48: "DAtNYW5nb3MgUiBVczEbMBkGA1UEAwwSc2VydmVyLmV4YW1wbGUuY29tMIIBIjAN\n" -: 49: "BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnuqqqTEFSe8wiaEp6cYmtMjujOyH\n" -: 50: "txRqj3HdA87ngvpFj77h0Pj6T+b3zuqqkWg1SCN+zxV+TVGUJhiv6wJu7KYyB0wj\n" -: 51: "IKkmfKTddy1PJtYA8CHbvWpdei1zfc2Yweu7i5RZ9ra7S4tt+ItHJ8nhfCAtHM+7\n" -: 52: "YAjszElRAXKiY5HYBq2d1lIDl3nFZtpV1a2JRImksRaeFThPZERXlaxCwo5jbXOI\n" -: 53: "UXdcibBfrzmwrb8qhmEBNUHG9DFUkAwRzJIlFZjus7lu7XeXnzv9Tsp7UCRslWvk\n" -: 54: "p1m5Eiwsm7WtiezK3hxDaxeRgNCtSi9eNEjUR3lon0TLjULmu6pilzAUxQIDAQAB\n" -: 55: "MA0GCSqGSIb3DQEBCwUAA4IBAQA1eZGc/4V7z/E/6eG0hVkzoAZeuTcSP7WqBSx+\n" -: 56: "OP2yh0163UYjoa6nehmkKYQQ9PbYPZGzIcl+dBFyYzy6jcp0NdtzpWnTFrjl4rMq\n" -: 57: "akcQ1D0LTYjJXVP9G/vF/SvatOFeVTnQmLlLt/a8ZtRUINqejeZZPzH8ifzFW6tu\n" -: 58: "mlhTVIEKyPHpxClh5Y3ubw/mZYygekFTqMkTx3FwJxKU8J6rYGZxanWAODUIvCUo\n" -: 59: "Fxer1qC5Love3uWl3vXPLEZWZdORnExSRByzz2immBP2vX4zYZoeZRhTQ9ae1TIV\n" -: 60: "Dk02a/1AOJZdZReDbgXhlqaUx5pk/rzo4mDzvu5HSCeXmClz\n" -: 61: "-----END CERTIFICATE-----\n"; -: 62: -: 63:class Fuzzer_TLS_Server_Creds : public Botan::Credentials_Manager -: 64: { -: 65: public: function _ZN23Fuzzer_TLS_Server_CredsC2Ev called 1128 returned 100% blocks executed 42% 1128: 66: Fuzzer_TLS_Server_Creds() 1128: 67: { 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 1128: 68: Botan::DataSource_Memory cert_in(fixed_rsa_cert); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 2256: 69: Botan::DataSource_Memory key_in(fixed_rsa_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 70: 2256: 71: m_rsa_cert.reset(new Botan::X509_Certificate(cert_in)); call 0 returned 100% 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 -: 72: //m_rsa_key.reset(Botan::PKCS8::load_key(key_in, fuzzer_rng()); 1128: 73: } -: 74: function _ZN23Fuzzer_TLS_Server_Creds10cert_chainERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKS6_SC_ called 0 returned 0% blocks executed 0% #####: 75: std::vector cert_chain( -: 76: const std::vector& algos, -: 77: const std::string& /*type*/, -: 78: const std::string& /*hostname*/) override -: 79: { #####: 80: std::vector v; -: 81: #####: 82: for(auto algo : algos) branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed -: 83: { #####: 84: if(algo == "RSA") call 0 never executed branch 1 never executed branch 2 never executed -: 85: { #####: 86: v.push_back(*m_rsa_cert); call 0 never executed branch 1 never executed branch 2 never executed #####: 87: break; branch 0 never executed branch 1 never executed -: 88: } -: 89: } -: 90: #####: 91: return v; -: 92: } -: 93: function _ZN23Fuzzer_TLS_Server_Creds15private_key_forERKN5Botan16X509_CertificateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_ called 0 returned 0% blocks executed 0% #####: 94: Botan::Private_Key* private_key_for(const Botan::X509_Certificate& /*cert*/, -: 95: const std::string& /*type*/, -: 96: const std::string& /*context*/) override -: 97: { #####: 98: return m_rsa_key.get(); -: 99: } -: 100: function _ZN23Fuzzer_TLS_Server_Creds17psk_identity_hintERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ called 0 returned 0% blocks executed 0% #####: 101: std::string psk_identity_hint(const std::string&, const std::string&) override { return "psk_hint"; } call 0 never executed function _ZN23Fuzzer_TLS_Server_Creds12psk_identityERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_ called 0 returned 0% blocks executed 0% #####: 102: std::string psk_identity(const std::string&, const std::string&, const std::string&) override { return "psk_id"; } call 0 never executed function _ZN23Fuzzer_TLS_Server_Creds3pskERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_ called 0 returned 0% blocks executed 0% #####: 103: Botan::SymmetricKey psk(const std::string&, const std::string&, const std::string&) override -: 104: { #####: 105: return Botan::SymmetricKey("AABBCCDDEEFF00112233445566778899"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed -: 106: } -: 107: private: -: 108: std::unique_ptr m_rsa_cert; -: 109: std::unique_ptr m_rsa_key; -: 110: }; -: 111: 1128: 112:class Fuzzer_TLS_Policy : public Botan::TLS::Policy -: 113: { -: 114: public: function _ZNK17Fuzzer_TLS_Policy16ciphersuite_listEN5Botan3TLS16Protocol_VersionEb called 0 returned 0% blocks executed 0% #####: 115: std::vector ciphersuite_list(Botan::TLS::Protocol_Version version, -: 116: bool have_srp) const -: 117: { #####: 118: std::vector ciphersuites; call 0 never executed branch 1 never executed branch 2 never executed -: 119: #####: 120: for(auto&& suite : Botan::TLS::Ciphersuite::all_known_ciphersuites()) 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 -: 121: { #####: 122: if(suite.valid() == false) branch 0 never executed branch 1 never executed #####: 123: continue; -: 124: -: 125: // Are we doing SRP? #####: 126: if(!have_srp && suite.kex_method() == Botan::TLS::Kex_Algo::SRP_SHA) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 127: continue; -: 128: #####: 129: if(!version.supports_aead_modes()) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 130: { -: 131: // Are we doing AEAD in a non-AEAD version? #####: 132: if(suite.mac_algo() == "AEAD") 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 #####: 133: continue; -: 134: -: 135: // Older (v1.0/v1.1) versions also do not support any hash but SHA-1 #####: 136: if(suite.mac_algo() != "SHA-1") 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 #####: 137: continue; -: 138: } -: 139: #####: 140: ciphersuites.push_back(suite.ciphersuite_code()); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 141: } -: 142: #####: 143: return ciphersuites; -: 144: } -: 145: }; -: 146: #####: 147:class Fuzzer_TLS_Server_Callbacks : public Botan::TLS::Callbacks call 0 never executed -: 148: { -: 149: public: function _ZN27Fuzzer_TLS_Server_Callbacks13tls_emit_dataEPKhm called 0 returned 0% blocks executed 0% #####: 150: void tls_emit_data(const uint8_t[], size_t) override -: 151: { -: 152: // discard #####: 153: } -: 154: function _ZN27Fuzzer_TLS_Server_Callbacks19tls_record_receivedEmPKhm called 0 returned 0% blocks executed 0% #####: 155: void tls_record_received(uint64_t, const uint8_t[], size_t) override -: 156: { -: 157: // ignore peer data #####: 158: } -: 159: function _ZN27Fuzzer_TLS_Server_Callbacks9tls_alertEN5Botan3TLS5AlertE called 0 returned 0% blocks executed 0% #####: 160: void tls_alert(Botan::TLS::Alert) override -: 161: { -: 162: // ignore alert #####: 163: } -: 164: function _ZN27Fuzzer_TLS_Server_Callbacks23tls_session_establishedERKN5Botan3TLS7SessionE called 0 returned 0% blocks executed 0% #####: 165: bool tls_session_established(const Botan::TLS::Session&) override -: 166: { #####: 167: return true; // cache it -: 168: } -: 169: function _ZN27Fuzzer_TLS_Server_Callbacks30tls_server_choose_app_protocolERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE called 0 returned 0% blocks executed 0% #####: 170: std::string tls_server_choose_app_protocol(const std::vector& client_protos) override -: 171: { #####: 172: if(client_protos.size() > 1) branch 0 never executed branch 1 never executed #####: 173: return client_protos[0]; call 0 never executed -: 174: else #####: 175: return "fuzzy"; call 0 never executed -: 176: } -: 177: function _ZN27Fuzzer_TLS_Server_Callbacks21tls_verify_cert_chainERKSt6vectorIN5Botan16X509_CertificateESaIS2_EERKS0_ISt10shared_ptrIKNS1_4OCSP8ResponseEESaISB_EERKS0_IPNS1_17Certificate_StoreESaISH_EENS1_10Usage_TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS1_3TLS6PolicyE called 0 returned 0% blocks executed 0% #####: 178: void tls_verify_cert_chain( -: 179: const std::vector& cert_chain, -: 180: const std::vector>& ocsp_responses, -: 181: const std::vector& trusted_roots, -: 182: Botan::Usage_Type usage, -: 183: const std::string& hostname, -: 184: const Botan::TLS::Policy& policy) override -: 185: { #####: 186: try -: 187: { -: 188: // try to validate to exercise those code paths #####: 189: Botan::TLS::Callbacks::tls_verify_cert_chain(cert_chain, ocsp_responses, call 0 never executed branch 1 never executed branch 2 never executed -: 190: trusted_roots, usage, hostname, policy); -: 191: } =====: 192: catch(...) call 0 never executed -: 193: { -: 194: // ignore validation result -: 195: } #####: 196: } -: 197: -: 198: }; -: 199: function _Z4fuzzPKhm called 1131 returned 100% blocks executed 56% 1131: 200:void fuzz(const uint8_t in[], size_t len) -: 201: { 1131: 202: if(len <= 1) branch 0 taken 1% (fallthrough) branch 1 taken 100% 3: 203: return; -: 204: 1128: 205: Botan::TLS::Session_Manager_Noop session_manager; 1128: 206: Fuzzer_TLS_Policy policy; 2256: 207: Botan::TLS::Server_Information info("server.name", 443); call 0 returned 100% branch 1 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 1128: 208: Fuzzer_TLS_Server_Creds creds; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1128: 209: Fuzzer_TLS_Server_Callbacks callbacks; call 0 returned 100% call 1 never executed -: 210: 1128: 211: const bool is_datagram = in[0] & 1; -: 212: 1128: 213: Botan::TLS::Server server(callbacks, -: 214: session_manager, -: 215: creds, -: 216: policy, -: 217: fuzzer_rng(), 2256: 218: is_datagram); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 returned 100% call 8 never executed -: 219: 1128: 220: try -: 221: { 1128: 222: server.received_data(in + 1, len - 1); call 0 returned 100% branch 1 taken 2% (fallthrough) branch 2 taken 98% (throw) -: 223: } 1105: 224: catch(std::exception& e) call 0 returned 100% call 1 returned 100% -: 225: { -: 226: } -: 227: } <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#block#shacal2#shacal2.cpp.gcov -: 0:Source:src/lib/block/shacal2/shacal2.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/block_shacal2.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/block_shacal2.gcda -: 0:Runs:2960 -: 1:/* -: 2:* SHACAL-2 -: 3:* (C) 2017 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12: -: 13:namespace Botan { -: 14: -: 15:namespace { -: 16: function _ZN5Botan12_GLOBAL__N_111SHACAL2_FwdEjjjRjjjjS1_j called 762240 returned 100% blocks executed 100% 762240: 17:inline void SHACAL2_Fwd(uint32_t A, uint32_t B, uint32_t C, uint32_t& D, -: 18: uint32_t E, uint32_t F, uint32_t G, uint32_t& H, -: 19: uint32_t RK) -: 20: { 762240: 21: const uint32_t A_rho = rotr<2>(A) ^ rotr<13>(A) ^ rotr<22>(A); 762240: 22: const uint32_t E_rho = rotr<6>(E) ^ rotr<11>(E) ^ rotr<25>(E); -: 23: 762240: 24: H += E_rho + ((E & F) ^ (~E & G)) + RK; 762240: 25: D += H; 762240: 26: H += A_rho + ((A & B) | ((A | B) & C)); 762240: 27: } -: 28: function _ZN5Botan12_GLOBAL__N_111SHACAL2_RevEjjjRjjjjS1_j called 398848 returned 100% blocks executed 100% 398848: 29:inline void SHACAL2_Rev(uint32_t A, uint32_t B, uint32_t C, uint32_t& D, -: 30: uint32_t E, uint32_t F, uint32_t G, uint32_t& H, -: 31: uint32_t RK) -: 32: { 398848: 33: const uint32_t A_rho = rotr<2>(A) ^ rotr<13>(A) ^ rotr<22>(A); 398848: 34: const uint32_t E_rho = rotr<6>(E) ^ rotr<11>(E) ^ rotr<25>(E); -: 35: 398848: 36: H -= A_rho + ((A & B) | ((A | B) & C)); 398848: 37: D -= H; 398848: 38: H -= E_rho + ((E & F) ^ (~E & G)) + RK; 398848: 39: } -: 40: -: 41:} -: 42: -: 43:/* -: 44:* SHACAL2 Encryption -: 45:*/ function _ZNK5Botan7SHACAL29encrypt_nEPKhPhm called 17772 returned 65% blocks executed 97% 17772: 46:void SHACAL2::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const -: 47: { 17772: 48: verify_key_set(m_RK.empty() == false); branch 0 taken 35% (fallthrough) branch 1 taken 65% -: 49: -: 50:#if defined(BOTAN_HAS_SHACAL2_X86) 11634: 51: if(CPUID::has_intel_sha()) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 52: { #####: 53: return x86_encrypt_blocks(in, out, blocks); call 0 never executed -: 54: } -: 55:#endif -: 56: -: 57:#if defined(BOTAN_HAS_SHACAL2_AVX2) 11634: 58: if(CPUID::has_avx2()) call 0 returned 100% branch 1 taken 47% (fallthrough) branch 2 taken 53% -: 59: { 5526: 60: while(blocks >= 8) branch 0 taken 1% (fallthrough) branch 1 taken 99% -: 61: { 30: 62: avx2_encrypt_8(in, out); call 0 returned 100% 30: 63: in += 8*BLOCK_SIZE; 30: 64: out += 8*BLOCK_SIZE; 30: 65: blocks -= 8; -: 66: } -: 67: } -: 68:#endif -: 69: -: 70:#if defined(BOTAN_HAS_SHACAL2_SIMD) 11634: 71: if(CPUID::has_simd_32()) call 0 returned 100% branch 1 taken 74% (fallthrough) branch 2 taken 26% -: 72: { 8593: 73: while(blocks >= 4) branch 0 taken 1% (fallthrough) branch 1 taken 100% -: 74: { 28: 75: simd_encrypt_4(in, out); call 0 returned 100% 28: 76: in += 4*BLOCK_SIZE; 28: 77: out += 4*BLOCK_SIZE; 28: 78: blocks -= 4; -: 79: } -: 80: } -: 81:#endif -: 82: 23544: 83: for(size_t i = 0; i != blocks; ++i) branch 0 taken 51% (fallthrough) branch 1 taken 49% -: 84: { 11910: 85: uint32_t A = load_be(in, 0); 11910: 86: uint32_t B = load_be(in, 1); 11910: 87: uint32_t C = load_be(in, 2); 11910: 88: uint32_t D = load_be(in, 3); 11910: 89: uint32_t E = load_be(in, 4); 11910: 90: uint32_t F = load_be(in, 5); 11910: 91: uint32_t G = load_be(in, 6); 11910: 92: uint32_t H = load_be(in, 7); -: 93: 107190: 94: for(size_t r = 0; r != 64; r += 8) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 95: { 95280: 96: SHACAL2_Fwd(A, B, C, D, E, F, G, H, m_RK[r+0]); call 0 returned 100% 95280: 97: SHACAL2_Fwd(H, A, B, C, D, E, F, G, m_RK[r+1]); call 0 returned 100% 95280: 98: SHACAL2_Fwd(G, H, A, B, C, D, E, F, m_RK[r+2]); call 0 returned 100% 95280: 99: SHACAL2_Fwd(F, G, H, A, B, C, D, E, m_RK[r+3]); call 0 returned 100% 95280: 100: SHACAL2_Fwd(E, F, G, H, A, B, C, D, m_RK[r+4]); call 0 returned 100% 95280: 101: SHACAL2_Fwd(D, E, F, G, H, A, B, C, m_RK[r+5]); call 0 returned 100% 95280: 102: SHACAL2_Fwd(C, D, E, F, G, H, A, B, m_RK[r+6]); call 0 returned 100% 95280: 103: SHACAL2_Fwd(B, C, D, E, F, G, H, A, m_RK[r+7]); call 0 returned 100% -: 104: } -: 105: 11910: 106: store_be(out, A, B, C, D, E, F, G, H); call 0 returned 100% -: 107: 11910: 108: in += BLOCK_SIZE; 11910: 109: out += BLOCK_SIZE; -: 110: } -: 111: } -: 112: -: 113:/* -: 114:* SHACAL2 Encryption -: 115:*/ function _ZNK5Botan7SHACAL29decrypt_nEPKhPhm called 12286 returned 50% blocks executed 100% 12286: 116:void SHACAL2::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const -: 117: { 12286: 118: verify_key_set(m_RK.empty() == false); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 119: -: 120:#if defined(BOTAN_HAS_SHACAL2_AVX2) 6148: 121: if(CPUID::has_avx2()) call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 122: { 2086: 123: while(blocks >= 8) branch 0 taken 1% (fallthrough) branch 1 taken 99% -: 124: { 30: 125: avx2_decrypt_8(in, out); call 0 returned 100% 30: 126: in += 8*BLOCK_SIZE; 30: 127: out += 8*BLOCK_SIZE; 30: 128: blocks -= 8; -: 129: } -: 130: } -: 131:#endif -: 132: -: 133:#if defined(BOTAN_HAS_SHACAL2_SIMD) 6148: 134: if(CPUID::has_simd_32()) call 0 returned 100% branch 1 taken 67% (fallthrough) branch 2 taken 33% -: 135: { 4130: 136: while(blocks >= 4) branch 0 taken 1% (fallthrough) branch 1 taken 99% -: 137: { 28: 138: simd_decrypt_4(in, out); call 0 returned 100% 28: 139: in += 4*BLOCK_SIZE; 28: 140: out += 4*BLOCK_SIZE; 28: 141: blocks -= 4; -: 142: } -: 143: } -: 144:#endif -: 145: 12380: 146: for(size_t i = 0; i != blocks; ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 147: { 6232: 148: uint32_t A = load_be(in, 0); 6232: 149: uint32_t B = load_be(in, 1); 6232: 150: uint32_t C = load_be(in, 2); 6232: 151: uint32_t D = load_be(in, 3); 6232: 152: uint32_t E = load_be(in, 4); 6232: 153: uint32_t F = load_be(in, 5); 6232: 154: uint32_t G = load_be(in, 6); 6232: 155: uint32_t H = load_be(in, 7); -: 156: 56088: 157: for(size_t r = 0; r != 64; r += 8) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 158: { 49856: 159: SHACAL2_Rev(B, C, D, E, F, G, H, A, m_RK[63-r]); call 0 returned 100% 49856: 160: SHACAL2_Rev(C, D, E, F, G, H, A, B, m_RK[62-r]); call 0 returned 100% 49856: 161: SHACAL2_Rev(D, E, F, G, H, A, B, C, m_RK[61-r]); call 0 returned 100% 49856: 162: SHACAL2_Rev(E, F, G, H, A, B, C, D, m_RK[60-r]); call 0 returned 100% 49856: 163: SHACAL2_Rev(F, G, H, A, B, C, D, E, m_RK[59-r]); call 0 returned 100% 49856: 164: SHACAL2_Rev(G, H, A, B, C, D, E, F, m_RK[58-r]); call 0 returned 100% 49856: 165: SHACAL2_Rev(H, A, B, C, D, E, F, G, m_RK[57-r]); call 0 returned 100% 49856: 166: SHACAL2_Rev(A, B, C, D, E, F, G, H, m_RK[56-r]); call 0 returned 100% -: 167: } -: 168: 6232: 169: store_be(out, A, B, C, D, E, F, G, H); call 0 returned 100% -: 170: 6232: 171: in += BLOCK_SIZE; 6232: 172: out += BLOCK_SIZE; -: 173: } 6148: 174: } -: 175: -: 176:/* -: 177:* SHACAL2 Key Schedule -: 178:*/ function _ZN5Botan7SHACAL212key_scheduleEPKhm called 9222 returned 100% blocks executed 100% 9222: 179:void SHACAL2::key_schedule(const uint8_t key[], size_t len) -: 180: { 9222: 181: const uint32_t RC[64] = { -: 182: 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, -: 183: 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, -: 184: 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, -: 185: 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, -: 186: 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, -: 187: 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, -: 188: 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, -: 189: 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, -: 190: 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, -: 191: 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, -: 192: 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, -: 193: 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, -: 194: 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, -: 195: 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, -: 196: 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, -: 197: 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -: 198: }; -: 199: 9222: 200: if(m_RK.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 1% 9218: 201: m_RK.resize(64); call 0 returned 100% -: 202: else 4: 203: clear_mem(m_RK.data(), m_RK.size()); -: 204: 9222: 205: load_be(m_RK.data(), key, len/4); call 0 returned 100% -: 206: 451878: 207: for(size_t i = 16; i != 64; ++i) call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% -: 208: { 442656: 209: const uint32_t sigma0_15 = rotr< 7>(m_RK[i-15]) ^ rotr<18>(m_RK[i-15]) ^ (m_RK[i-15] >> 3); 442656: 210: const uint32_t sigma1_2 = rotr<17>(m_RK[i- 2]) ^ rotr<19>(m_RK[i- 2]) ^ (m_RK[i- 2] >> 10); 442656: 211: m_RK[i] = m_RK[i-16] + sigma0_15 + m_RK[i-7] + sigma1_2; -: 212: } -: 213: 599430: 214: for(size_t i = 0; i != 64; ++i) branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 215: { 590208: 216: m_RK[i] += RC[i]; -: 217: } 9222: 218: } -: 219: function _ZNK5Botan7SHACAL211parallelismEv called 9243 returned 100% blocks executed 100% 9243: 220:size_t SHACAL2::parallelism() const -: 221: { -: 222:#if defined(BOTAN_HAS_SHACAL2_X86) 9243: 223: if(CPUID::has_intel_sha()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 224: { -: 225: return 4; -: 226: } -: 227:#endif -: 228: -: 229:#if defined(BOTAN_HAS_SHACAL2_AVX2) 9243: 230: if(CPUID::has_avx2()) call 0 returned 100% branch 1 taken 66% (fallthrough) branch 2 taken 34% -: 231: { -: 232: return 8; -: 233: } -: 234:#endif -: 235: -: 236:#if defined(BOTAN_HAS_SHACAL2_SIMD) 6138: 237: if(CPUID::has_simd_32()) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% -: 238: { 3069: 239: return 4; -: 240: } -: 241:#endif -: 242: -: 243: return 1; -: 244: } -: 245: function _ZNK5Botan7SHACAL28providerB5cxx11Ev called 3069 returned 100% blocks executed 91% 3069: 246:std::string SHACAL2::provider() const -: 247: { -: 248:#if defined(BOTAN_HAS_SHACAL2_X86) 3069: 249: if(CPUID::has_intel_sha()) call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% -: 250: { #####: 251: return "intel_sha"; call 0 never executed -: 252: } -: 253:#endif -: 254: -: 255:#if defined(BOTAN_HAS_SHACAL2_AVX2) 3069: 256: if(CPUID::has_avx2()) call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 257: { 1023: 258: return "avx2"; call 0 returned 100% -: 259: } -: 260:#endif -: 261: -: 262:#if defined(BOTAN_HAS_SHACAL2_SIMD) 2046: 263: if(CPUID::has_simd_32()) call 0 returned 100% branch 1 taken 50% (fallthrough) branch 2 taken 50% -: 264: { 1023: 265: return "simd"; call 0 returned 100% -: 266: } -: 267:#endif -: 268: 1023: 269: return "base"; call 0 returned 100% -: 270: } -: 271: -: 272:/* -: 273:* Clear memory of sensitive data -: 274:*/ function _ZN5Botan7SHACAL25clearEv called 6148 returned 100% blocks executed 100% 6148: 275:void SHACAL2::clear() -: 276: { 6148: 277: zap(m_RK); call 0 returned 100% 6148: 278: } -: 279: -: 280:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#tls#tls_session_manager_memory.cpp.gcov -: 0:Source:src/lib/tls/tls_session_manager_memory.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/tls_session_manager_memory.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/tls_session_manager_memory.gcda -: 0:Runs:2960 -: 1:/* -: 2:* TLS Session Management -: 3:* (C) 2011,2012 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11:#include -: 12: -: 13:namespace Botan { -: 14: -: 15:namespace TLS { -: 16: function _ZN5Botan3TLS25Session_Manager_In_MemoryC2ERNS_21RandomNumberGeneratorEmNSt6chrono8durationIlSt5ratioILl1ELl1EEEE called 2230 returned 100% blocks executed 100% 2230: 17:Session_Manager_In_Memory::Session_Manager_In_Memory( -: 18: RandomNumberGenerator& rng, -: 19: size_t max_sessions, 2230: 20: std::chrono::seconds session_lifetime) : -: 21: m_max_sessions(max_sessions), -: 22: m_session_lifetime(session_lifetime), -: 23: m_rng(rng), 2230: 24: m_session_key(m_rng.random_vec(32)) call 0 returned 100% 2230: 25: {} -: 26: function _ZN5Botan3TLS25Session_Manager_In_Memory21load_from_session_strERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_7SessionE called 437 returned 100% blocks executed 62% 437: 27:bool Session_Manager_In_Memory::load_from_session_str( -: 28: const std::string& session_str, Session& session) -: 29: { -: 30: // assert(lock is held) -: 31: 437: 32: auto i = m_sessions.find(session_str); call 0 returned 100% -: 33: 437: 34: if(i == m_sessions.end()) branch 0 taken 96% (fallthrough) branch 1 taken 4% -: 35: return false; -: 36: 418: 37: try -: 38: { 418: 39: session = Session::decrypt(i->second, m_session_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% -: 40: } =====: 41: catch(...) call 0 never executed -: 42: { =====: 43: return false; -: 44: } -: 45: -: 46: // if session has expired, remove it 418: 47: const auto now = std::chrono::system_clock::now(); call 0 returned 100% -: 48: 418: 49: if(session.start_time() + session_lifetime() < now) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 50: { #####: 51: m_sessions.erase(i); call 0 never executed #####: 52: return false; -: 53: } -: 54: -: 55: return true; -: 56: } -: 57: function _ZN5Botan3TLS25Session_Manager_In_Memory20load_from_session_idERKSt6vectorIhSaIhEERNS0_7SessionE called 51 returned 100% blocks executed 62% 51: 58:bool Session_Manager_In_Memory::load_from_session_id( -: 59: const std::vector& session_id, Session& session) -: 60: { 51: 61: lock_guard_type lock(m_mutex); call 0 returned 100% -: 62: 153: 63: return load_from_session_str(hex_encode(session_id), session); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 100% (fallthrough) branch 9 taken 0% branch 10 never executed branch 11 never executed -: 64: } -: 65: function _ZN5Botan3TLS25Session_Manager_In_Memory21load_from_server_infoERKNS0_18Server_InformationERNS0_7SessionE called 1657 returned 100% blocks executed 69% 1657: 66:bool Session_Manager_In_Memory::load_from_server_info( -: 67: const Server_Information& info, Session& session) -: 68: { 3314: 69: lock_guard_type lock(m_mutex); call 0 returned 100% -: 70: 1657: 71: auto i = m_info_sessions.find(info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 72: 1657: 73: if(i == m_info_sessions.end()) branch 0 taken 23% (fallthrough) branch 1 taken 77% -: 74: return false; -: 75: 386: 76: if(load_from_session_str(i->second, session)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 77: return true; -: 78: -: 79: /* -: 80: * It existed at one point but was removed from the sessions map, -: 81: * remove m_info_sessions entry as well -: 82: */ #####: 83: m_info_sessions.erase(i); call 0 never executed -: 84: #####: 85: return false; -: 86: } -: 87: function _ZN5Botan3TLS25Session_Manager_In_Memory12remove_entryERKSt6vectorIhSaIhEE called 124 returned 100% blocks executed 73% 124: 88:void Session_Manager_In_Memory::remove_entry( -: 89: const std::vector& session_id) -: 90: { 124: 91: lock_guard_type lock(m_mutex); call 0 returned 100% -: 92: 124: 93: auto i = m_sessions.find(hex_encode(session_id)); 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% -: 94: 124: 95: if(i != m_sessions.end()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 96: m_sessions.erase(i); call 0 never executed 124: 97: } -: 98: function _ZN5Botan3TLS25Session_Manager_In_Memory10remove_allEv called 1 returned 100% blocks executed 100% 1: 99:size_t Session_Manager_In_Memory::remove_all() -: 100: { 1: 101: const size_t removed = m_sessions.size(); call 0 returned 100% 1: 102: m_info_sessions.clear(); call 0 returned 100% 1: 103: m_sessions.clear(); call 0 returned 100% 1: 104: m_rng.random_vec(m_session_key, 32); call 0 returned 100% 1: 105: return removed; -: 106: } -: 107: function _ZN5Botan3TLS25Session_Manager_In_Memory4saveERKNS0_7SessionE called 1023 returned 100% blocks executed 55% 1023: 108:void Session_Manager_In_Memory::save(const Session& session) -: 109: { 1023: 110: lock_guard_type lock(m_mutex); call 0 returned 100% -: 111: 1023: 112: if(m_max_sessions != 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 113: { -: 114: /* -: 115: We generate new session IDs with the first 4 bytes being a -: 116: timestamp, so this actually removes the oldest sessions first. -: 117: */ 1023: 118: while(m_sessions.size() >= m_max_sessions) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 119: m_sessions.erase(m_sessions.begin()); call 0 never executed -: 120: } -: 121: 2046: 122: const std::string session_id_str = hex_encode(session.session_id()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 123: 1023: 124: m_sessions[session_id_str] = session.encrypt(m_session_key, 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% 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 branch 17 never executed branch 18 never executed -: 125: 1023: 126: if(session.side() == CLIENT && !session.server_info().empty()) branch 0 taken 93% (fallthrough) branch 1 taken 7% branch 2 taken 100% (fallthrough) branch 3 taken 0% 1023: 127: m_info_sessions[session.server_info()] = session_id_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% 1023: 128: } -: 129: -: 130:} -: 131: -: 132:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#regex_compiler.h.gcov -: 0:Source:/usr/include/c++/9/bits/regex_compiler.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_socket_uri.gcda -: 0:Runs:2960 -: 1:// class template regex -*- C++ -*- -: 2: -: 3:// Copyright (C) 2010-2019 Free Software Foundation, Inc. -: 4:// -: 5:// This file is part of the GNU ISO C++ Library. This library is free -: 6:// software; you can redistribute it and/or modify it under the -: 7:// terms of the GNU General Public License as published by the -: 8:// Free Software Foundation; either version 3, or (at your option) -: 9:// any later version. -: 10: -: 11:// This library is distributed in the hope that it will be useful, -: 12:// but WITHOUT ANY WARRANTY; without even the implied warranty of -: 13:// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -: 14:// GNU General Public License for more details. -: 15: -: 16:// Under Section 7 of GPL version 3, you are granted additional -: 17:// permissions described in the GCC Runtime Library Exception, version -: 18:// 3.1, as published by the Free Software Foundation. -: 19: -: 20:// You should have received a copy of the GNU General Public License and -: 21:// a copy of the GCC Runtime Library Exception along with this program; -: 22:// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -: 23:// . -: 24: -: 25:/** -: 26: * @file bits/regex_compiler.h -: 27: * This is an internal header file, included by other library headers. -: 28: * Do not attempt to use it directly. @headername{regex} -: 29: */ -: 30: -: 31:namespace std _GLIBCXX_VISIBILITY(default) -: 32:{ -: 33:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 34:_GLIBCXX_BEGIN_NAMESPACE_CXX11 -: 35: -: 36: template -: 37: class regex_traits; -: 38: -: 39:_GLIBCXX_END_NAMESPACE_CXX11 -: 40: -: 41:namespace __detail -: 42:{ -: 43: /** -: 44: * @addtogroup regex-detail -: 45: * @{ -: 46: */ -: 47: -: 48: template -: 49: struct _BracketMatcher; -: 50: -: 51: /** -: 52: * @brief Builds an NFA from an input iterator range. -: 53: * -: 54: * The %_TraitsT type should fulfill requirements [28.3]. -: 55: */ -: 56: template -: 57: class _Compiler -: 58: { -: 59: public: -: 60: typedef typename _TraitsT::char_type _CharT; -: 61: typedef const _CharT* _IterT; -: 62: typedef _NFA<_TraitsT> _RegexT; -: 63: typedef regex_constants::syntax_option_type _FlagT; -: 64: -: 65: _Compiler(_IterT __b, _IterT __e, -: 66: const typename _TraitsT::locale_type& __traits, _FlagT __flags); -: 67: -: 68: shared_ptr 5: 69: _M_get_nfa() 5: 70: { return std::move(_M_nfa); } -: 71: -: 72: private: -: 73: typedef _Scanner<_CharT> _ScannerT; -: 74: typedef typename _TraitsT::string_type _StringT; -: 75: typedef typename _ScannerT::_TokenT _TokenT; -: 76: typedef _StateSeq<_TraitsT> _StateSeqT; -: 77: typedef std::stack<_StateSeqT> _StackT; -: 78: typedef std::ctype<_CharT> _CtypeT; -: 79: -: 80: // accepts a specific token or returns false. -: 81: bool -: 82: _M_match_token(_TokenT __token); -: 83: -: 84: void -: 85: _M_disjunction(); -: 86: -: 87: void -: 88: _M_alternative(); -: 89: -: 90: bool -: 91: _M_term(); -: 92: -: 93: bool -: 94: _M_assertion(); -: 95: -: 96: bool -: 97: _M_quantifier(); -: 98: -: 99: bool -: 100: _M_atom(); -: 101: -: 102: bool -: 103: _M_bracket_expression(); -: 104: -: 105: template -: 106: void -: 107: _M_insert_any_matcher_ecma(); -: 108: -: 109: template -: 110: void -: 111: _M_insert_any_matcher_posix(); -: 112: -: 113: template -: 114: void -: 115: _M_insert_char_matcher(); -: 116: -: 117: template -: 118: void -: 119: _M_insert_character_class_matcher(); -: 120: -: 121: template -: 122: void -: 123: _M_insert_bracket_matcher(bool __neg); -: 124: -: 125: // Returns true if successfully matched one term and should continue. -: 126: // Returns false if the compiler should move on. -: 127: template -: 128: bool -: 129: _M_expression_term(pair& __last_char, -: 130: _BracketMatcher<_TraitsT, __icase, __collate>& -: 131: __matcher); -: 132: -: 133: int -: 134: _M_cur_int_value(int __radix); -: 135: -: 136: bool -: 137: _M_try_char(); -: 138: -: 139: _StateSeqT function _ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEE6_M_popEv called 195 returned 100% blocks executed 75% 195: 140: _M_pop() -: 141: { 195: 142: auto ret = _M_stack.top(); branch 0 taken 0% (fallthrough) branch 1 taken 100% 195: 143: _M_stack.pop(); call 0 returned 100% 195: 144: return ret; -: 145: } -: 146: -: 147: _FlagT _M_flags; -: 148: _ScannerT _M_scanner; -: 149: shared_ptr<_RegexT> _M_nfa; -: 150: _StringT _M_value; -: 151: _StackT _M_stack; -: 152: const _TraitsT& _M_traits; -: 153: const _CtypeT& _M_ctype; -: 154: }; -: 155: -: 156: template -: 157: struct __is_contiguous_iter : is_pointer<_Tp>::type { }; -: 158: -: 159: template -: 160: struct -: 161: __is_contiguous_iter<__gnu_cxx::__normal_iterator<_Tp*, _Cont>> -: 162: : true_type { }; -: 163: -: 164: template -: 165: using __enable_if_contiguous_iter -: 166: = __enable_if_t< __is_contiguous_iter<_Iter>::value, -: 167: std::shared_ptr> >; -: 168: -: 169: template -: 170: using __disable_if_contiguous_iter -: 171: = __enable_if_t< !__is_contiguous_iter<_Iter>::value, -: 172: std::shared_ptr> >; -: 173: -: 174: template -: 175: inline __enable_if_contiguous_iter<_FwdIter, _TraitsT> function _ZNSt8__detail13__compile_nfaINSt7__cxx1112regex_traitsIcEEPKcEENSt9enable_ifIXsrNS_20__is_contiguous_iterIT0_EE5valueESt10shared_ptrIKNS_4_NFAIT_EEEE4typeES8_S8_RKNSC_11locale_typeENSt15regex_constants18syntax_option_typeE called 5 returned 100% blocks executed 80% 5: 176: __compile_nfa(_FwdIter __first, _FwdIter __last, -: 177: const typename _TraitsT::locale_type& __loc, -: 178: regex_constants::syntax_option_type __flags) -: 179: { 5: 180: size_t __len = __last - __first; 5: 181: const auto* __cfirst = __len ? std::__addressof(*__first) : nullptr; branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 182: using _Cmplr = _Compiler<_TraitsT>; 5: 183: return _Cmplr(__cfirst, __cfirst + __len, __loc, __flags)._M_get_nfa(); call 0 returned 100% call 1 returned 100% -: 184: } -: 185: -: 186: template -: 187: inline __disable_if_contiguous_iter<_FwdIter, _TraitsT> -: 188: __compile_nfa(_FwdIter __first, _FwdIter __last, -: 189: const typename _TraitsT::locale_type& __loc, -: 190: regex_constants::syntax_option_type __flags) -: 191: { -: 192: const basic_string __str(__first, __last); -: 193: return __compile_nfa<_TraitsT>(__str.data(), __str.data() + __str.size(), -: 194: __loc, __flags); -: 195: } -: 196: -: 197: // [28.13.14] -: 198: template -: 199: class _RegexTranslatorBase -: 200: { -: 201: public: -: 202: typedef typename _TraitsT::char_type _CharT; -: 203: typedef typename _TraitsT::string_type _StringT; -: 204: typedef _StringT _StrTransT; -: 205: -: 206: explicit #####: 207: _RegexTranslatorBase(const _TraitsT& __traits) #####: 208: : _M_traits(__traits) -: 209: { } -: 210: -: 211: _CharT #####: 212: _M_translate(_CharT __ch) const -: 213: { -: 214: if (__icase) #####: 215: return _M_traits.translate_nocase(__ch); -: 216: else if (__collate) #####: 217: return _M_traits.translate(__ch); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 218: else -: 219: return __ch; -: 220: } ------------------ _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb1EE12_M_translateEc: function _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb1EE12_M_translateEc called 0 returned 0% blocks executed 0% #####: 212: _M_translate(_CharT __ch) const -: 213: { -: 214: if (__icase) #####: 215: return _M_traits.translate_nocase(__ch); call 0 never executed -: 216: else if (__collate) -: 217: return _M_traits.translate(__ch); -: 218: else -: 219: return __ch; -: 220: } ------------------ _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb0EE12_M_translateEc: function _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb0EE12_M_translateEc called 0 returned 0% blocks executed 0% #####: 212: _M_translate(_CharT __ch) const -: 213: { -: 214: if (__icase) #####: 215: return _M_traits.translate_nocase(__ch); call 0 never executed -: 216: else if (__collate) -: 217: return _M_traits.translate(__ch); -: 218: else -: 219: return __ch; -: 220: } ------------------ -: 221: -: 222: _StrTransT #####: 223: _M_transform(_CharT __ch) const -: 224: { #####: 225: _StrTransT __str(1, __ch); #####: 226: return _M_traits.transform(__str.begin(), __str.end()); -: 227: } ------------------ _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb1EE12_M_transformEc: function _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb1EE12_M_transformEc called 0 returned 0% blocks executed 0% #####: 223: _M_transform(_CharT __ch) const -: 224: { #####: 225: _StrTransT __str(1, __ch); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 226: return _M_traits.transform(__str.begin(), __str.end()); call 0 never executed branch 1 never executed branch 2 never executed -: 227: } ------------------ _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb0ELb1EE12_M_transformEc: function _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb0ELb1EE12_M_transformEc called 0 returned 0% blocks executed 0% #####: 223: _M_transform(_CharT __ch) const -: 224: { #####: 225: _StrTransT __str(1, __ch); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 226: return _M_traits.transform(__str.begin(), __str.end()); call 0 never executed branch 1 never executed branch 2 never executed -: 227: } ------------------ -: 228: -: 229: // See LWG 523. It's not efficiently implementable when _TraitsT is not -: 230: // std::regex_traits<>, and __collate is true. See specializations for -: 231: // implementations of other cases. -: 232: bool -: 233: _M_match_range(const _StrTransT& __first, const _StrTransT& __last, -: 234: const _StrTransT& __s) const -: 235: { return __first <= __s && __s <= __last; } -: 236: -: 237: protected: #####: 238: bool _M_in_range_icase(_CharT __first, _CharT __last, _CharT __ch) const -: 239: { -: 240: typedef std::ctype<_CharT> __ctype_type; #####: 241: const auto& __fctyp = use_facet<__ctype_type>(this->_M_traits.getloc()); #####: 242: auto __lower = __fctyp.tolower(__ch); #####: 243: auto __upper = __fctyp.toupper(__ch); #####: 244: return (__first <= __lower && __lower <= __last) #####: 245: || (__first <= __upper && __upper <= __last); -: 246: } ------------------ _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb1EE17_M_in_range_icaseEccc: function _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb1EE17_M_in_range_icaseEccc called 0 returned 0% blocks executed 0% #####: 238: bool _M_in_range_icase(_CharT __first, _CharT __last, _CharT __ch) const -: 239: { -: 240: typedef std::ctype<_CharT> __ctype_type; #####: 241: const auto& __fctyp = use_facet<__ctype_type>(this->_M_traits.getloc()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed #####: 242: auto __lower = __fctyp.tolower(__ch); call 0 never executed #####: 243: auto __upper = __fctyp.toupper(__ch); call 0 never executed #####: 244: return (__first <= __lower && __lower <= __last) #####: 245: || (__first <= __upper && __upper <= __last); branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 246: } ------------------ _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb0EE17_M_in_range_icaseEccc: function _ZNKSt8__detail20_RegexTranslatorBaseINSt7__cxx1112regex_traitsIcEELb1ELb0EE17_M_in_range_icaseEccc called 0 returned 0% blocks executed 0% #####: 238: bool _M_in_range_icase(_CharT __first, _CharT __last, _CharT __ch) const -: 239: { -: 240: typedef std::ctype<_CharT> __ctype_type; #####: 241: const auto& __fctyp = use_facet<__ctype_type>(this->_M_traits.getloc()); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed #####: 242: auto __lower = __fctyp.tolower(__ch); call 0 never executed #####: 243: auto __upper = __fctyp.toupper(__ch); call 0 never executed #####: 244: return (__first <= __lower && __lower <= __last) #####: 245: || (__first <= __upper && __upper <= __last); branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 246: } ------------------ -: 247: -: 248: const _TraitsT& _M_traits; -: 249: }; -: 250: -: 251: template -: 252: class _RegexTranslator -: 253: : public _RegexTranslatorBase<_TraitsT, __icase, __collate> -: 254: { -: 255: public: -: 256: typedef _RegexTranslatorBase<_TraitsT, __icase, __collate> _Base; #####: 257: using _Base::_Base; -: 258: }; -: 259: -: 260: template -: 261: class _RegexTranslator<_TraitsT, __icase, false> -: 262: : public _RegexTranslatorBase<_TraitsT, __icase, false> -: 263: { -: 264: public: -: 265: typedef _RegexTranslatorBase<_TraitsT, __icase, false> _Base; -: 266: typedef typename _Base::_CharT _CharT; -: 267: typedef _CharT _StrTransT; -: 268: #####: 269: using _Base::_Base; -: 270: -: 271: _StrTransT #####: 272: _M_transform(_CharT __ch) const -: 273: { return __ch; } -: 274: -: 275: bool #####: 276: _M_match_range(_CharT __first, _CharT __last, _CharT __ch) const -: 277: { -: 278: if (!__icase) -: 279: return __first <= __ch && __ch <= __last; #####: 280: return this->_M_in_range_icase(__first, __last, __ch); call 0 never executed -: 281: } -: 282: }; -: 283: -: 284: template -: 285: class _RegexTranslator, true, true> -: 286: : public _RegexTranslatorBase, true, true> -: 287: { -: 288: public: -: 289: typedef _RegexTranslatorBase, true, true> -: 290: _Base; -: 291: typedef typename _Base::_CharT _CharT; -: 292: typedef typename _Base::_StrTransT _StrTransT; -: 293: #####: 294: using _Base::_Base; -: 295: -: 296: bool #####: 297: _M_match_range(const _StrTransT& __first, const _StrTransT& __last, -: 298: const _StrTransT& __str) const -: 299: { -: 300: __glibcxx_assert(__first.size() == 1); -: 301: __glibcxx_assert(__last.size() == 1); -: 302: __glibcxx_assert(__str.size() == 1); #####: 303: return this->_M_in_range_icase(__first[0], __last[0], __str[0]); call 0 never executed branch 1 never executed branch 2 never executed -: 304: } -: 305: }; -: 306: -: 307: template -: 308: class _RegexTranslator<_TraitsT, false, false> -: 309: { -: 310: public: -: 311: typedef typename _TraitsT::char_type _CharT; -: 312: typedef _CharT _StrTransT; -: 313: -: 314: explicit 40*: 315: _RegexTranslator(const _TraitsT&) -: 316: { } -: 317: -: 318: _CharT 10240*: 319: _M_translate(_CharT __ch) const call 0 never executed branch 1 never executed branch 2 never executed call 3 returned 100% -: 320: { return __ch; } -: 321: -: 322: _StrTransT 10230: 323: _M_transform(_CharT __ch) const -: 324: { return __ch; } -: 325: -: 326: bool 27570: 327: _M_match_range(_CharT __first, _CharT __last, _CharT __ch) const 27570: 328: { return __first <= __ch && __ch <= __last; } branch 0 taken 91% (fallthrough) branch 1 taken 9% -: 329: }; -: 330: -: 331: template -: 332: struct _AnyMatcher; -: 333: -: 334: template -: 335: struct _AnyMatcher<_TraitsT, false, __icase, __collate> -: 336: { -: 337: typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; -: 338: typedef typename _TransT::_CharT _CharT; -: 339: -: 340: explicit #####: 341: _AnyMatcher(const _TraitsT& __traits) #####: 342: : _M_translator(__traits) 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 -: 343: { } -: 344: -: 345: bool #####: 346: operator()(_CharT __ch) const -: 347: { #####: 348: static auto __nul = _M_translator._M_translate('\0'); #####: 349: return _M_translator._M_translate(__ch) != __nul; -: 350: } ------------------ _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1ELb1EEclEc: function _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1ELb1EEclEc called 0 returned 0% blocks executed 0% #####: 346: operator()(_CharT __ch) const -: 347: { #####: 348: static auto __nul = _M_translator._M_translate('\0'); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed #####: 349: return _M_translator._M_translate(__ch) != __nul; call 0 never executed -: 350: } ------------------ _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1ELb0EEclEc: function _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1ELb0EEclEc called 0 returned 0% blocks executed 0% #####: 346: operator()(_CharT __ch) const -: 347: { #####: 348: static auto __nul = _M_translator._M_translate('\0'); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed #####: 349: return _M_translator._M_translate(__ch) != __nul; call 0 never executed -: 350: } ------------------ _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0ELb1EEclEc: function _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0ELb1EEclEc called 0 returned 0% blocks executed 0% #####: 346: operator()(_CharT __ch) const -: 347: { #####: 348: static auto __nul = _M_translator._M_translate('\0'); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 349: return _M_translator._M_translate(__ch) != __nul; -: 350: } ------------------ _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0ELb0EEclEc: function _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0ELb0EEclEc called 0 returned 0% blocks executed 0% #####: 346: operator()(_CharT __ch) const -: 347: { #####: 348: static auto __nul = _M_translator._M_translate('\0'); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 349: return _M_translator._M_translate(__ch) != __nul; -: 350: } ------------------ -: 351: -: 352: _TransT _M_translator; -: 353: }; -: 354: -: 355: template -: 356: struct _AnyMatcher<_TraitsT, true, __icase, __collate> -: 357: { -: 358: typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; -: 359: typedef typename _TransT::_CharT _CharT; -: 360: -: 361: explicit #####: 362: _AnyMatcher(const _TraitsT& __traits) #####: 363: : _M_translator(__traits) 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 -: 364: { } -: 365: -: 366: bool #####: 367: operator()(_CharT __ch) const #####: 368: { return _M_apply(__ch, typename is_same<_CharT, char>::type()); } call 0 never executed call 1 never executed -: 369: -: 370: bool #####: 371: _M_apply(_CharT __ch, true_type) const -: 372: { #####: 373: auto __c = _M_translator._M_translate(__ch); #####: 374: auto __n = _M_translator._M_translate('\n'); #####: 375: auto __r = _M_translator._M_translate('\r'); #####: 376: return __c != __n && __c != __r; -: 377: } ------------------ _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1ELb1EE8_M_applyEcSt17integral_constantIbLb1EE: function _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1ELb1EE8_M_applyEcSt17integral_constantIbLb1EE called 0 returned 0% blocks executed 0% #####: 371: _M_apply(_CharT __ch, true_type) const -: 372: { #####: 373: auto __c = _M_translator._M_translate(__ch); call 0 never executed #####: 374: auto __n = _M_translator._M_translate('\n'); call 0 never executed #####: 375: auto __r = _M_translator._M_translate('\r'); call 0 never executed #####: 376: return __c != __n && __c != __r; -: 377: } ------------------ _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1ELb0EE8_M_applyEcSt17integral_constantIbLb1EE: function _ZNKSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1ELb0EE8_M_applyEcSt17integral_constantIbLb1EE called 0 returned 0% blocks executed 0% #####: 371: _M_apply(_CharT __ch, true_type) const -: 372: { #####: 373: auto __c = _M_translator._M_translate(__ch); call 0 never executed #####: 374: auto __n = _M_translator._M_translate('\n'); call 0 never executed #####: 375: auto __r = _M_translator._M_translate('\r'); call 0 never executed #####: 376: return __c != __n && __c != __r; -: 377: } ------------------ -: 378: -: 379: bool -: 380: _M_apply(_CharT __ch, false_type) const -: 381: { -: 382: auto __c = _M_translator._M_translate(__ch); -: 383: auto __n = _M_translator._M_translate('\n'); -: 384: auto __r = _M_translator._M_translate('\r'); -: 385: auto __u2028 = _M_translator._M_translate(u'\u2028'); -: 386: auto __u2029 = _M_translator._M_translate(u'\u2029'); -: 387: return __c != __n && __c != __r && __c != __u2028 && __c != __u2029; -: 388: } -: 389: -: 390: _TransT _M_translator; -: 391: }; -: 392: -: 393: template -: 394: struct _CharMatcher -: 395: { -: 396: typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; -: 397: typedef typename _TransT::_CharT _CharT; -: 398: 5*: 399: _CharMatcher(_CharT __ch, const _TraitsT& __traits) 5*: 400: : _M_translator(__traits), _M_ch(_M_translator._M_translate(__ch)) 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 branch 9 never executed branch 10 never executed call 11 never executed branch 12 never executed branch 13 never executed call 14 never executed branch 15 never executed branch 16 never executed call 17 returned 100% branch 18 taken 100% (fallthrough) branch 19 taken 0% (throw) -: 401: { } -: 402: -: 403: bool 34*: 404: operator()(_CharT __ch) const #####: 405: { return _M_ch == _M_translator._M_translate(__ch); } call 0 never executed call 1 never executed -: 406: -: 407: _TransT _M_translator; -: 408: _CharT _M_ch; -: 409: }; -: 410: -: 411: /// Matches a character range (bracket expression) -: 412: template -: 413: struct _BracketMatcher -: 414: { -: 415: public: -: 416: typedef _RegexTranslator<_TraitsT, __icase, __collate> _TransT; -: 417: typedef typename _TransT::_CharT _CharT; -: 418: typedef typename _TransT::_StrTransT _StrTransT; -: 419: typedef typename _TraitsT::string_type _StringT; -: 420: typedef typename _TraitsT::char_class_type _CharClassT; -: 421: -: 422: public: 40*: 423: _BracketMatcher(bool __is_non_matching, -: 424: const _TraitsT& __traits) -: 425: : _M_class_set(0), _M_translator(__traits), _M_traits(__traits), 80*: 426: _M_is_non_matching(__is_non_matching) 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 taken 0% (fallthrough) branch 7 taken 100% call 8 never executed branch 9 never executed branch 10 never executed call 11 never executed branch 12 never executed branch 13 never executed call 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed -: 427: { } -: 428: -: 429: bool 154*: 430: operator()(_CharT __ch) const -: 431: { -: 432: _GLIBCXX_DEBUG_ASSERT(_M_is_ready); 154*: 433: return _M_apply(__ch, _UseCache()); -: 434: } -: 435: -: 436: void 10*: 437: _M_add_char(_CharT __c) -: 438: { 10*: 439: _M_char_set.push_back(_M_translator._M_translate(__c)); call 0 never executed call 1 never executed call 2 never executed call 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) -: 440: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); 10*: 441: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE11_M_add_charEc: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE11_M_add_charEc called 0 returned 0% blocks executed 0% #####: 437: _M_add_char(_CharT __c) -: 438: { #####: 439: _M_char_set.push_back(_M_translator._M_translate(__c)); call 0 never executed call 1 never executed -: 440: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 441: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE11_M_add_charEc: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE11_M_add_charEc called 0 returned 0% blocks executed 0% #####: 437: _M_add_char(_CharT __c) -: 438: { #####: 439: _M_char_set.push_back(_M_translator._M_translate(__c)); call 0 never executed call 1 never executed -: 440: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 441: } ------------------ -: 442: -: 443: _StringT #####: 444: _M_add_collate_element(const _StringT& __s) -: 445: { #####: 446: auto __st = _M_traits.lookup_collatename(__s.data(), #####: 447: __s.data() + __s.size()); #####: 448: if (__st.empty()) #####: 449: __throw_regex_error(regex_constants::error_collate, -: 450: "Invalid collate element."); #####: 451: _M_char_set.push_back(_M_translator._M_translate(__st[0])); -: 452: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 453: return __st; -: 454: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 444: _M_add_collate_element(const _StringT& __s) -: 445: { #####: 446: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed branch 1 never executed branch 2 never executed #####: 447: __s.data() + __s.size()); call 0 never executed #####: 448: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 449: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 450: "Invalid collate element."); #####: 451: _M_char_set.push_back(_M_translator._M_translate(__st[0])); 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 -: 452: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 453: return __st; -: 454: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 444: _M_add_collate_element(const _StringT& __s) -: 445: { #####: 446: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed branch 1 never executed branch 2 never executed #####: 447: __s.data() + __s.size()); call 0 never executed #####: 448: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 449: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 450: "Invalid collate element."); #####: 451: _M_char_set.push_back(_M_translator._M_translate(__st[0])); 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 -: 452: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 453: return __st; -: 454: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 444: _M_add_collate_element(const _StringT& __s) -: 445: { #####: 446: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed branch 1 never executed branch 2 never executed #####: 447: __s.data() + __s.size()); call 0 never executed #####: 448: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 449: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 450: "Invalid collate element."); #####: 451: _M_char_set.push_back(_M_translator._M_translate(__st[0])); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 452: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 453: return __st; -: 454: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE22_M_add_collate_elementERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 444: _M_add_collate_element(const _StringT& __s) -: 445: { #####: 446: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed branch 1 never executed branch 2 never executed #####: 447: __s.data() + __s.size()); call 0 never executed #####: 448: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 449: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 450: "Invalid collate element."); #####: 451: _M_char_set.push_back(_M_translator._M_translate(__st[0])); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 452: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 453: return __st; -: 454: } ------------------ -: 455: -: 456: void #####: 457: _M_add_equivalence_class(const _StringT& __s) -: 458: { #####: 459: auto __st = _M_traits.lookup_collatename(__s.data(), #####: 460: __s.data() + __s.size()); #####: 461: if (__st.empty()) #####: 462: __throw_regex_error(regex_constants::error_collate, -: 463: "Invalid equivalence class."); #####: 464: __st = _M_traits.transform_primary(__st.data(), #####: 465: __st.data() + __st.size()); #####: 466: _M_equiv_set.push_back(__st); -: 467: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 468: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 457: _M_add_equivalence_class(const _StringT& __s) -: 458: { #####: 459: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed #####: 460: __s.data() + __s.size()); call 0 never executed #####: 461: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 462: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 463: "Invalid equivalence class."); #####: 464: __st = _M_traits.transform_primary(__st.data(), call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 465: __st.data() + __st.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 466: _M_equiv_set.push_back(__st); call 0 never executed branch 1 never executed branch 2 never executed -: 467: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 468: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 457: _M_add_equivalence_class(const _StringT& __s) -: 458: { #####: 459: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed #####: 460: __s.data() + __s.size()); call 0 never executed #####: 461: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 462: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 463: "Invalid equivalence class."); #####: 464: __st = _M_traits.transform_primary(__st.data(), call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 465: __st.data() + __st.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 466: _M_equiv_set.push_back(__st); call 0 never executed branch 1 never executed branch 2 never executed -: 467: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 468: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 457: _M_add_equivalence_class(const _StringT& __s) -: 458: { #####: 459: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed #####: 460: __s.data() + __s.size()); call 0 never executed #####: 461: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 462: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 463: "Invalid equivalence class."); #####: 464: __st = _M_traits.transform_primary(__st.data(), call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 465: __st.data() + __st.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 466: _M_equiv_set.push_back(__st); call 0 never executed branch 1 never executed branch 2 never executed -: 467: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 468: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE24_M_add_equivalence_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEE called 0 returned 0% blocks executed 0% #####: 457: _M_add_equivalence_class(const _StringT& __s) -: 458: { #####: 459: auto __st = _M_traits.lookup_collatename(__s.data(), call 0 never executed #####: 460: __s.data() + __s.size()); call 0 never executed #####: 461: if (__st.empty()) branch 0 never executed branch 1 never executed #####: 462: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 463: "Invalid equivalence class."); #####: 464: __st = _M_traits.transform_primary(__st.data(), call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 465: __st.data() + __st.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 466: _M_equiv_set.push_back(__st); call 0 never executed branch 1 never executed branch 2 never executed -: 467: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 468: } ------------------ -: 469: -: 470: // __neg should be true for \D, \S and \W only. -: 471: void #####: 472: _M_add_character_class(const _StringT& __s, bool __neg) -: 473: { #####: 474: auto __mask = _M_traits.lookup_classname(__s.data(), #####: 475: __s.data() + __s.size(), -: 476: __icase); #####: 477: if (__mask == 0) #####: 478: __throw_regex_error(regex_constants::error_collate, -: 479: "Invalid character class."); #####: 480: if (!__neg) #####: 481: _M_class_set |= __mask; -: 482: else #####: 483: _M_neg_class_set.push_back(__mask); -: 484: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 485: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb called 0 returned 0% blocks executed 0% #####: 472: _M_add_character_class(const _StringT& __s, bool __neg) -: 473: { #####: 474: auto __mask = _M_traits.lookup_classname(__s.data(), call 0 never executed #####: 475: __s.data() + __s.size(), call 0 never executed -: 476: __icase); #####: 477: if (__mask == 0) branch 0 never executed branch 1 never executed #####: 478: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 479: "Invalid character class."); #####: 480: if (!__neg) branch 0 never executed branch 1 never executed #####: 481: _M_class_set |= __mask; -: 482: else #####: 483: _M_neg_class_set.push_back(__mask); call 0 never executed -: 484: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 485: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb called 0 returned 0% blocks executed 0% #####: 472: _M_add_character_class(const _StringT& __s, bool __neg) -: 473: { #####: 474: auto __mask = _M_traits.lookup_classname(__s.data(), call 0 never executed #####: 475: __s.data() + __s.size(), call 0 never executed -: 476: __icase); #####: 477: if (__mask == 0) branch 0 never executed branch 1 never executed #####: 478: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 479: "Invalid character class."); #####: 480: if (!__neg) branch 0 never executed branch 1 never executed #####: 481: _M_class_set |= __mask; -: 482: else #####: 483: _M_neg_class_set.push_back(__mask); call 0 never executed -: 484: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 485: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb called 0 returned 0% blocks executed 0% #####: 472: _M_add_character_class(const _StringT& __s, bool __neg) -: 473: { #####: 474: auto __mask = _M_traits.lookup_classname(__s.data(), call 0 never executed #####: 475: __s.data() + __s.size(), call 0 never executed -: 476: __icase); #####: 477: if (__mask == 0) branch 0 never executed branch 1 never executed #####: 478: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 479: "Invalid character class."); #####: 480: if (!__neg) branch 0 never executed branch 1 never executed #####: 481: _M_class_set |= __mask; -: 482: else #####: 483: _M_neg_class_set.push_back(__mask); call 0 never executed -: 484: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 485: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE22_M_add_character_classERKNS1_12basic_stringIcSt11char_traitsIcESaIcEEEb called 0 returned 0% blocks executed 0% #####: 472: _M_add_character_class(const _StringT& __s, bool __neg) -: 473: { #####: 474: auto __mask = _M_traits.lookup_classname(__s.data(), call 0 never executed #####: 475: __s.data() + __s.size(), call 0 never executed -: 476: __icase); #####: 477: if (__mask == 0) branch 0 never executed branch 1 never executed #####: 478: __throw_regex_error(regex_constants::error_collate, call 0 never executed -: 479: "Invalid character class."); #####: 480: if (!__neg) branch 0 never executed branch 1 never executed #####: 481: _M_class_set |= __mask; -: 482: else #####: 483: _M_neg_class_set.push_back(__mask); call 0 never executed -: 484: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 485: } ------------------ -: 486: -: 487: void 120*: 488: _M_make_range(_CharT __l, _CharT __r) -: 489: { 120*: 490: if (__l > __r) #####: 491: __throw_regex_error(regex_constants::error_range, -: 492: "Invalid range in bracket expression."); 120*: 493: _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), -: 494: _M_translator._M_transform(__r))); -: 495: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); 120*: 496: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE13_M_make_rangeEcc: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE13_M_make_rangeEcc called 0 returned 0% blocks executed 0% #####: 488: _M_make_range(_CharT __l, _CharT __r) -: 489: { #####: 490: if (__l > __r) branch 0 never executed branch 1 never executed #####: 491: __throw_regex_error(regex_constants::error_range, call 0 never executed -: 492: "Invalid range in bracket expression."); #####: 493: _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), 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 branch 15 never executed branch 16 never executed -: 494: _M_translator._M_transform(__r))); -: 495: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 496: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE13_M_make_rangeEcc: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE13_M_make_rangeEcc called 0 returned 0% blocks executed 0% #####: 488: _M_make_range(_CharT __l, _CharT __r) -: 489: { #####: 490: if (__l > __r) branch 0 never executed branch 1 never executed #####: 491: __throw_regex_error(regex_constants::error_range, call 0 never executed -: 492: "Invalid range in bracket expression."); #####: 493: _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), call 0 never executed -: 494: _M_translator._M_transform(__r))); -: 495: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 496: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE13_M_make_rangeEcc: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE13_M_make_rangeEcc called 0 returned 0% blocks executed 0% #####: 488: _M_make_range(_CharT __l, _CharT __r) -: 489: { #####: 490: if (__l > __r) branch 0 never executed branch 1 never executed #####: 491: __throw_regex_error(regex_constants::error_range, call 0 never executed -: 492: "Invalid range in bracket expression."); #####: 493: _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), 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 branch 15 never executed branch 16 never executed -: 494: _M_translator._M_transform(__r))); -: 495: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); #####: 496: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE13_M_make_rangeEcc: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE13_M_make_rangeEcc called 120 returned 100% blocks executed 75% 120: 488: _M_make_range(_CharT __l, _CharT __r) -: 489: { 120: 490: if (__l > __r) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 491: __throw_regex_error(regex_constants::error_range, call 0 never executed -: 492: "Invalid range in bracket expression."); 120: 493: _M_range_set.push_back(make_pair(_M_translator._M_transform(__l), call 0 returned 100% -: 494: _M_translator._M_transform(__r))); -: 495: _GLIBCXX_DEBUG_ONLY(_M_is_ready = false); 120: 496: } ------------------ -: 497: -: 498: void 40*: 499: _M_ready() -: 500: { 40*: 501: std::sort(_M_char_set.begin(), _M_char_set.end()); 40*: 502: auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); 40*: 503: _M_char_set.erase(__end, _M_char_set.end()); 40*: 504: _M_make_cache(_UseCache()); -: 505: _GLIBCXX_DEBUG_ONLY(_M_is_ready = true); 40*: 506: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE8_M_readyEv: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE8_M_readyEv called 0 returned 0% blocks executed 0% #####: 499: _M_ready() -: 500: { #####: 501: std::sort(_M_char_set.begin(), _M_char_set.end()); call 0 never executed #####: 502: auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); call 0 never executed #####: 503: _M_char_set.erase(__end, _M_char_set.end()); call 0 never executed #####: 504: _M_make_cache(_UseCache()); call 0 never executed -: 505: _GLIBCXX_DEBUG_ONLY(_M_is_ready = true); #####: 506: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE8_M_readyEv: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE8_M_readyEv called 0 returned 0% blocks executed 0% #####: 499: _M_ready() -: 500: { #####: 501: std::sort(_M_char_set.begin(), _M_char_set.end()); call 0 never executed #####: 502: auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); call 0 never executed #####: 503: _M_char_set.erase(__end, _M_char_set.end()); call 0 never executed #####: 504: _M_make_cache(_UseCache()); call 0 never executed -: 505: _GLIBCXX_DEBUG_ONLY(_M_is_ready = true); #####: 506: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE8_M_readyEv: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE8_M_readyEv called 0 returned 0% blocks executed 0% #####: 499: _M_ready() -: 500: { #####: 501: std::sort(_M_char_set.begin(), _M_char_set.end()); call 0 never executed #####: 502: auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); call 0 never executed #####: 503: _M_char_set.erase(__end, _M_char_set.end()); call 0 never executed #####: 504: _M_make_cache(_UseCache()); call 0 never executed -: 505: _GLIBCXX_DEBUG_ONLY(_M_is_ready = true); #####: 506: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE8_M_readyEv: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE8_M_readyEv called 40 returned 100% blocks executed 100% 40: 499: _M_ready() -: 500: { 40: 501: std::sort(_M_char_set.begin(), _M_char_set.end()); call 0 returned 100% 40: 502: auto __end = std::unique(_M_char_set.begin(), _M_char_set.end()); call 0 returned 100% 40: 503: _M_char_set.erase(__end, _M_char_set.end()); call 0 returned 100% 40: 504: _M_make_cache(_UseCache()); call 0 returned 100% -: 505: _GLIBCXX_DEBUG_ONLY(_M_is_ready = true); 40: 506: } ------------------ -: 507: -: 508: private: -: 509: // Currently we only use the cache for char -: 510: typedef typename std::is_same<_CharT, char>::type _UseCache; -: 511: -: 512: static constexpr size_t -: 513: _S_cache_size = -: 514: 1ul << (sizeof(_CharT) * __CHAR_BIT__ * int(_UseCache::value)); -: 515: -: 516: struct _Dummy { }; -: 517: typedef typename std::conditional<_UseCache::value, -: 518: std::bitset<_S_cache_size>, -: 519: _Dummy>::type _CacheT; -: 520: typedef typename std::make_unsigned<_CharT>::type _UnsignedCharT; -: 521: -: 522: bool -: 523: _M_apply(_CharT __ch, false_type) const; -: 524: -: 525: bool 154*: 526: _M_apply(_CharT __ch, true_type) const 154*: 527: { return _M_cache[static_cast<_UnsignedCharT>(__ch)]; } -: 528: -: 529: void 40*: 530: _M_make_cache(true_type) -: 531: { 10280*: 532: for (unsigned __i = 0; __i < _M_cache.size(); __i++) 20480*: 533: _M_cache[__i] = _M_apply(static_cast<_CharT>(__i), false_type()); 40*: 534: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE13_M_make_cacheESt17integral_constantIbLb1EE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EE13_M_make_cacheESt17integral_constantIbLb1EE called 0 returned 0% blocks executed 0% #####: 530: _M_make_cache(true_type) -: 531: { #####: 532: for (unsigned __i = 0; __i < _M_cache.size(); __i++) branch 0 never executed branch 1 never executed #####: 533: _M_cache[__i] = _M_apply(static_cast<_CharT>(__i), false_type()); call 0 never executed branch 1 never executed branch 2 never executed #####: 534: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE13_M_make_cacheESt17integral_constantIbLb1EE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EE13_M_make_cacheESt17integral_constantIbLb1EE called 0 returned 0% blocks executed 0% #####: 530: _M_make_cache(true_type) -: 531: { #####: 532: for (unsigned __i = 0; __i < _M_cache.size(); __i++) branch 0 never executed branch 1 never executed #####: 533: _M_cache[__i] = _M_apply(static_cast<_CharT>(__i), false_type()); call 0 never executed branch 1 never executed branch 2 never executed #####: 534: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE13_M_make_cacheESt17integral_constantIbLb1EE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EE13_M_make_cacheESt17integral_constantIbLb1EE called 0 returned 0% blocks executed 0% #####: 530: _M_make_cache(true_type) -: 531: { #####: 532: for (unsigned __i = 0; __i < _M_cache.size(); __i++) branch 0 never executed branch 1 never executed #####: 533: _M_cache[__i] = _M_apply(static_cast<_CharT>(__i), false_type()); call 0 never executed branch 1 never executed branch 2 never executed #####: 534: } ------------------ _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE13_M_make_cacheESt17integral_constantIbLb1EE: function _ZNSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EE13_M_make_cacheESt17integral_constantIbLb1EE called 40 returned 100% blocks executed 100% 40: 530: _M_make_cache(true_type) -: 531: { 10280: 532: for (unsigned __i = 0; __i < _M_cache.size(); __i++) branch 0 taken 100% (fallthrough) branch 1 taken 1% 20480: 533: _M_cache[__i] = _M_apply(static_cast<_CharT>(__i), false_type()); call 0 returned 100% branch 1 taken 24% (fallthrough) branch 2 taken 76% 40: 534: } ------------------ -: 535: -: 536: void -: 537: _M_make_cache(false_type) -: 538: { } -: 539: -: 540: private: -: 541: std::vector<_CharT> _M_char_set; -: 542: std::vector<_StringT> _M_equiv_set; -: 543: std::vector> _M_range_set; -: 544: std::vector<_CharClassT> _M_neg_class_set; -: 545: _CharClassT _M_class_set; -: 546: _TransT _M_translator; -: 547: const _TraitsT& _M_traits; -: 548: bool _M_is_non_matching; -: 549: _CacheT _M_cache; -: 550:#ifdef _GLIBCXX_DEBUG -: 551: bool _M_is_ready = false; -: 552:#endif -: 553: }; -: 554: -: 555: ///@} regex-detail -: 556:} // namespace __detail -: 557:_GLIBCXX_END_NAMESPACE_VERSION -: 558:} // namespace std -: 559: -: 560:#include <<<<<< EOF # path=/home/runner/work/botan/botan/src#tests#test_keywrap.cpp.gcov -: 0:Source:src/tests/test_keywrap.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_keywrap.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_keywrap.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2014,2015 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "tests.h" -: 8: -: 9:#if defined(BOTAN_HAS_RFC3394_KEYWRAP) -: 10: #include -: 11:#endif -: 12: -: 13:#if defined(BOTAN_HAS_NIST_KEYWRAP) -: 14: #include -: 15: #include -: 16:#endif -: 17: -: 18:namespace Botan_Tests { -: 19: -: 20:namespace { -: 21: -: 22:#if defined(BOTAN_HAS_RFC3394_KEYWRAP) -: 23:class RFC3394_Keywrap_Tests final : public Text_Based_Test -: 24: { -: 25: public: function _ZN11Botan_Tests12_GLOBAL__N_121RFC3394_Keywrap_TestsC2Ev called 1 returned 100% blocks executed 38% 2: 26: RFC3394_Keywrap_Tests() : Text_Based_Test("keywrap/rfc3394.vec", "Key,KEK,Output") {} call 0 returned 100% branch 1 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% -: 27: function _ZN11Botan_Tests12_GLOBAL__N_121RFC3394_Keywrap_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 6 returned 100% blocks executed 33% 6: 28: Test::Result run_one_test(const std::string&, const VarMap& vars) override -: 29: { 6: 30: Test::Result result("RFC3394 keywrap"); call 0 returned 100% branch 1 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 -: 31: 6: 32: try -: 33: { 12: 34: const std::vector expected = vars.get_req_bin("Output"); call 0 returned 100% 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: 35: const std::vector key = vars.get_req_bin("Key"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% 12: 36: const std::vector kek = vars.get_req_bin("KEK"); call 0 returned 100% 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% -: 37: 12: 38: const Botan::SymmetricKey kek_sym(kek); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 12: 39: const Botan::secure_vector key_l(key.begin(), key.end()); 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 12: 40: const Botan::secure_vector exp_l(expected.begin(), expected.end()); 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 -: 41: 12: 42: result.test_eq("encryption", Botan::rfc3394_keywrap(key_l, kek_sym), expected); call 0 returned 100% branch 1 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% 18: 43: result.test_eq("decryption", Botan::rfc3394_keyunwrap(exp_l, kek_sym), key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed -: 44: } =====: 45: catch(std::exception& e) call 0 never executed call 1 never executed -: 46: { =====: 47: result.test_failure("", e.what()); 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 -: 48: } -: 49: 6: 50: return result; -: 51: } -: 52: -: 53: }; -: 54: -: 55:BOTAN_REGISTER_TEST("keywrap", "rfc3394", RFC3394_Keywrap_Tests); -: 56:#endif -: 57: -: 58:#if defined(BOTAN_HAS_NIST_KEYWRAP) && defined(BOTAN_HAS_AES) -: 59: -: 60:class NIST_Keywrap_Tests final : public Text_Based_Test -: 61: { -: 62: public: function _ZN11Botan_Tests12_GLOBAL__N_118NIST_Keywrap_TestsC2Ev called 1 returned 100% blocks executed 45% 3: 63: NIST_Keywrap_Tests() : Text_Based_Test("keywrap/nist_key_wrap.vec", "Input,Key,Output") {} call 0 returned 100% branch 1 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 taken 0% (fallthrough) branch 15 taken 100% -: 64: function _ZN11Botan_Tests12_GLOBAL__N_118NIST_Keywrap_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 135 returned 100% blocks executed 32% 135: 65: Test::Result run_one_test(const std::string& typ, const VarMap& vars) override -: 66: { 135: 67: Test::Result result("NIST keywrap"); call 0 returned 100% branch 1 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 -: 68: 135: 69: try -: 70: { 264: 71: if(typ != "KW" && typ != "KWP") call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 72: throw Test_Error("Unknown type in NIST key wrap tests"); 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 -: 73: 270: 74: const std::vector expected = vars.get_req_bin("Output"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 270: 75: const std::vector input = vars.get_req_bin("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 100% (fallthrough) branch 7 taken 0% 270: 76: const std::vector key = vars.get_req_bin("Key"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 77: 135: 78: std::unique_ptr bc = 405: 79: Botan::BlockCipher::create_or_throw("AES-" + std::to_string(key.size()*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% 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% branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed -: 80: 135: 81: bc->set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 82: 270: 83: std::vector wrapped; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 84: 135: 85: if(typ == "KW") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 86: { 12: 87: wrapped = nist_key_wrap(input.data(), input.size(), *bc); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 88: } 129: 89: else if(typ == "KWP") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 90: { 258: 91: wrapped = nist_key_wrap_padded(input.data(), input.size(), *bc); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 92: } -: 93: 135: 94: result.test_eq("key wrap", wrapped, expected); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 95: 135: 96: try -: 97: { 270: 98: Botan::secure_vector unwrapped; call 0 returned 100% 135: 99: if(typ == "KW") call 0 returned 100% branch 1 taken 4% (fallthrough) branch 2 taken 96% -: 100: { 12: 101: unwrapped = nist_key_unwrap(expected.data(), expected.size(), *bc); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 102: } 129: 103: else if(typ == "KWP") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 104: { 258: 105: unwrapped = nist_key_unwrap_padded(expected.data(), expected.size(), *bc); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 106: } -: 107: 270: 108: result.test_eq("key unwrap", unwrapped, 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 100% (fallthrough) branch 7 taken 0% -: 109: } =====: 110: catch(Botan::Integrity_Failure& e) call 0 never executed call 1 never executed -: 111: { =====: 112: result.test_failure("NIST key unwrap failed with integrity failure", e.what()); 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 -: 113: } -: 114: } =====: 115: catch(std::exception& e) call 0 never executed call 1 never executed -: 116: { =====: 117: result.test_failure("", e.what()); 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 -: 118: } -: 119: 135: 120: return result; -: 121: } -: 122: -: 123: }; -: 124: -: 125:BOTAN_REGISTER_TEST("keywrap", "nist_key_wrap", NIST_Keywrap_Tests); -: 126: -: 127:class NIST_Keywrap_Invalid_Tests final : public Text_Based_Test -: 128: { -: 129: public: function _ZN11Botan_Tests12_GLOBAL__N_126NIST_Keywrap_Invalid_TestsC2Ev called 1 returned 100% blocks executed 38% 2: 130: NIST_Keywrap_Invalid_Tests() : Text_Based_Test("keywrap/nist_key_wrap_invalid.vec", "Key,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) 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% -: 131: function _ZN11Botan_Tests12_GLOBAL__N_126NIST_Keywrap_Invalid_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 10 returned 100% blocks executed 29% 10: 132: Test::Result run_one_test(const std::string& typ, const VarMap& vars) override -: 133: { 10: 134: Test::Result result("NIST keywrap (invalid inputs)"); call 0 returned 100% branch 1 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 -: 135: 10: 136: try -: 137: { 13: 138: if(typ != "KW" && typ != "KWP") call 0 returned 100% branch 1 taken 30% (fallthrough) branch 2 taken 70% branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 139: throw Test_Error("Unknown type in NIST key wrap tests"); 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 -: 140: 20: 141: const std::vector input = vars.get_req_bin("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) 20: 142: const std::vector key = vars.get_req_bin("Key"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 143: 10: 144: std::unique_ptr bc = 30: 145: Botan::BlockCipher::create_or_throw("AES-" + std::to_string(key.size()*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% 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% branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed -: 146: 10: 147: bc->set_key(key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 148: 10: 149: try -: 150: { 20*: 151: Botan::secure_vector unwrapped; call 0 returned 100% 10: 152: if(typ == "KW") call 0 returned 100% branch 1 taken 70% (fallthrough) branch 2 taken 30% -: 153: { 7*: 154: unwrapped = nist_key_unwrap(input.data(), input.size(), *bc); call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% (throw) branch 3 never executed branch 4 never executed -: 155: } 3: 156: else if(typ == "KWP") call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 157: { 3*: 158: unwrapped = nist_key_unwrap_padded(input.data(), input.size(), *bc); call 0 returned 100% branch 1 taken 0% (fallthrough) branch 2 taken 100% (throw) branch 3 never executed branch 4 never executed -: 159: } -: 160: #####: 161: result.test_failure("Was able to unwrap invalid keywrap input"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed -: 162: } 10: 163: catch(Botan::Integrity_Failure&) call 0 returned 100% call 1 never executed -: 164: { 20: 165: result.test_success("Rejected invalid 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) -: 166: } -: 167: } =====: 168: catch(std::exception& e) call 0 never executed call 1 never executed -: 169: { =====: 170: result.test_failure("", e.what()); 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 -: 171: } -: 172: 10: 173: return result; -: 174: } -: 175: -: 176: }; -: 177: -: 178:BOTAN_REGISTER_TEST("keywrap", "nist_key_wrap_invalid", NIST_Keywrap_Invalid_Tests); -: 179:#endif -: 180: -: 181:} -: 182: -: 183:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#block#shacal2#shacal2_simd#shacal2_simd.cpp.gcov -: 0:Source:src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/block_shacal2_simd.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/block_shacal2_simd.gcda -: 0:Runs:2960 -: 1:/* -: 2:* SHACAL-2 using SIMD -: 3:* (C) 2017 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10: -: 11:namespace Botan { -: 12: -: 13:namespace { -: 14: -: 15:inline function _ZN5Botan12_GLOBAL__N_111SHACAL2_FwdERKNS_9SIMD_4x32ES3_S3_RS1_S3_S3_S3_S4_j called 1792 returned 100% blocks executed 100% 1792: 16:void SHACAL2_Fwd(const SIMD_4x32& A, const SIMD_4x32& B, const SIMD_4x32& C, SIMD_4x32& D, -: 17: const SIMD_4x32& E, const SIMD_4x32& F, const SIMD_4x32& G, SIMD_4x32& H, -: 18: uint32_t RK) -: 19: { 3584: 20: H += E.rho<6,11,25>() + ((E & F) ^ (~E & G)) + SIMD_4x32::splat(RK); call 0 returned 100% call 1 returned 100% 1792: 21: D += H; 1792: 22: H += A.rho<2,13,22>() + ((A & B) | ((A | B) & C)); call 0 returned 100% 1792: 23: } -: 24: -: 25:inline function _ZN5Botan12_GLOBAL__N_111SHACAL2_RevERKNS_9SIMD_4x32ES3_S3_RS1_S3_S3_S3_S4_j called 1792 returned 100% blocks executed 100% 1792: 26:void SHACAL2_Rev(const SIMD_4x32& A, const SIMD_4x32& B, const SIMD_4x32& C, SIMD_4x32& D, -: 27: const SIMD_4x32& E, const SIMD_4x32& F, const SIMD_4x32& G, SIMD_4x32& H, -: 28: uint32_t RK) -: 29: { 3584: 30: H -= A.rho<2,13,22>() + ((A & B) | ((A | B) & C)); call 0 returned 100% call 1 returned 100% 1792: 31: D -= H; 1792: 32: H -= E.rho<6,11,25>() + ((E & F) ^ (~E & G)) + SIMD_4x32::splat(RK); call 0 returned 100% 1792: 33: } -: 34: -: 35:} -: 36: function _ZNK5Botan7SHACAL214simd_encrypt_4EPKhPh called 28 returned 100% blocks executed 100% 28: 37:void SHACAL2::simd_encrypt_4(const uint8_t in[], uint8_t out[]) const -: 38: { 28: 39: SIMD_4x32 A = SIMD_4x32::load_be(in); call 0 returned 100% 28: 40: SIMD_4x32 E = SIMD_4x32::load_be(in+16); call 0 returned 100% 28: 41: SIMD_4x32 B = SIMD_4x32::load_be(in+32); call 0 returned 100% 28: 42: SIMD_4x32 F = SIMD_4x32::load_be(in+48); call 0 returned 100% -: 43: 28: 44: SIMD_4x32 C = SIMD_4x32::load_be(in+64); call 0 returned 100% 28: 45: SIMD_4x32 G = SIMD_4x32::load_be(in+80); call 0 returned 100% 28: 46: SIMD_4x32 D = SIMD_4x32::load_be(in+96); call 0 returned 100% 28: 47: SIMD_4x32 H = SIMD_4x32::load_be(in+112); call 0 returned 100% -: 48: 28: 49: SIMD_4x32::transpose(A, B, C, D); call 0 returned 100% 28: 50: SIMD_4x32::transpose(E, F, G, H); call 0 returned 100% -: 51: 252: 52: for(size_t r = 0; r != 64; r += 8) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 53: { 224: 54: SHACAL2_Fwd(A, B, C, D, E, F, G, H, m_RK[r+0]); call 0 returned 100% 224: 55: SHACAL2_Fwd(H, A, B, C, D, E, F, G, m_RK[r+1]); call 0 returned 100% 224: 56: SHACAL2_Fwd(G, H, A, B, C, D, E, F, m_RK[r+2]); call 0 returned 100% 224: 57: SHACAL2_Fwd(F, G, H, A, B, C, D, E, m_RK[r+3]); call 0 returned 100% 224: 58: SHACAL2_Fwd(E, F, G, H, A, B, C, D, m_RK[r+4]); call 0 returned 100% 224: 59: SHACAL2_Fwd(D, E, F, G, H, A, B, C, m_RK[r+5]); call 0 returned 100% 224: 60: SHACAL2_Fwd(C, D, E, F, G, H, A, B, m_RK[r+6]); call 0 returned 100% 224: 61: SHACAL2_Fwd(B, C, D, E, F, G, H, A, m_RK[r+7]); call 0 returned 100% -: 62: } -: 63: 28: 64: SIMD_4x32::transpose(A, B, C, D); call 0 returned 100% 28: 65: SIMD_4x32::transpose(E, F, G, H); call 0 returned 100% -: 66: 28: 67: A.store_be(out); call 0 returned 100% 28: 68: E.store_be(out+16); call 0 returned 100% 28: 69: B.store_be(out+32); call 0 returned 100% 28: 70: F.store_be(out+48); call 0 returned 100% -: 71: 28: 72: C.store_be(out+64); call 0 returned 100% 28: 73: G.store_be(out+80); call 0 returned 100% 28: 74: D.store_be(out+96); call 0 returned 100% 28: 75: H.store_be(out+112); call 0 returned 100% 28: 76: } -: 77: function _ZNK5Botan7SHACAL214simd_decrypt_4EPKhPh called 28 returned 100% blocks executed 100% 28: 78:void SHACAL2::simd_decrypt_4(const uint8_t in[], uint8_t out[]) const -: 79: { 28: 80: SIMD_4x32 A = SIMD_4x32::load_be(in); call 0 returned 100% 28: 81: SIMD_4x32 E = SIMD_4x32::load_be(in+16); call 0 returned 100% 28: 82: SIMD_4x32 B = SIMD_4x32::load_be(in+32); call 0 returned 100% 28: 83: SIMD_4x32 F = SIMD_4x32::load_be(in+48); call 0 returned 100% -: 84: 28: 85: SIMD_4x32 C = SIMD_4x32::load_be(in+64); call 0 returned 100% 28: 86: SIMD_4x32 G = SIMD_4x32::load_be(in+80); call 0 returned 100% 28: 87: SIMD_4x32 D = SIMD_4x32::load_be(in+96); call 0 returned 100% 28: 88: SIMD_4x32 H = SIMD_4x32::load_be(in+112); call 0 returned 100% -: 89: 28: 90: SIMD_4x32::transpose(A, B, C, D); call 0 returned 100% 28: 91: SIMD_4x32::transpose(E, F, G, H); call 0 returned 100% -: 92: 252: 93: for(size_t r = 0; r != 64; r += 8) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 94: { 224: 95: SHACAL2_Rev(B, C, D, E, F, G, H, A, m_RK[63-r]); call 0 returned 100% 224: 96: SHACAL2_Rev(C, D, E, F, G, H, A, B, m_RK[62-r]); call 0 returned 100% 224: 97: SHACAL2_Rev(D, E, F, G, H, A, B, C, m_RK[61-r]); call 0 returned 100% 224: 98: SHACAL2_Rev(E, F, G, H, A, B, C, D, m_RK[60-r]); call 0 returned 100% 224: 99: SHACAL2_Rev(F, G, H, A, B, C, D, E, m_RK[59-r]); call 0 returned 100% 224: 100: SHACAL2_Rev(G, H, A, B, C, D, E, F, m_RK[58-r]); call 0 returned 100% 224: 101: SHACAL2_Rev(H, A, B, C, D, E, F, G, m_RK[57-r]); call 0 returned 100% 224: 102: SHACAL2_Rev(A, B, C, D, E, F, G, H, m_RK[56-r]); call 0 returned 100% -: 103: } -: 104: 28: 105: SIMD_4x32::transpose(A, B, C, D); call 0 returned 100% 28: 106: SIMD_4x32::transpose(E, F, G, H); call 0 returned 100% -: 107: 28: 108: A.store_be(out); call 0 returned 100% 28: 109: E.store_be(out+16); call 0 returned 100% 28: 110: B.store_be(out+32); call 0 returned 100% 28: 111: F.store_be(out+48); call 0 returned 100% -: 112: 28: 113: C.store_be(out+64); call 0 returned 100% 28: 114: G.store_be(out+80); call 0 returned 100% 28: 115: D.store_be(out+96); call 0 returned 100% 28: 116: H.store_be(out+112); call 0 returned 100% 28: 117: } -: 118: -: 119:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#math#numbertheory#pow_mod.cpp.gcov -: 0:Source:src/lib/math/numbertheory/pow_mod.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_pow_mod.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/math_numbertheory_pow_mod.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Modular Exponentiation Proxy -: 3:* (C) 1999-2007,2012,2018,2019 Jack Lloyd -: 4:* 2016 Matthias Gierlings -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16: -: 17:namespace Botan { -: 18: -: 19:class Modular_Exponentiator -: 20: { -: 21: public: -: 22: virtual void set_base(const BigInt&) = 0; -: 23: virtual void set_exponent(const BigInt&) = 0; -: 24: virtual BigInt execute() const = 0; -: 25: virtual Modular_Exponentiator* copy() const = 0; -: 26: 123: 27: Modular_Exponentiator() = default; -: 28: Modular_Exponentiator(const Modular_Exponentiator&) = default; -: 29: Modular_Exponentiator & operator=(const Modular_Exponentiator&) = default; -: 30: virtual ~Modular_Exponentiator() = default; -: 31: }; -: 32: -: 33:namespace { -: 34: -: 35:/** -: 36:* Fixed Window Exponentiator -: 37:*/ -: 38:class Fixed_Window_Exponentiator final : public Modular_Exponentiator -: 39: { -: 40: public: function _ZN5Botan12_GLOBAL__N_126Fixed_Window_Exponentiator12set_exponentERKNS_6BigIntE called 49 returned 100% blocks executed 100% 49: 41: void set_exponent(const BigInt& e) override { m_exp = e; } call 0 returned 100% -: 42: void set_base(const BigInt&) override; -: 43: BigInt execute() const override; -: 44: function _ZNK5Botan12_GLOBAL__N_126Fixed_Window_Exponentiator4copyEv called 0 returned 0% blocks executed 0% #####: 45: Modular_Exponentiator* copy() const override #####: 46: { return new Fixed_Window_Exponentiator(*this); } call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 47: -: 48: Fixed_Window_Exponentiator(const BigInt&, Power_Mod::Usage_Hints); -: 49: private: -: 50: Modular_Reducer m_reducer; -: 51: BigInt m_exp; -: 52: size_t m_window_bits; -: 53: std::vector m_g; -: 54: Power_Mod::Usage_Hints m_hints; -: 55: }; -: 56: function _ZN5Botan12_GLOBAL__N_126Fixed_Window_Exponentiator8set_baseERKNS_6BigIntE called 49 returned 100% blocks executed 77% 49: 57:void Fixed_Window_Exponentiator::set_base(const BigInt& base) -: 58: { 49: 59: m_window_bits = Power_Mod::window_bits(m_exp.bits(), base.bits(), m_hints); call 0 returned 100% call 1 returned 100% call 2 returned 100% -: 60: 49: 61: m_g.resize(static_cast(1) << m_window_bits); call 0 returned 100% 98: 62: m_g[0] = 1; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 0% (fallthrough) branch 4 taken 100% 98: 63: m_g[1] = m_reducer.reduce(base); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 64: 883: 65: for(size_t i = 2; i != m_g.size(); ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% 1668: 66: m_g[i] = m_reducer.multiply(m_g[i-1], m_g[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 0% (fallthrough) branch 4 taken 100% 49: 67: } -: 68: function _ZNK5Botan12_GLOBAL__N_126Fixed_Window_Exponentiator7executeEv called 55 returned 100% blocks executed 86% 55: 69:BigInt Fixed_Window_Exponentiator::execute() const -: 70: { 55: 71: const size_t exp_nibbles = (m_exp.bits() + m_window_bits - 1) / m_window_bits; call 0 returned 100% -: 72: 55: 73: BigInt x = 1; -: 74: 1983: 75: for(size_t i = exp_nibbles; i > 0; --i) call 0 returned 100% branch 1 taken 97% (fallthrough) branch 2 taken 3% -: 76: { 10199: 77: for(size_t j = 0; j != m_window_bits; ++j) branch 0 taken 81% (fallthrough) branch 1 taken 19% 16542: 78: x = m_reducer.square(x); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 79: 1928: 80: const uint32_t nibble = m_exp.get_substring(m_window_bits*(i-1), m_window_bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 81: -: 82: // not const time: 3856: 83: x = m_reducer.multiply(x, m_g[nibble]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 84: } 55: 85: return x; -: 86: } -: 87: -: 88:/* -: 89:* Fixed_Window_Exponentiator Constructor -: 90:*/ 49: 91:Fixed_Window_Exponentiator::Fixed_Window_Exponentiator(const BigInt& n, 49: 92: Power_Mod::Usage_Hints hints) 49: 93: : m_reducer{Modular_Reducer(n)}, m_exp{}, m_window_bits{}, m_g{}, m_hints{hints} branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 94: {} -: 95: -: 96:class Montgomery_Exponentiator final : public Modular_Exponentiator -: 97: { -: 98: public: function _ZN5Botan12_GLOBAL__N_124Montgomery_Exponentiator12set_exponentERKNS_6BigIntE called 74 returned 100% blocks executed 100% 74: 99: void set_exponent(const BigInt& e) override { m_e = e; } call 0 returned 100% -: 100: void set_base(const BigInt&) override; -: 101: BigInt execute() const override; -: 102: function _ZNK5Botan12_GLOBAL__N_124Montgomery_Exponentiator4copyEv called 0 returned 0% blocks executed 0% #####: 103: Modular_Exponentiator* copy() const override #####: 104: { return new Montgomery_Exponentiator(*this); } call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed -: 105: -: 106: Montgomery_Exponentiator(const BigInt&, Power_Mod::Usage_Hints); -: 107: private: -: 108: BigInt m_p; -: 109: Modular_Reducer m_mod_p; -: 110: std::shared_ptr m_monty_params; -: 111: std::shared_ptr m_monty; -: 112: -: 113: BigInt m_e; -: 114: Power_Mod::Usage_Hints m_hints; -: 115: }; -: 116: function _ZN5Botan12_GLOBAL__N_124Montgomery_Exponentiator8set_baseERKNS_6BigIntE called 74 returned 100% blocks executed 65% 74: 117:void Montgomery_Exponentiator::set_base(const BigInt& base) -: 118: { 74: 119: size_t window_bits = Power_Mod::window_bits(m_e.bits(), base.bits(), m_hints); call 0 returned 100% call 1 returned 100% call 2 returned 100% 148: 120: m_monty = monty_precompute(m_monty_params, m_mod_p.reduce(base), window_bits); 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% branch 7 taken 0% (fallthrough) branch 8 taken 100% branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed 74: 121: } -: 122: function _ZNK5Botan12_GLOBAL__N_124Montgomery_Exponentiator7executeEv called 111 returned 100% blocks executed 100% 111: 123:BigInt Montgomery_Exponentiator::execute() const -: 124: { -: 125: /* -: 126: This leaks size of e via loop iterations, not possible to fix without -: 127: breaking this API. Round up to avoid leaking fine details. -: 128: */ 195: 129: return monty_execute(*m_monty, m_e, round_up(m_e.bits(), 8)); call 0 returned 100% branch 1 taken 76% (fallthrough) branch 2 taken 24% call 3 returned 100% -: 130: } -: 131: function _ZN5Botan12_GLOBAL__N_124Montgomery_ExponentiatorC2ERKNS_6BigIntENS_9Power_Mod11Usage_HintsE called 74 returned 100% blocks executed 50% 74: 132:Montgomery_Exponentiator::Montgomery_Exponentiator(const BigInt& mod, 74: 133: Power_Mod::Usage_Hints hints) : -: 134: m_p(mod), -: 135: m_mod_p(mod), 74: 136: m_monty_params(std::make_shared(m_p, m_mod_p)), 74: 137: m_hints(hints) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 never executed branch 8 never executed branch 9 never executed -: 138: { 74: 139: } -: 140: -: 141:} -: 142: -: 143:/* -: 144:* Power_Mod Constructor -: 145:*/ function _ZN5Botan9Power_ModC2ERKNS_6BigIntENS0_11Usage_HintsEb called 123 returned 100% blocks executed 50% 123: 146:Power_Mod::Power_Mod(const BigInt& n, Usage_Hints hints, bool disable_monty) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 147: { 123: 148: set_modulus(n, hints, disable_monty); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 123: 149: } -: 150: 123*: 151:Power_Mod::~Power_Mod() { /* for ~unique_ptr */ } ------------------ _ZN5Botan9Power_ModD0Ev: function _ZN5Botan9Power_ModD0Ev called 0 returned 0% blocks executed 0% #####: 151:Power_Mod::~Power_Mod() { /* for ~unique_ptr */ } call 0 never executed call 1 never executed ------------------ _ZN5Botan9Power_ModD2Ev: function _ZN5Botan9Power_ModD2Ev called 123 returned 100% blocks executed 100% 123: 151:Power_Mod::~Power_Mod() { /* for ~unique_ptr */ } branch 0 taken 100% (fallthrough) branch 1 taken 0% ------------------ -: 152: -: 153:/* -: 154:* Power_Mod Copy Constructor -: 155:*/ function _ZN5Botan9Power_ModC2ERKS0_ called 0 returned 0% blocks executed 0% #####: 156:Power_Mod::Power_Mod(const Power_Mod& other) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 157: { #####: 158: if(other.m_core.get()) branch 0 never executed branch 1 never executed #####: 159: m_core.reset(other.m_core->copy()); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 160: } -: 161: -: 162:/* -: 163:* Power_Mod Assignment Operator -: 164:*/ function _ZN5Botan9Power_ModaSERKS0_ called 0 returned 0% blocks executed 0% #####: 165:Power_Mod& Power_Mod::operator=(const Power_Mod& other) -: 166: { #####: 167: if(this != &other) branch 0 never executed branch 1 never executed -: 168: { #####: 169: if(other.m_core) branch 0 never executed branch 1 never executed #####: 170: m_core.reset(other.m_core->copy()); call 0 never executed branch 1 never executed branch 2 never executed -: 171: else #####: 172: m_core.reset(); branch 0 never executed branch 1 never executed -: 173: } #####: 174: return (*this); -: 175: } -: 176: -: 177:/* -: 178:* Set the modulus -: 179:*/ function _ZNK5Botan9Power_Mod11set_modulusERKNS_6BigIntENS0_11Usage_HintsEb called 123 returned 100% blocks executed 62% 123: 180:void Power_Mod::set_modulus(const BigInt& n, Usage_Hints hints, bool disable_monty) const -: 181: { -: 182: // Allow set_modulus(0) to mean "drop old state" -: 183: 123: 184: m_core.reset(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 185: 123: 186: if(n != 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 187: { 246: 188: if(n.is_odd() && disable_monty == false) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 90% (fallthrough) branch 3 taken 10% branch 4 taken 67% (fallthrough) branch 5 taken 33% 74: 189: m_core.reset(new Montgomery_Exponentiator(n, hints)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 190: else 49: 191: m_core.reset(new Fixed_Window_Exponentiator(n, hints)); 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 -: 192: } 123: 193: } -: 194: -: 195:/* -: 196:* Set the base -: 197:*/ function _ZNK5Botan9Power_Mod8set_baseERKNS_6BigIntE called 123 returned 100% blocks executed 16% 123: 198:void Power_Mod::set_base(const BigInt& b) const -: 199: { 123: 200: if(b.is_negative()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 201: throw Invalid_Argument("Power_Mod::set_base: arg must be non-negative"); 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 -: 202: 123: 203: if(!m_core) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 204: throw Internal_Error("Power_Mod::set_base: m_core was NULL"); 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 123: 205: m_core->set_base(b); call 0 returned 100% 123: 206: } -: 207: -: 208:/* -: 209:* Set the exponent -: 210:*/ function _ZNK5Botan9Power_Mod12set_exponentERKNS_6BigIntE called 123 returned 100% blocks executed 16% 123: 211:void Power_Mod::set_exponent(const BigInt& e) const -: 212: { 123: 213: if(e.is_negative()) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 214: throw Invalid_Argument("Power_Mod::set_exponent: arg must be > 0"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 215: 123: 216: if(!m_core) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 217: throw Internal_Error("Power_Mod::set_exponent: m_core was NULL"); 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 123: 218: m_core->set_exponent(e); call 0 returned 100% 123: 219: } -: 220: -: 221:/* -: 222:* Compute the result -: 223:*/ function _ZNK5Botan9Power_Mod7executeEv called 166 returned 100% blocks executed 24% 166: 224:BigInt Power_Mod::execute() const -: 225: { 166: 226: if(!m_core) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 227: throw Internal_Error("Power_Mod::execute: m_core was NULL"); 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 166: 228: return m_core->execute(); call 0 returned 100% -: 229: } -: 230: -: 231:/* -: 232:* Try to choose a good window size -: 233:*/ function _ZN5Botan9Power_Mod11window_bitsEmmNS0_11Usage_HintsE called 123 returned 100% blocks executed 82% 123: 234:size_t Power_Mod::window_bits(size_t exp_bits, size_t, -: 235: Power_Mod::Usage_Hints hints) -: 236: { 123: 237: static const size_t wsize[][2] = { -: 238: { 1434, 7 }, -: 239: { 539, 6 }, -: 240: { 197, 4 }, -: 241: { 70, 3 }, -: 242: { 17, 2 }, -: 243: { 0, 0 } -: 244: }; -: 245: 123: 246: size_t window_bits = 1; -: 247: 123: 248: if(exp_bits) branch 0 taken 64% (fallthrough) branch 1 taken 36% -: 249: { 329: 250: for(size_t j = 0; wsize[j][0]; ++j) branch 0 taken 96% (fallthrough) branch 1 taken 4% -: 251: { 317: 252: if(exp_bits >= wsize[j][0]) branch 0 taken 21% (fallthrough) branch 1 taken 79% -: 253: { 67: 254: window_bits += wsize[j][1]; 67: 255: break; -: 256: } -: 257: } -: 258: } -: 259: 123: 260: if(hints & Power_Mod::BASE_IS_FIXED) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 261: window_bits += 2; 123: 262: if(hints & Power_Mod::EXP_IS_LARGE) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 263: ++window_bits; -: 264: 123: 265: return window_bits; -: 266: } -: 267: -: 268:namespace { -: 269: -: 270:/* -: 271:* Choose potentially useful hints -: 272:*/ function _ZN5Botan12_GLOBAL__N_117choose_base_hintsERKNS_6BigIntES3_ called 0 returned 0% blocks executed 0% #####: 273:Power_Mod::Usage_Hints choose_base_hints(const BigInt& b, const BigInt& n) -: 274: { #####: 275: if(b == 2) call 0 never executed branch 1 never executed branch 2 never executed -: 276: return Power_Mod::Usage_Hints(Power_Mod::BASE_IS_2 | -: 277: Power_Mod::BASE_IS_SMALL); -: 278: #####: 279: const size_t b_bits = b.bits(); call 0 never executed #####: 280: const size_t n_bits = n.bits(); call 0 never executed -: 281: #####: 282: if(b_bits < n_bits / 32) branch 0 never executed branch 1 never executed -: 283: return Power_Mod::BASE_IS_SMALL; #####: 284: if(b_bits > n_bits / 4) branch 0 never executed branch 1 never executed #####: 285: return Power_Mod::BASE_IS_LARGE; -: 286: -: 287: return Power_Mod::NO_HINTS; -: 288: } -: 289: -: 290:/* -: 291:* Choose potentially useful hints -: 292:*/ function _ZN5Botan12_GLOBAL__N_116choose_exp_hintsERKNS_6BigIntES3_ called 0 returned 0% blocks executed 0% #####: 293:Power_Mod::Usage_Hints choose_exp_hints(const BigInt& e, const BigInt& n) -: 294: { #####: 295: const size_t e_bits = e.bits(); call 0 never executed #####: 296: const size_t n_bits = n.bits(); call 0 never executed -: 297: #####: 298: if(e_bits < n_bits / 32) branch 0 never executed branch 1 never executed -: 299: return Power_Mod::BASE_IS_SMALL; #####: 300: if(e_bits > n_bits / 4) branch 0 never executed branch 1 never executed #####: 301: return Power_Mod::BASE_IS_LARGE; -: 302: return Power_Mod::NO_HINTS; -: 303: } -: 304: -: 305:} -: 306: -: 307:/* -: 308:* Fixed_Exponent_Power_Mod Constructor -: 309:*/ function _ZN5Botan24Fixed_Exponent_Power_ModC2ERKNS_6BigIntES3_NS_9Power_Mod11Usage_HintsE called 0 returned 0% blocks executed 0% #####: 310:Fixed_Exponent_Power_Mod::Fixed_Exponent_Power_Mod(const BigInt& e, -: 311: const BigInt& n, #####: 312: Usage_Hints hints) : #####: 313: Power_Mod(n, Usage_Hints(hints | EXP_IS_FIXED | choose_exp_hints(e, n))) call 0 never executed call 1 never executed call 2 never executed -: 314: { #####: 315: set_exponent(e); call 0 never executed branch 1 never executed branch 2 never executed #####: 316: } -: 317: -: 318:/* -: 319:* Fixed_Base_Power_Mod Constructor -: 320:*/ function _ZN5Botan20Fixed_Base_Power_ModC2ERKNS_6BigIntES3_NS_9Power_Mod11Usage_HintsE called 0 returned 0% blocks executed 0% #####: 321:Fixed_Base_Power_Mod::Fixed_Base_Power_Mod(const BigInt& b, const BigInt& n, #####: 322: Usage_Hints hints) : #####: 323: Power_Mod(n, Usage_Hints(hints | BASE_IS_FIXED | choose_base_hints(b, n))) call 0 never executed call 1 never executed call 2 never executed -: 324: { #####: 325: set_base(b); call 0 never executed branch 1 never executed branch 2 never executed #####: 326: } -: 327: -: 328:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#utils#locking_allocator#locking_allocator.cpp.gcov -: 0:Source:src/lib/utils/locking_allocator/locking_allocator.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/utils_locking_allocator.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/utils_locking_allocator.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Mlock Allocator -: 3:* (C) 2012,2014,2015 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11: -: 12:namespace Botan { -: 13: function _ZN5Botan15mlock_allocator8allocateEmm called 111634476 returned 100% blocks executed 100% 111634476: 14:void* mlock_allocator::allocate(size_t num_elems, size_t elem_size) -: 15: { 111634476: 16: if(!m_pool) branch 0 taken 19% (fallthrough) branch 1 taken 81% -: 17: return nullptr; -: 18: 21252898: 19: const size_t n = num_elems * elem_size; 21252898: 20: if(n / elem_size != num_elems) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 21: return nullptr; // overflow! -: 22: 21252898: 23: return m_pool->allocate(n); call 0 returned 100% -: 24: } -: 25: function _ZN5Botan15mlock_allocator10deallocateEPvmm called 111634026 returned 100% blocks executed 100% 111634026: 26:bool mlock_allocator::deallocate(void* p, size_t num_elems, size_t elem_size) noexcept -: 27: { 111634026: 28: if(!m_pool) branch 0 taken 19% (fallthrough) branch 1 taken 81% -: 29: return false; -: 30: 21252446: 31: size_t n = num_elems * elem_size; -: 32: -: 33: /* -: 34: We return nullptr in allocate if there was an overflow, so if an -: 35: overflow occurs here we know the pointer was not allocated by this pool. -: 36: */ 21252446: 37: if(n / elem_size != num_elems) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 38: return false; -: 39: 21252446: 40: return m_pool->deallocate(p, n); call 0 returned 100% -: 41: } -: 42: function _ZN5Botan15mlock_allocatorC2Ev called 2928 returned 100% blocks executed 48% 2928: 43:mlock_allocator::mlock_allocator() 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 -: 44: { 2928: 45: const size_t mem_to_lock = OS::get_memory_locking_limit(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2928: 46: const size_t page_size = OS::system_page_size(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 47: 2928: 48: if(mem_to_lock > 0 && mem_to_lock % page_size == 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 49: { 2917: 50: m_locked_pages = OS::allocate_locked_pages(mem_to_lock / page_size); 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% -: 51: 2917: 52: if(m_locked_pages.size() > 0) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 53: { 2917: 54: m_pool.reset(new Memory_Pool(m_locked_pages, page_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 never executed -: 55: } -: 56: } 2928: 57: } -: 58: function _ZN5Botan15mlock_allocatorD2Ev called 2928 returned 100% blocks executed 100% 5845: 59:mlock_allocator::~mlock_allocator() branch 0 taken 100% (fallthrough) branch 1 taken 1% call 2 returned 100% -: 60: { 2928: 61: if(m_pool) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 62: { 2917: 63: m_pool.reset(); call 0 returned 100% -: 64: // OS::free_locked_pages scrubs the memory before free 2917: 65: OS::free_locked_pages(m_locked_pages); call 0 returned 100% -: 66: } 2928: 67: } -: 68: function _ZN5Botan15mlock_allocator8instanceEv called 223268765 returned 100% blocks executed 89% 223268765: 69:mlock_allocator& mlock_allocator::instance() -: 70: { 223268765: 71: static mlock_allocator mlock; branch 0 taken 1% (fallthrough) branch 1 taken 100% call 2 returned 100% 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% call 9 returned 100% call 10 never executed 223268765: 72: return mlock; -: 73: } -: 74: -: 75:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#date_time#int_adapter.hpp.gcov -: 0:Source:/usr/include/boost/date_time/int_adapter.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:#ifndef _DATE_TIME_INT_ADAPTER_HPP__ -: 2:#define _DATE_TIME_INT_ADAPTER_HPP__ -: 3: -: 4:/* Copyright (c) 2002,2003 CrystalClear Software, Inc. -: 5: * Use, modification and distribution is subject to the -: 6: * Boost Software License, Version 1.0. (See accompanying -: 7: * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -: 8: * Author: Jeff Garland, Bart Garst -: 9: * $Date$ -: 10: */ -: 11: -: 12: -: 13:#include "boost/config.hpp" -: 14:#include "boost/limits.hpp" //work around compilers without limits -: 15:#include "boost/date_time/special_defs.hpp" -: 16:#include "boost/date_time/locale_config.hpp" -: 17:#ifndef BOOST_DATE_TIME_NO_LOCALE -: 18:# include -: 19:#endif -: 20: -: 21:#if defined(BOOST_MSVC) -: 22:#pragma warning(push) -: 23:// conditional expression is constant -: 24:#pragma warning(disable: 4127) -: 25:#endif -: 26: -: 27:namespace boost { -: 28:namespace date_time { -: 29: -: 30: -: 31://! Adapter to create integer types with +-infinity, and not a value -: 32:/*! This class is used internally in counted date/time representations. -: 33: * It adds the floating point like features of infinities and -: 34: * not a number. It also provides mathmatical operations with -: 35: * consideration to special values following these rules: -: 36: *@code -: 37: * +infinity - infinity == Not A Number (NAN) -: 38: * infinity * non-zero == infinity -: 39: * infinity * zero == NAN -: 40: * +infinity * -integer == -infinity -: 41: * infinity / infinity == NAN -: 42: * infinity * infinity == infinity -: 43: *@endcode -: 44: */ -: 45:template -: 46:class int_adapter { -: 47:public: -: 48: typedef int_type_ int_type; #####: 49: int_adapter(int_type v) : call 0 never executed #####: 50: value_(v) branch 0 never executed branch 1 never executed call 2 never executed -: 51: {} -: 52: static bool has_infinity() -: 53: { -: 54: return true; -: 55: } #####: 56: static const int_adapter pos_infinity() -: 57: { #####: 58: return (::std::numeric_limits::max)(); -: 59: } #####: 60: static const int_adapter neg_infinity() -: 61: { #####: 62: return (::std::numeric_limits::min)(); -: 63: } #####: 64: static const int_adapter not_a_number() -: 65: { #####: 66: return (::std::numeric_limits::max)()-1; -: 67: } #####: 68: static int_adapter max BOOST_PREVENT_MACRO_SUBSTITUTION () -: 69: { #####: 70: return (::std::numeric_limits::max)()-2; -: 71: } #####: 72: static int_adapter min BOOST_PREVENT_MACRO_SUBSTITUTION () -: 73: { #####: 74: return (::std::numeric_limits::min)()+1; -: 75: } function _ZN5boost9date_time11int_adapterIlE12from_specialENS0_14special_valuesE called 0 returned 0% blocks executed 0% #####: 76: static int_adapter from_special(special_values sv) -: 77: { #####: 78: switch (sv) { branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed -: 79: case not_a_date_time: return not_a_number(); -: 80: case neg_infin: return neg_infinity(); -: 81: case pos_infin: return pos_infinity(); -: 82: case max_date_time: return (max)(); -: 83: case min_date_time: return (min)(); -: 84: default: return not_a_number(); -: 85: } -: 86: } #####: 87: static bool is_inf(int_type v) -: 88: { #####: 89: return (v == neg_infinity().as_number() || -: 90: v == pos_infinity().as_number()); -: 91: } #####: 92: static bool is_neg_inf(int_type v) -: 93: { -: 94: return (v == neg_infinity().as_number()); -: 95: } #####: 96: static bool is_pos_inf(int_type v) -: 97: { -: 98: return (v == pos_infinity().as_number()); -: 99: } #####: 100: static bool is_not_a_number(int_type v) -: 101: { -: 102: return (v == not_a_number().as_number()); -: 103: } -: 104: //! Returns either special value type or is_not_special #####: 105: static special_values to_special(int_type v) -: 106: { #####: 107: if (is_not_a_number(v)) return not_a_date_time; #####: 108: if (is_neg_inf(v)) return neg_infin; #####: 109: if (is_pos_inf(v)) return pos_infin; -: 110: return not_special; -: 111: } -: 112: -: 113: //-3 leaves room for representations of infinity and not a date -: 114: static int_type maxcount() -: 115: { -: 116: return (::std::numeric_limits::max)()-3; -: 117: } #####: 118: bool is_infinity() const -: 119: { #####: 120: return (value_ == neg_infinity().as_number() || -: 121: value_ == pos_infinity().as_number()); -: 122: } -: 123: bool is_pos_infinity()const -: 124: { -: 125: return(value_ == pos_infinity().as_number()); -: 126: } -: 127: bool is_neg_infinity()const -: 128: { -: 129: return(value_ == neg_infinity().as_number()); -: 130: } #####: 131: bool is_nan() const -: 132: { -: 133: return (value_ == not_a_number().as_number()); -: 134: } #####: 135: bool is_special() const -: 136: { #####: 137: return(is_infinity() || is_nan()); -: 138: } -: 139: bool operator==(const int_adapter& rhs) const -: 140: { -: 141: return (compare(rhs) == 0); -: 142: } -: 143: bool operator==(const int& rhs) const -: 144: { -: 145: if(!std::numeric_limits::is_signed) -: 146: { -: 147: if(is_neg_inf(value_) && rhs == 0) -: 148: { -: 149: return false; -: 150: } -: 151: } -: 152: return (compare(rhs) == 0); -: 153: } -: 154: bool operator!=(const int_adapter& rhs) const -: 155: { -: 156: return (compare(rhs) != 0); -: 157: } -: 158: bool operator!=(const int& rhs) const -: 159: { -: 160: if(!std::numeric_limits::is_signed) -: 161: { -: 162: if(is_neg_inf(value_) && rhs == 0) -: 163: { -: 164: return true; -: 165: } -: 166: } -: 167: return (compare(rhs) != 0); -: 168: } -: 169: bool operator<(const int_adapter& rhs) const -: 170: { -: 171: return (compare(rhs) == -1); -: 172: } -: 173: bool operator<(const int& rhs) const -: 174: { -: 175: // quiets compiler warnings -: 176: if(!std::numeric_limits::is_signed) -: 177: { -: 178: if(is_neg_inf(value_) && rhs == 0) -: 179: { -: 180: return true; -: 181: } -: 182: } -: 183: return (compare(rhs) == -1); -: 184: } -: 185: bool operator>(const int_adapter& rhs) const -: 186: { -: 187: return (compare(rhs) == 1); -: 188: } #####: 189: int_type as_number() const branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed branch 32 never executed branch 33 never executed branch 34 never executed branch 35 never executed branch 36 never executed branch 37 never executed branch 38 never executed branch 39 never executed branch 40 never executed branch 41 never executed branch 42 never executed branch 43 never executed branch 44 never executed branch 45 never executed branch 46 never executed branch 47 never executed branch 48 never executed branch 49 never executed branch 50 never executed branch 51 never executed branch 52 never executed branch 53 never executed branch 54 never executed branch 55 never executed branch 56 never executed branch 57 never executed branch 58 never executed branch 59 never executed branch 60 never executed branch 61 never executed branch 62 never executed branch 63 never executed branch 64 never executed branch 65 never executed -: 190: { -: 191: return value_; -: 192: } -: 193: //! Returns either special value type or is_not_special -: 194: special_values as_special() const -: 195: { -: 196: return int_adapter::to_special(value_); -: 197: } -: 198: //creates nasty ambiguities -: 199:// operator int_type() const -: 200:// { -: 201:// return value_; -: 202:// } -: 203: -: 204: /*! Operator allows for adding dissimilar int_adapter types. -: 205: * The return type will match that of the the calling object's type */ -: 206: template -: 207: inline function _ZNK5boost9date_time11int_adapterIlEplIjEES2_RKNS1_IT_EE called 0 returned 0% blocks executed 0% #####: 208: int_adapter operator+(const int_adapter& rhs) const branch 0 never executed branch 1 never executed -: 209: { #####: 210: if(is_special() || rhs.is_special()) branch 0 never executed branch 1 never executed -: 211: { #####: 212: if (is_nan() || rhs.is_nan()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 213: { -: 214: return int_adapter::not_a_number(); -: 215: } #####: 216: if((is_pos_inf(value_) && rhs.is_neg_inf(rhs.as_number())) || branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 217: (is_neg_inf(value_) && rhs.is_pos_inf(rhs.as_number())) ) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 218: { -: 219: return int_adapter::not_a_number(); -: 220: } #####: 221: if (is_infinity()) branch 0 never executed branch 1 never executed -: 222: { #####: 223: return *this; -: 224: } #####: 225: if (rhs.is_pos_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 226: { -: 227: return int_adapter::pos_infinity(); -: 228: } #####: 229: if (rhs.is_neg_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 230: { -: 231: return int_adapter::neg_infinity(); -: 232: } -: 233: } #####: 234: return int_adapter(value_ + static_cast(rhs.as_number())); -: 235: } -: 236: -: 237: int_adapter operator+(const int_type rhs) const -: 238: { -: 239: if(is_special()) -: 240: { -: 241: if (is_nan()) -: 242: { -: 243: return int_adapter(not_a_number()); -: 244: } -: 245: if (is_infinity()) -: 246: { -: 247: return *this; -: 248: } -: 249: } -: 250: return int_adapter(value_ + rhs); -: 251: } -: 252: -: 253: /*! Operator allows for subtracting dissimilar int_adapter types. -: 254: * The return type will match that of the the calling object's type */ -: 255: template -: 256: inline function _ZNK5boost9date_time11int_adapterIlEmiIlEES2_RKNS1_IT_EE called 0 returned 0% blocks executed 0% #####: 257: int_adapter operator-(const int_adapter& rhs)const branch 0 never executed branch 1 never executed -: 258: { #####: 259: if(is_special() || rhs.is_special()) branch 0 never executed branch 1 never executed -: 260: { #####: 261: if (is_nan() || rhs.is_nan()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 262: { -: 263: return int_adapter::not_a_number(); -: 264: } #####: 265: if((is_pos_inf(value_) && rhs.is_pos_inf(rhs.as_number())) || branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 266: (is_neg_inf(value_) && rhs.is_neg_inf(rhs.as_number())) ) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 267: { -: 268: return int_adapter::not_a_number(); -: 269: } #####: 270: if (is_infinity()) branch 0 never executed branch 1 never executed -: 271: { #####: 272: return *this; -: 273: } #####: 274: if (rhs.is_pos_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 275: { -: 276: return int_adapter::neg_infinity(); -: 277: } #####: 278: if (rhs.is_neg_inf(rhs.as_number())) branch 0 never executed branch 1 never executed -: 279: { -: 280: return int_adapter::pos_infinity(); -: 281: } -: 282: } #####: 283: return int_adapter(value_ - static_cast(rhs.as_number())); -: 284: } -: 285: int_adapter operator-(const int_type rhs) const -: 286: { -: 287: if(is_special()) -: 288: { -: 289: if (is_nan()) -: 290: { -: 291: return int_adapter(not_a_number()); -: 292: } -: 293: if (is_infinity()) -: 294: { -: 295: return *this; -: 296: } -: 297: } -: 298: return int_adapter(value_ - rhs); -: 299: } -: 300: -: 301: // should templatize this to be consistant with op +- -: 302: int_adapter operator*(const int_adapter& rhs)const -: 303: { -: 304: if(this->is_special() || rhs.is_special()) -: 305: { -: 306: return mult_div_specials(rhs); -: 307: } -: 308: return int_adapter(value_ * rhs.value_); -: 309: } -: 310: /*! Provided for cases when automatic conversion from -: 311: * 'int' to 'int_adapter' causes incorrect results. */ -: 312: int_adapter operator*(const int rhs) const -: 313: { -: 314: if(is_special()) -: 315: { -: 316: return mult_div_specials(rhs); -: 317: } -: 318: return int_adapter(value_ * rhs); -: 319: } -: 320: -: 321: // should templatize this to be consistant with op +- -: 322: int_adapter operator/(const int_adapter& rhs)const -: 323: { -: 324: if(this->is_special() || rhs.is_special()) -: 325: { -: 326: if(is_infinity() && rhs.is_infinity()) -: 327: { -: 328: return int_adapter(not_a_number()); -: 329: } -: 330: if(rhs != 0) -: 331: { -: 332: return mult_div_specials(rhs); -: 333: } -: 334: else { // let divide by zero blow itself up -: 335: return int_adapter(value_ / rhs.value_); -: 336: } -: 337: } -: 338: return int_adapter(value_ / rhs.value_); -: 339: } -: 340: /*! Provided for cases when automatic conversion from -: 341: * 'int' to 'int_adapter' causes incorrect results. */ -: 342: int_adapter operator/(const int rhs) const -: 343: { -: 344: if(is_special() && rhs != 0) -: 345: { -: 346: return mult_div_specials(rhs); -: 347: } -: 348: return int_adapter(value_ / rhs); -: 349: } -: 350: -: 351: // should templatize this to be consistant with op +- -: 352: int_adapter operator%(const int_adapter& rhs)const -: 353: { -: 354: if(this->is_special() || rhs.is_special()) -: 355: { -: 356: if(is_infinity() && rhs.is_infinity()) -: 357: { -: 358: return int_adapter(not_a_number()); -: 359: } -: 360: if(rhs != 0) -: 361: { -: 362: return mult_div_specials(rhs); -: 363: } -: 364: else { // let divide by zero blow itself up -: 365: return int_adapter(value_ % rhs.value_); -: 366: } -: 367: } -: 368: return int_adapter(value_ % rhs.value_); -: 369: } -: 370: /*! Provided for cases when automatic conversion from -: 371: * 'int' to 'int_adapter' causes incorrect results. */ -: 372: int_adapter operator%(const int rhs) const -: 373: { -: 374: if(is_special() && rhs != 0) -: 375: { -: 376: return mult_div_specials(rhs); -: 377: } -: 378: return int_adapter(value_ % rhs); -: 379: } -: 380:private: -: 381: int_type value_; -: 382: -: 383: //! returns -1, 0, 1, or 2 if 'this' is <, ==, >, or 'nan comparison' rhs -: 384: int compare(const int_adapter& rhs)const -: 385: { -: 386: if(this->is_special() || rhs.is_special()) -: 387: { -: 388: if(this->is_nan() || rhs.is_nan()) { -: 389: if(this->is_nan() && rhs.is_nan()) { -: 390: return 0; // equal -: 391: } -: 392: else { -: 393: return 2; // nan -: 394: } -: 395: } -: 396: if((is_neg_inf(value_) && !is_neg_inf(rhs.value_)) || -: 397: (is_pos_inf(rhs.value_) && !is_pos_inf(value_)) ) -: 398: { -: 399: return -1; // less than -: 400: } -: 401: if((is_pos_inf(value_) && !is_pos_inf(rhs.value_)) || -: 402: (is_neg_inf(rhs.value_) && !is_neg_inf(value_)) ) { -: 403: return 1; // greater than -: 404: } -: 405: } -: 406: if(value_ < rhs.value_) return -1; -: 407: if(value_ > rhs.value_) return 1; -: 408: // implied-> if(value_ == rhs.value_) -: 409: return 0; -: 410: } -: 411: /* When multiplying and dividing with at least 1 special value -: 412: * very simmilar rules apply. In those cases where the rules -: 413: * are different, they are handled in the respective operator -: 414: * function. */ -: 415: //! Assumes at least 'this' or 'rhs' is a special value -: 416: int_adapter mult_div_specials(const int_adapter& rhs)const -: 417: { -: 418: if(this->is_nan() || rhs.is_nan()) { -: 419: return int_adapter(not_a_number()); -: 420: } -: 421: BOOST_CONSTEXPR_OR_CONST int min_value = std::numeric_limits::is_signed ? 0 : 1; -: 422: if((*this > 0 && rhs > 0) || (*this < min_value && rhs < min_value)) { -: 423: return int_adapter(pos_infinity()); -: 424: } -: 425: if((*this > 0 && rhs < min_value) || (*this < min_value && rhs > 0)) { -: 426: return int_adapter(neg_infinity()); -: 427: } -: 428: //implied -> if(this->value_ == 0 || rhs.value_ == 0) -: 429: return int_adapter(not_a_number()); -: 430: } -: 431: /* Overloaded function necessary because of special -: 432: * situation where int_adapter is instantiated with -: 433: * 'unsigned' and func is called with negative int. -: 434: * It would produce incorrect results since 'unsigned' -: 435: * wraps around when initialized with a negative value */ -: 436: //! Assumes 'this' is a special value -: 437: int_adapter mult_div_specials(const int& rhs) const -: 438: { -: 439: if(this->is_nan()) { -: 440: return int_adapter(not_a_number()); -: 441: } -: 442: BOOST_CONSTEXPR_OR_CONST int min_value = std::numeric_limits::is_signed ? 0 : 1; -: 443: if((*this > 0 && rhs > 0) || (*this < min_value && rhs < 0)) { -: 444: return int_adapter(pos_infinity()); -: 445: } -: 446: if((*this > 0 && rhs < 0) || (*this < min_value && rhs > 0)) { -: 447: return int_adapter(neg_infinity()); -: 448: } -: 449: //implied -> if(this->value_ == 0 || rhs.value_ == 0) -: 450: return int_adapter(not_a_number()); -: 451: } -: 452: -: 453:}; -: 454: -: 455:#ifndef BOOST_DATE_TIME_NO_LOCALE -: 456: /*! Expected output is either a numeric representation -: 457: * or a special values representation.
-: 458: * Ex. "12", "+infinity", "not-a-number", etc. */ -: 459: //template, typename int_type> -: 460: template -: 461: inline -: 462: std::basic_ostream& -: 463: operator<<(std::basic_ostream& os, const int_adapter& ia) -: 464: { -: 465: if(ia.is_special()) { -: 466: // switch copied from date_names_put.hpp -: 467: switch(ia.as_special()) -: 468: { -: 469: case not_a_date_time: -: 470: os << "not-a-number"; -: 471: break; -: 472: case pos_infin: -: 473: os << "+infinity"; -: 474: break; -: 475: case neg_infin: -: 476: os << "-infinity"; -: 477: break; -: 478: default: -: 479: os << ""; -: 480: } -: 481: } -: 482: else { -: 483: os << ia.as_number(); -: 484: } -: 485: return os; -: 486: } -: 487:#endif -: 488: -: 489: -: 490:} } //namespace date_time -: 491: -: 492:#if defined(BOOST_MSVC) -: 493:#pragma warning(pop) -: 494:#endif -: 495: -: 496:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#smart_ptr#make_shared_object.hpp.gcov -: 0:Source:/usr/include/boost/smart_ptr/make_shared_object.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/unit_asio_stream.gcda -: 0:Runs:1 -: 1:#ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED -: 2:#define BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED -: 3: -: 4:// make_shared_object.hpp -: 5:// -: 6:// Copyright (c) 2007, 2008, 2012 Peter Dimov -: 7:// -: 8:// Distributed under the Boost Software License, Version 1.0. -: 9:// See accompanying file LICENSE_1_0.txt or copy at -: 10:// http://www.boost.org/LICENSE_1_0.txt -: 11:// -: 12:// See http://www.boost.org/libs/smart_ptr/ for documentation. -: 13: -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22:#include -: 23:#include -: 24: -: 25:namespace boost -: 26:{ -: 27: -: 28:namespace detail -: 29:{ -: 30: -: 31:template< std::size_t N, std::size_t A > struct sp_aligned_storage -: 32:{ -: 33: union type -: 34: { -: 35: char data_[ N ]; -: 36: typename boost::type_with_alignment< A >::type align_; -: 37: }; -: 38:}; -: 39: -: 40:template< class T > class sp_ms_deleter -: 41:{ -: 42:private: -: 43: -: 44: typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type; -: 45: -: 46: bool initialized_; -: 47: storage_type storage_; -: 48: -: 49:private: -: 50: 68: 51: void destroy() BOOST_SP_NOEXCEPT -: 52: { 68: 53: if( initialized_ ) -: 54: { -: 55:#if defined( __GNUC__ ) -: 56: -: 57: // fixes incorrect aliasing warning 25: 58: T * p = reinterpret_cast< T* >( storage_.data_ ); branch 0 taken 100% (fallthrough) branch 1 taken 0% 43: 59: p->~T(); call 0 returned 100% -: 60: -: 61:#else -: 62: -: 63: reinterpret_cast< T* >( storage_.data_ )->~T(); -: 64: -: 65:#endif -: 66: 68: 67: initialized_ = false; -: 68: } -: 69: } -: 70: -: 71:public: -: 72: 68: 73: sp_ms_deleter() BOOST_SP_NOEXCEPT : initialized_( false ) -: 74: { -: 75: } -: 76: -: 77: template explicit sp_ms_deleter( A const & ) BOOST_SP_NOEXCEPT : initialized_( false ) -: 78: { -: 79: } -: 80: -: 81: // optimization: do not copy storage_ -: 82: sp_ms_deleter( sp_ms_deleter const & ) BOOST_SP_NOEXCEPT : initialized_( false ) -: 83: { -: 84: } -: 85: -: 86: ~sp_ms_deleter() BOOST_SP_NOEXCEPT -: 87: { -: 88: destroy(); -: 89: } -: 90: 68: 91: void operator()( T * ) BOOST_SP_NOEXCEPT branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 92: { 68: 93: destroy(); -: 94: } -: 95: =====: 96: static void operator_fn( T* ) BOOST_SP_NOEXCEPT // operator() can't be static call 0 never executed call 1 never executed -: 97: { -: 98: } -: 99: 68: 100: void * address() BOOST_SP_NOEXCEPT -: 101: { 68: 102: return storage_.data_; -: 103: } -: 104: 68: 105: void set_initialized() BOOST_SP_NOEXCEPT -: 106: { 68: 107: initialized_ = true; -: 108: } -: 109:}; -: 110: -: 111:template< class T, class A > class sp_as_deleter -: 112:{ -: 113:private: -: 114: -: 115: typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type; -: 116: -: 117: storage_type storage_; -: 118: A a_; -: 119: bool initialized_; -: 120: -: 121:private: -: 122: -: 123: void destroy() BOOST_SP_NOEXCEPT -: 124: { -: 125: if( initialized_ ) -: 126: { -: 127: T * p = reinterpret_cast< T* >( storage_.data_ ); -: 128: -: 129:#if !defined( BOOST_NO_CXX11_ALLOCATOR ) -: 130: -: 131: std::allocator_traits::destroy( a_, p ); -: 132: -: 133:#else -: 134: -: 135: p->~T(); -: 136: -: 137:#endif -: 138: -: 139: initialized_ = false; -: 140: } -: 141: } -: 142: -: 143:public: -: 144: -: 145: sp_as_deleter( A const & a ) BOOST_SP_NOEXCEPT : a_( a ), initialized_( false ) -: 146: { -: 147: } -: 148: -: 149: // optimization: do not copy storage_ -: 150: sp_as_deleter( sp_as_deleter const & r ) BOOST_SP_NOEXCEPT : a_( r.a_), initialized_( false ) -: 151: { -: 152: } -: 153: -: 154: ~sp_as_deleter() BOOST_SP_NOEXCEPT -: 155: { -: 156: destroy(); -: 157: } -: 158: -: 159: void operator()( T * ) BOOST_SP_NOEXCEPT -: 160: { -: 161: destroy(); -: 162: } -: 163: -: 164: static void operator_fn( T* ) BOOST_SP_NOEXCEPT // operator() can't be static -: 165: { -: 166: } -: 167: -: 168: void * address() BOOST_SP_NOEXCEPT -: 169: { -: 170: return storage_.data_; -: 171: } -: 172: -: 173: void set_initialized() BOOST_SP_NOEXCEPT -: 174: { -: 175: initialized_ = true; -: 176: } -: 177:}; -: 178: -: 179:template< class T > struct sp_if_not_array -: 180:{ -: 181: typedef boost::shared_ptr< T > type; -: 182:}; -: 183: -: 184:#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) -: 185: -: 186:template< class T > struct sp_if_not_array< T[] > -: 187:{ -: 188:}; -: 189: -: 190:#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) -: 191: -: 192:template< class T, std::size_t N > struct sp_if_not_array< T[N] > -: 193:{ -: 194:}; -: 195: -: 196:#endif -: 197: -: 198:#endif -: 199: -: 200:} // namespace detail -: 201: -: 202:#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) -: 203:# define BOOST_SP_MSD( T ) boost::detail::sp_inplace_tag< boost::detail::sp_ms_deleter< T > >() -: 204:#else -: 205:# define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >() -: 206:#endif -: 207: -: 208:// _noinit versions -: 209: -: 210:template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() -: 211:{ -: 212: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 213: -: 214: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 215: -: 216: void * pv = pd->address(); -: 217: -: 218: ::new( pv ) T; -: 219: pd->set_initialized(); -: 220: -: 221: T * pt2 = static_cast< T* >( pv ); -: 222: -: 223: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 224: return boost::shared_ptr< T >( pt, pt2 ); -: 225:} -: 226: -: 227:template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) -: 228:{ -: 229: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 230: -: 231: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 232: -: 233: void * pv = pd->address(); -: 234: -: 235: ::new( pv ) T; -: 236: pd->set_initialized(); -: 237: -: 238: T * pt2 = static_cast< T* >( pv ); -: 239: -: 240: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 241: return boost::shared_ptr< T >( pt, pt2 ); -: 242:} -: 243: -: 244:#if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -: 245: -: 246:// Variadic templates, rvalue reference -: 247: 68: 248:template< class T, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Args && ... args ) -: 249:{ 68: 250: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 251: 68: 252: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 253: 68: 254: void * pv = pd->address(); -: 255: 111: 256: ::new( pv ) T( boost::detail::sp_forward( args )... ); 68: 257: pd->set_initialized(); -: 258: 68: 259: T * pt2 = static_cast< T* >( pv ); -: 260: 68: 261: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); 68: 262: return boost::shared_ptr< T >( pt, pt2 ); -: 263:} -: 264: -: 265:template< class T, class A, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Args && ... args ) -: 266:{ -: 267:#if !defined( BOOST_NO_CXX11_ALLOCATOR ) -: 268: -: 269: typedef typename std::allocator_traits::template rebind_alloc A2; -: 270: A2 a2( a ); -: 271: -: 272: typedef boost::detail::sp_as_deleter< T, A2 > D; -: 273: -: 274: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag(), a2 ); -: 275: -: 276:#else -: 277: -: 278: typedef boost::detail::sp_ms_deleter< T > D; -: 279: -: 280: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag(), a ); -: 281: -: 282:#endif -: 283: -: 284: D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() ); -: 285: void * pv = pd->address(); -: 286: -: 287:#if !defined( BOOST_NO_CXX11_ALLOCATOR ) -: 288: -: 289: std::allocator_traits::construct( a2, static_cast< T* >( pv ), boost::detail::sp_forward( args )... ); -: 290: -: 291:#else -: 292: -: 293: ::new( pv ) T( boost::detail::sp_forward( args )... ); -: 294: -: 295:#endif -: 296: -: 297: pd->set_initialized(); -: 298: -: 299: T * pt2 = static_cast< T* >( pv ); -: 300: -: 301: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 302: return boost::shared_ptr< T >( pt, pt2 ); -: 303:} -: 304: -: 305:#else // !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -: 306: -: 307:// Common zero-argument versions -: 308: -: 309:template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() -: 310:{ -: 311: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 312: -: 313: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 314: -: 315: void * pv = pd->address(); -: 316: -: 317: ::new( pv ) T(); -: 318: pd->set_initialized(); -: 319: -: 320: T * pt2 = static_cast< T* >( pv ); -: 321: -: 322: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 323: return boost::shared_ptr< T >( pt, pt2 ); -: 324:} -: 325: -: 326:template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) -: 327:{ -: 328: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 329: -: 330: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 331: -: 332: void * pv = pd->address(); -: 333: -: 334: ::new( pv ) T(); -: 335: pd->set_initialized(); -: 336: -: 337: T * pt2 = static_cast< T* >( pv ); -: 338: -: 339: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 340: return boost::shared_ptr< T >( pt, pt2 ); -: 341:} -: 342: -: 343:// C++03 version -: 344: -: 345:template< class T, class A1 > -: 346:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1 ) -: 347:{ -: 348: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 349: -: 350: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 351: -: 352: void * pv = pd->address(); -: 353: -: 354: ::new( pv ) T( -: 355: boost::forward( a1 ) -: 356: ); -: 357: -: 358: pd->set_initialized(); -: 359: -: 360: T * pt2 = static_cast< T* >( pv ); -: 361: -: 362: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 363: return boost::shared_ptr< T >( pt, pt2 ); -: 364:} -: 365: -: 366:template< class T, class A, class A1 > -: 367:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1 ) -: 368:{ -: 369: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 370: -: 371: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 372: -: 373: void * pv = pd->address(); -: 374: -: 375: ::new( pv ) T( -: 376: boost::forward( a1 ) -: 377: ); -: 378: -: 379: pd->set_initialized(); -: 380: -: 381: T * pt2 = static_cast< T* >( pv ); -: 382: -: 383: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 384: return boost::shared_ptr< T >( pt, pt2 ); -: 385:} -: 386: -: 387:template< class T, class A1, class A2 > -: 388:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2 ) -: 389:{ -: 390: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 391: -: 392: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 393: -: 394: void * pv = pd->address(); -: 395: -: 396: ::new( pv ) T( -: 397: boost::forward( a1 ), -: 398: boost::forward( a2 ) -: 399: ); -: 400: -: 401: pd->set_initialized(); -: 402: -: 403: T * pt2 = static_cast< T* >( pv ); -: 404: -: 405: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 406: return boost::shared_ptr< T >( pt, pt2 ); -: 407:} -: 408: -: 409:template< class T, class A, class A1, class A2 > -: 410:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2 ) -: 411:{ -: 412: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 413: -: 414: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 415: -: 416: void * pv = pd->address(); -: 417: -: 418: ::new( pv ) T( -: 419: boost::forward( a1 ), -: 420: boost::forward( a2 ) -: 421: ); -: 422: -: 423: pd->set_initialized(); -: 424: -: 425: T * pt2 = static_cast< T* >( pv ); -: 426: -: 427: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 428: return boost::shared_ptr< T >( pt, pt2 ); -: 429:} -: 430: -: 431:template< class T, class A1, class A2, class A3 > -: 432:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3 ) -: 433:{ -: 434: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 435: -: 436: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 437: -: 438: void * pv = pd->address(); -: 439: -: 440: ::new( pv ) T( -: 441: boost::forward( a1 ), -: 442: boost::forward( a2 ), -: 443: boost::forward( a3 ) -: 444: ); -: 445: -: 446: pd->set_initialized(); -: 447: -: 448: T * pt2 = static_cast< T* >( pv ); -: 449: -: 450: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 451: return boost::shared_ptr< T >( pt, pt2 ); -: 452:} -: 453: -: 454:template< class T, class A, class A1, class A2, class A3 > -: 455:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3 ) -: 456:{ -: 457: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 458: -: 459: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 460: -: 461: void * pv = pd->address(); -: 462: -: 463: ::new( pv ) T( -: 464: boost::forward( a1 ), -: 465: boost::forward( a2 ), -: 466: boost::forward( a3 ) -: 467: ); -: 468: -: 469: pd->set_initialized(); -: 470: -: 471: T * pt2 = static_cast< T* >( pv ); -: 472: -: 473: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 474: return boost::shared_ptr< T >( pt, pt2 ); -: 475:} -: 476: -: 477:template< class T, class A1, class A2, class A3, class A4 > -: 478:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4 ) -: 479:{ -: 480: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 481: -: 482: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 483: -: 484: void * pv = pd->address(); -: 485: -: 486: ::new( pv ) T( -: 487: boost::forward( a1 ), -: 488: boost::forward( a2 ), -: 489: boost::forward( a3 ), -: 490: boost::forward( a4 ) -: 491: ); -: 492: -: 493: pd->set_initialized(); -: 494: -: 495: T * pt2 = static_cast< T* >( pv ); -: 496: -: 497: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 498: return boost::shared_ptr< T >( pt, pt2 ); -: 499:} -: 500: -: 501:template< class T, class A, class A1, class A2, class A3, class A4 > -: 502:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4 ) -: 503:{ -: 504: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 505: -: 506: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 507: -: 508: void * pv = pd->address(); -: 509: -: 510: ::new( pv ) T( -: 511: boost::forward( a1 ), -: 512: boost::forward( a2 ), -: 513: boost::forward( a3 ), -: 514: boost::forward( a4 ) -: 515: ); -: 516: -: 517: pd->set_initialized(); -: 518: -: 519: T * pt2 = static_cast< T* >( pv ); -: 520: -: 521: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 522: return boost::shared_ptr< T >( pt, pt2 ); -: 523:} -: 524: -: 525:template< class T, class A1, class A2, class A3, class A4, class A5 > -: 526:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5 ) -: 527:{ -: 528: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 529: -: 530: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 531: -: 532: void * pv = pd->address(); -: 533: -: 534: ::new( pv ) T( -: 535: boost::forward( a1 ), -: 536: boost::forward( a2 ), -: 537: boost::forward( a3 ), -: 538: boost::forward( a4 ), -: 539: boost::forward( a5 ) -: 540: ); -: 541: -: 542: pd->set_initialized(); -: 543: -: 544: T * pt2 = static_cast< T* >( pv ); -: 545: -: 546: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 547: return boost::shared_ptr< T >( pt, pt2 ); -: 548:} -: 549: -: 550:template< class T, class A, class A1, class A2, class A3, class A4, class A5 > -: 551:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5 ) -: 552:{ -: 553: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 554: -: 555: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 556: -: 557: void * pv = pd->address(); -: 558: -: 559: ::new( pv ) T( -: 560: boost::forward( a1 ), -: 561: boost::forward( a2 ), -: 562: boost::forward( a3 ), -: 563: boost::forward( a4 ), -: 564: boost::forward( a5 ) -: 565: ); -: 566: -: 567: pd->set_initialized(); -: 568: -: 569: T * pt2 = static_cast< T* >( pv ); -: 570: -: 571: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 572: return boost::shared_ptr< T >( pt, pt2 ); -: 573:} -: 574: -: 575:template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > -: 576:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6 ) -: 577:{ -: 578: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 579: -: 580: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 581: -: 582: void * pv = pd->address(); -: 583: -: 584: ::new( pv ) T( -: 585: boost::forward( a1 ), -: 586: boost::forward( a2 ), -: 587: boost::forward( a3 ), -: 588: boost::forward( a4 ), -: 589: boost::forward( a5 ), -: 590: boost::forward( a6 ) -: 591: ); -: 592: -: 593: pd->set_initialized(); -: 594: -: 595: T * pt2 = static_cast< T* >( pv ); -: 596: -: 597: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 598: return boost::shared_ptr< T >( pt, pt2 ); -: 599:} -: 600: -: 601:template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > -: 602:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6 ) -: 603:{ -: 604: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 605: -: 606: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 607: -: 608: void * pv = pd->address(); -: 609: -: 610: ::new( pv ) T( -: 611: boost::forward( a1 ), -: 612: boost::forward( a2 ), -: 613: boost::forward( a3 ), -: 614: boost::forward( a4 ), -: 615: boost::forward( a5 ), -: 616: boost::forward( a6 ) -: 617: ); -: 618: -: 619: pd->set_initialized(); -: 620: -: 621: T * pt2 = static_cast< T* >( pv ); -: 622: -: 623: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 624: return boost::shared_ptr< T >( pt, pt2 ); -: 625:} -: 626: -: 627:template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > -: 628:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7 ) -: 629:{ -: 630: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 631: -: 632: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 633: -: 634: void * pv = pd->address(); -: 635: -: 636: ::new( pv ) T( -: 637: boost::forward( a1 ), -: 638: boost::forward( a2 ), -: 639: boost::forward( a3 ), -: 640: boost::forward( a4 ), -: 641: boost::forward( a5 ), -: 642: boost::forward( a6 ), -: 643: boost::forward( a7 ) -: 644: ); -: 645: -: 646: pd->set_initialized(); -: 647: -: 648: T * pt2 = static_cast< T* >( pv ); -: 649: -: 650: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 651: return boost::shared_ptr< T >( pt, pt2 ); -: 652:} -: 653: -: 654:template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > -: 655:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7 ) -: 656:{ -: 657: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 658: -: 659: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 660: -: 661: void * pv = pd->address(); -: 662: -: 663: ::new( pv ) T( -: 664: boost::forward( a1 ), -: 665: boost::forward( a2 ), -: 666: boost::forward( a3 ), -: 667: boost::forward( a4 ), -: 668: boost::forward( a5 ), -: 669: boost::forward( a6 ), -: 670: boost::forward( a7 ) -: 671: ); -: 672: -: 673: pd->set_initialized(); -: 674: -: 675: T * pt2 = static_cast< T* >( pv ); -: 676: -: 677: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 678: return boost::shared_ptr< T >( pt, pt2 ); -: 679:} -: 680: -: 681:template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > -: 682:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7, BOOST_FWD_REF(A8) a8 ) -: 683:{ -: 684: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 685: -: 686: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 687: -: 688: void * pv = pd->address(); -: 689: -: 690: ::new( pv ) T( -: 691: boost::forward( a1 ), -: 692: boost::forward( a2 ), -: 693: boost::forward( a3 ), -: 694: boost::forward( a4 ), -: 695: boost::forward( a5 ), -: 696: boost::forward( a6 ), -: 697: boost::forward( a7 ), -: 698: boost::forward( a8 ) -: 699: ); -: 700: -: 701: pd->set_initialized(); -: 702: -: 703: T * pt2 = static_cast< T* >( pv ); -: 704: -: 705: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 706: return boost::shared_ptr< T >( pt, pt2 ); -: 707:} -: 708: -: 709:template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > -: 710:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7, BOOST_FWD_REF(A8) a8 ) -: 711:{ -: 712: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 713: -: 714: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 715: -: 716: void * pv = pd->address(); -: 717: -: 718: ::new( pv ) T( -: 719: boost::forward( a1 ), -: 720: boost::forward( a2 ), -: 721: boost::forward( a3 ), -: 722: boost::forward( a4 ), -: 723: boost::forward( a5 ), -: 724: boost::forward( a6 ), -: 725: boost::forward( a7 ), -: 726: boost::forward( a8 ) -: 727: ); -: 728: -: 729: pd->set_initialized(); -: 730: -: 731: T * pt2 = static_cast< T* >( pv ); -: 732: -: 733: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 734: return boost::shared_ptr< T >( pt, pt2 ); -: 735:} -: 736: -: 737:template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > -: 738:typename boost::detail::sp_if_not_array< T >::type make_shared( BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7, BOOST_FWD_REF(A8) a8, BOOST_FWD_REF(A9) a9 ) -: 739:{ -: 740: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); -: 741: -: 742: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 743: -: 744: void * pv = pd->address(); -: 745: -: 746: ::new( pv ) T( -: 747: boost::forward( a1 ), -: 748: boost::forward( a2 ), -: 749: boost::forward( a3 ), -: 750: boost::forward( a4 ), -: 751: boost::forward( a5 ), -: 752: boost::forward( a6 ), -: 753: boost::forward( a7 ), -: 754: boost::forward( a8 ), -: 755: boost::forward( a9 ) -: 756: ); -: 757: -: 758: pd->set_initialized(); -: 759: -: 760: T * pt2 = static_cast< T* >( pv ); -: 761: -: 762: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 763: return boost::shared_ptr< T >( pt, pt2 ); -: 764:} -: 765: -: 766:template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > -: 767:typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2, BOOST_FWD_REF(A3) a3, BOOST_FWD_REF(A4) a4, BOOST_FWD_REF(A5) a5, BOOST_FWD_REF(A6) a6, BOOST_FWD_REF(A7) a7, BOOST_FWD_REF(A8) a8, BOOST_FWD_REF(A9) a9 ) -: 768:{ -: 769: boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); -: 770: -: 771: boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); -: 772: -: 773: void * pv = pd->address(); -: 774: -: 775: ::new( pv ) T( -: 776: boost::forward( a1 ), -: 777: boost::forward( a2 ), -: 778: boost::forward( a3 ), -: 779: boost::forward( a4 ), -: 780: boost::forward( a5 ), -: 781: boost::forward( a6 ), -: 782: boost::forward( a7 ), -: 783: boost::forward( a8 ), -: 784: boost::forward( a9 ) -: 785: ); -: 786: -: 787: pd->set_initialized(); -: 788: -: 789: T * pt2 = static_cast< T* >( pv ); -: 790: -: 791: boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); -: 792: return boost::shared_ptr< T >( pt, pt2 ); -: 793:} -: 794: -: 795:#endif // !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -: 796: -: 797:#undef BOOST_SP_MSD -: 798: -: 799:} // namespace boost -: 800: -: 801:#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#compat#sodium#sodium_25519.cpp.gcov -: 0:Source:src/lib/compat/sodium/sodium_25519.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/compat_sodium_25519.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/compat_sodium_25519.gcda -: 0:Runs:2960 -: 1:/* -: 2:* (C) 2019 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include -: 8:#include -: 9:#include -: 10: -: 11:namespace Botan { -: 12: function _ZN5Botan6Sodium28crypto_scalarmult_curve25519EPhPKhS3_ called 4 returned 100% blocks executed 100% 4: 13:int Sodium::crypto_scalarmult_curve25519(uint8_t out[32], const uint8_t scalar[32], const uint8_t point[32]) -: 14: { 4: 15: curve25519_donna(out, scalar, point); call 0 returned 100% 4: 16: return 0; -: 17: } -: 18: function _ZN5Botan6Sodium33crypto_scalarmult_curve25519_baseEPhPKh called 2 returned 100% blocks executed 100% 2: 19:int Sodium::crypto_scalarmult_curve25519_base(uint8_t out[32], const uint8_t scalar[32]) -: 20: { 2: 21: curve25519_basepoint(out, scalar); call 0 returned 100% 2: 22: return 0; -: 23: } function _ZN5Botan6Sodium28crypto_sign_ed25519_detachedEPhPyPKhmS4_ called 1 returned 100% blocks executed 100% 1: 24:int Sodium::crypto_sign_ed25519_detached(uint8_t sig[], -: 25: unsigned long long* sig_len, -: 26: const uint8_t msg[], -: 27: size_t msg_len, -: 28: const uint8_t sk[32]) -: 29: { 1: 30: ed25519_sign(sig, msg, msg_len, sk, nullptr, 0); call 0 returned 100% -: 31: 1: 32: if(sig_len) branch 0 taken 100% (fallthrough) branch 1 taken 0% 1: 33: *sig_len = 64; 1: 34: return 0; -: 35: } -: 36: function _ZN5Botan6Sodium35crypto_sign_ed25519_verify_detachedEPKhS2_mS2_ called 2 returned 100% blocks executed 100% 2: 37:int Sodium::crypto_sign_ed25519_verify_detached(const uint8_t sig[], -: 38: const uint8_t msg[], -: 39: size_t msg_len, -: 40: const uint8_t pk[32]) -: 41: { 2: 42: const bool ok = ed25519_verify(msg, msg_len, sig, pk, nullptr, 0); call 0 returned 100% 2: 43: return ok ? 0 : -1; branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 44: } -: 45: function _ZN5Botan6Sodium27crypto_sign_ed25519_keypairEPhS1_ called 0 returned 0% blocks executed 0% #####: 46:int Sodium::crypto_sign_ed25519_keypair(uint8_t pk[32], uint8_t sk[64]) -: 47: { #####: 48: secure_vector seed(32); call 0 never executed #####: 49: randombytes_buf(seed.data(), seed.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 50: return crypto_sign_ed25519_seed_keypair(pk, sk, seed.data()); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 51: } -: 52: function _ZN5Botan6Sodium32crypto_sign_ed25519_seed_keypairEPhS1_PKh called 1 returned 100% blocks executed 100% 1: 53:int Sodium::crypto_sign_ed25519_seed_keypair(uint8_t pk[], uint8_t sk[], -: 54: const uint8_t seed[]) -: 55: { 1: 56: ed25519_gen_keypair(pk, sk, seed); call 0 returned 100% 1: 57: return 0; -: 58: } -: 59: -: 60:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#internal#rwlock.h.gcov -: 0:Source:build/include/botan/internal/rwlock.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_runner.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_runner.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2019 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#ifndef BOTAN_RWLOCK_H_ -: 8:#define BOTAN_RWLOCK_H_ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:/** -: 17:* A read-write lock. Writers are favored. -: 18:*/ 1: 19:class BOTAN_TEST_API RWLock final call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 never executed call 4 never executed -: 20: { -: 21: public: -: 22: RWLock(); -: 23: -: 24: void lock(); -: 25: void unlock(); -: 26: -: 27: void lock_shared(); -: 28: void unlock_shared(); -: 29: private: -: 30: std::mutex m_mutex; -: 31: std::condition_variable m_gate1; -: 32: std::condition_variable m_gate2; -: 33: uint32_t m_state; -: 34: -: 35: // 2**31 concurrent readers should be enough for anyone -: 36: static const uint32_t is_writing = static_cast(1) << 31; -: 37: static const uint32_t readers_mask = ~is_writing; -: 38: }; -: 39: -: 40:} -: 41: -: 42:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#block#kasumi#kasumi.cpp.gcov -: 0:Source:src/lib/block/kasumi/kasumi.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/block_kasumi.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/block_kasumi.gcda -: 0:Runs:2960 -: 1:/* -: 2:* KASUMI -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10:#include -: 11: -: 12:namespace Botan { -: 13: -: 14:namespace { -: 15: -: 16:/* -: 17:* KASUMI S-Boxes -: 18:*/ -: 19:alignas(64) const uint8_t KASUMI_SBOX_S7[128] = { -: 20: 0x36, 0x32, 0x3E, 0x38, 0x16, 0x22, 0x5E, 0x60, 0x26, 0x06, 0x3F, 0x5D, -: 21: 0x02, 0x12, 0x7B, 0x21, 0x37, 0x71, 0x27, 0x72, 0x15, 0x43, 0x41, 0x0C, -: 22: 0x2F, 0x49, 0x2E, 0x1B, 0x19, 0x6F, 0x7C, 0x51, 0x35, 0x09, 0x79, 0x4F, -: 23: 0x34, 0x3C, 0x3A, 0x30, 0x65, 0x7F, 0x28, 0x78, 0x68, 0x46, 0x47, 0x2B, -: 24: 0x14, 0x7A, 0x48, 0x3D, 0x17, 0x6D, 0x0D, 0x64, 0x4D, 0x01, 0x10, 0x07, -: 25: 0x52, 0x0A, 0x69, 0x62, 0x75, 0x74, 0x4C, 0x0B, 0x59, 0x6A, 0x00, 0x7D, -: 26: 0x76, 0x63, 0x56, 0x45, 0x1E, 0x39, 0x7E, 0x57, 0x70, 0x33, 0x11, 0x05, -: 27: 0x5F, 0x0E, 0x5A, 0x54, 0x5B, 0x08, 0x23, 0x67, 0x20, 0x61, 0x1C, 0x42, -: 28: 0x66, 0x1F, 0x1A, 0x2D, 0x4B, 0x04, 0x55, 0x5C, 0x25, 0x4A, 0x50, 0x31, -: 29: 0x44, 0x1D, 0x73, 0x2C, 0x40, 0x6B, 0x6C, 0x18, 0x6E, 0x53, 0x24, 0x4E, -: 30: 0x2A, 0x13, 0x0F, 0x29, 0x58, 0x77, 0x3B, 0x03 }; -: 31: -: 32:alignas(64) const uint16_t KASUMI_SBOX_S9[512] = { -: 33: 0x00A7, 0x00EF, 0x00A1, 0x017B, 0x0187, 0x014E, 0x0009, 0x0152, 0x0026, -: 34: 0x00E2, 0x0030, 0x0166, 0x01C4, 0x0181, 0x005A, 0x018D, 0x00B7, 0x00FD, -: 35: 0x0093, 0x014B, 0x019F, 0x0154, 0x0033, 0x016A, 0x0132, 0x01F4, 0x0106, -: 36: 0x0052, 0x00D8, 0x009F, 0x0164, 0x00B1, 0x00AF, 0x00F1, 0x01E9, 0x0025, -: 37: 0x00CE, 0x0011, 0x0000, 0x014D, 0x002C, 0x00FE, 0x017A, 0x003A, 0x008F, -: 38: 0x00DC, 0x0051, 0x0190, 0x005F, 0x0003, 0x013B, 0x00F5, 0x0036, 0x00EB, -: 39: 0x00DA, 0x0195, 0x01D8, 0x0108, 0x00AC, 0x01EE, 0x0173, 0x0122, 0x018F, -: 40: 0x004C, 0x00A5, 0x00C5, 0x018B, 0x0079, 0x0101, 0x01E0, 0x01A7, 0x00D4, -: 41: 0x00F0, 0x001C, 0x01CE, 0x00B0, 0x0196, 0x01FB, 0x0120, 0x00DF, 0x01F5, -: 42: 0x0197, 0x00F9, 0x0109, 0x0059, 0x00BA, 0x00DD, 0x01AC, 0x00A4, 0x004A, -: 43: 0x01B8, 0x00C4, 0x01CA, 0x01A5, 0x015E, 0x00A3, 0x00E8, 0x009E, 0x0086, -: 44: 0x0162, 0x000D, 0x00FA, 0x01EB, 0x008E, 0x00BF, 0x0045, 0x00C1, 0x01A9, -: 45: 0x0098, 0x00E3, 0x016E, 0x0087, 0x0158, 0x012C, 0x0114, 0x00F2, 0x01B5, -: 46: 0x0140, 0x0071, 0x0116, 0x000B, 0x00F3, 0x0057, 0x013D, 0x0024, 0x005D, -: 47: 0x01F0, 0x001B, 0x01E7, 0x01BE, 0x01E2, 0x0029, 0x0044, 0x009C, 0x01C9, -: 48: 0x0083, 0x0146, 0x0193, 0x0153, 0x0014, 0x0027, 0x0073, 0x01BA, 0x007C, -: 49: 0x01DB, 0x0180, 0x01FC, 0x0035, 0x0070, 0x00AA, 0x01DF, 0x0097, 0x007E, -: 50: 0x00A9, 0x0049, 0x010C, 0x0117, 0x0141, 0x00A8, 0x016C, 0x016B, 0x0124, -: 51: 0x002E, 0x01F3, 0x0189, 0x0147, 0x0144, 0x0018, 0x01C8, 0x010B, 0x009D, -: 52: 0x01CC, 0x01E8, 0x01AA, 0x0135, 0x00E5, 0x01B7, 0x01FA, 0x00D0, 0x010F, -: 53: 0x015D, 0x0191, 0x01B2, 0x00EC, 0x0010, 0x00D1, 0x0167, 0x0034, 0x0038, -: 54: 0x0078, 0x00C7, 0x0115, 0x01D1, 0x01A0, 0x00FC, 0x011F, 0x00F6, 0x0006, -: 55: 0x0053, 0x0131, 0x01A4, 0x0159, 0x0099, 0x01F6, 0x0041, 0x003D, 0x00F4, -: 56: 0x011A, 0x00AD, 0x00DE, 0x01A2, 0x0043, 0x0182, 0x0170, 0x0105, 0x0065, -: 57: 0x01DC, 0x0123, 0x00C3, 0x01AE, 0x0031, 0x004F, 0x00A6, 0x014A, 0x0118, -: 58: 0x017F, 0x0175, 0x0080, 0x017E, 0x0198, 0x009B, 0x01EF, 0x016F, 0x0184, -: 59: 0x0112, 0x006B, 0x01CB, 0x01A1, 0x003E, 0x01C6, 0x0084, 0x00E1, 0x00CB, -: 60: 0x013C, 0x00EA, 0x000E, 0x012D, 0x005B, 0x01F7, 0x011E, 0x01A8, 0x00D3, -: 61: 0x015B, 0x0133, 0x008C, 0x0176, 0x0023, 0x0067, 0x007D, 0x01AB, 0x0013, -: 62: 0x00D6, 0x01C5, 0x0092, 0x01F2, 0x013A, 0x01BC, 0x00E6, 0x0100, 0x0149, -: 63: 0x00C6, 0x011D, 0x0032, 0x0074, 0x004E, 0x019A, 0x000A, 0x00CD, 0x01FE, -: 64: 0x00AB, 0x00E7, 0x002D, 0x008B, 0x01D3, 0x001D, 0x0056, 0x01F9, 0x0020, -: 65: 0x0048, 0x001A, 0x0156, 0x0096, 0x0139, 0x01EA, 0x01AF, 0x00EE, 0x019B, -: 66: 0x0145, 0x0095, 0x01D9, 0x0028, 0x0077, 0x00AE, 0x0163, 0x00B9, 0x00E9, -: 67: 0x0185, 0x0047, 0x01C0, 0x0111, 0x0174, 0x0037, 0x006E, 0x00B2, 0x0142, -: 68: 0x000C, 0x01D5, 0x0188, 0x0171, 0x00BE, 0x0001, 0x006D, 0x0177, 0x0089, -: 69: 0x00B5, 0x0058, 0x004B, 0x0134, 0x0104, 0x01E4, 0x0062, 0x0110, 0x0172, -: 70: 0x0113, 0x019C, 0x006F, 0x0150, 0x013E, 0x0004, 0x01F8, 0x01EC, 0x0103, -: 71: 0x0130, 0x004D, 0x0151, 0x01B3, 0x0015, 0x0165, 0x012F, 0x014C, 0x01E3, -: 72: 0x0012, 0x002F, 0x0055, 0x0019, 0x01F1, 0x01DA, 0x0121, 0x0064, 0x010D, -: 73: 0x0128, 0x01DE, 0x010E, 0x006A, 0x001F, 0x0068, 0x01B1, 0x0054, 0x019E, -: 74: 0x01E6, 0x018A, 0x0060, 0x0063, 0x009A, 0x01FF, 0x0094, 0x019D, 0x0169, -: 75: 0x0199, 0x00FF, 0x00A2, 0x00D7, 0x012E, 0x00C9, 0x010A, 0x015F, 0x0157, -: 76: 0x0090, 0x01B9, 0x016D, 0x006C, 0x012A, 0x00FB, 0x0022, 0x00B6, 0x01FD, -: 77: 0x008A, 0x00D2, 0x014F, 0x0085, 0x0137, 0x0160, 0x0148, 0x008D, 0x018C, -: 78: 0x015A, 0x007B, 0x013F, 0x01C2, 0x0119, 0x01AD, 0x00E4, 0x01BB, 0x01E1, -: 79: 0x005C, 0x0194, 0x01E5, 0x01A6, 0x00F8, 0x0129, 0x0017, 0x00D5, 0x0082, -: 80: 0x01D2, 0x0016, 0x00D9, 0x011B, 0x0046, 0x0126, 0x0168, 0x01A3, 0x007F, -: 81: 0x0138, 0x0179, 0x0007, 0x01D4, 0x00C2, 0x0002, 0x0075, 0x0127, 0x01CF, -: 82: 0x0102, 0x00E0, 0x01BF, 0x00F7, 0x00BB, 0x0050, 0x018E, 0x011C, 0x0161, -: 83: 0x0069, 0x0186, 0x012B, 0x01D7, 0x01D6, 0x00B8, 0x0039, 0x00C8, 0x015C, -: 84: 0x003F, 0x00CC, 0x00BC, 0x0021, 0x01C3, 0x0061, 0x001E, 0x0136, 0x00DB, -: 85: 0x005E, 0x00A0, 0x0081, 0x01ED, 0x0040, 0x00B3, 0x0107, 0x0066, 0x00BD, -: 86: 0x00CF, 0x0072, 0x0192, 0x01B6, 0x01DD, 0x0183, 0x007A, 0x00C0, 0x002A, -: 87: 0x017D, 0x0005, 0x0091, 0x0076, 0x00B4, 0x01C1, 0x0125, 0x0143, 0x0088, -: 88: 0x017C, 0x002B, 0x0042, 0x003C, 0x01C7, 0x0155, 0x01BD, 0x00CA, 0x01B0, -: 89: 0x0008, 0x00ED, 0x000F, 0x0178, 0x01B4, 0x01D0, 0x003B, 0x01CD }; -: 90: -: 91:/* -: 92:* KASUMI FI Function -: 93:*/ 60: 94:uint16_t FI(uint16_t I, uint16_t K) -: 95: { 60: 96: uint16_t D9 = (I >> 7); 60: 97: uint8_t D7 = (I & 0x7F); 60: 98: D9 = KASUMI_SBOX_S9[D9] ^ D7; 60: 99: D7 = KASUMI_SBOX_S7[D7] ^ (D9 & 0x7F); -: 100: 60: 101: D7 ^= (K >> 9); 60: 102: D9 = KASUMI_SBOX_S9[D9 ^ (K & 0x1FF)] ^ D7; 60: 103: D7 = KASUMI_SBOX_S7[D7] ^ (D9 & 0x7F); 60: 104: return static_cast(D7 << 9) | D9; -: 105: } -: 106: -: 107:} -: 108: -: 109:/* -: 110:* KASUMI Encryption -: 111:*/ function _ZNK5Botan6KASUMI9encrypt_nEPKhPhm called 15 returned 60% blocks executed 100% 15: 112:void KASUMI::encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const -: 113: { 15: 114: verify_key_set(m_EK.empty() == false); branch 0 taken 40% (fallthrough) branch 1 taken 60% -: 115: 18: 116: for(size_t i = 0; i != blocks; ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 117: { 9: 118: uint16_t B0 = load_be(in, 0); 9: 119: uint16_t B1 = load_be(in, 1); 9: 120: uint16_t B2 = load_be(in, 2); 9: 121: uint16_t B3 = load_be(in, 3); -: 122: 45: 123: for(size_t j = 0; j != 8; j += 2) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 124: { 36: 125: const uint16_t* K = &m_EK[8*j]; -: 126: 36: 127: uint16_t R = B1 ^ (rotl<1>(B0) & K[0]); 36: 128: uint16_t L = B0 ^ (rotl<1>(R) | K[1]); -: 129: 36: 130: L = FI(L ^ K[ 2], K[ 3]) ^ R; 36: 131: R = FI(R ^ K[ 4], K[ 5]) ^ L; 36: 132: L = FI(L ^ K[ 6], K[ 7]) ^ R; -: 133: 36: 134: R = B2 ^= R; 36: 135: L = B3 ^= L; -: 136: 36: 137: R = FI(R ^ K[10], K[11]) ^ L; 36: 138: L = FI(L ^ K[12], K[13]) ^ R; 36: 139: R = FI(R ^ K[14], K[15]) ^ L; -: 140: 36: 141: R ^= (rotl<1>(L) & K[8]); 36: 142: L ^= (rotl<1>(R) | K[9]); -: 143: 36: 144: B0 ^= L; 36: 145: B1 ^= R; -: 146: } -: 147: 9: 148: store_be(out, B0, B1, B2, B3); call 0 returned 100% -: 149: 9: 150: in += BLOCK_SIZE; 9: 151: out += BLOCK_SIZE; -: 152: } 9: 153: } -: 154: -: 155:/* -: 156:* KASUMI Decryption -: 157:*/ function _ZNK5Botan6KASUMI9decrypt_nEPKhPhm called 12 returned 50% blocks executed 100% 12: 158:void KASUMI::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const -: 159: { 12: 160: verify_key_set(m_EK.empty() == false); branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 161: 12: 162: for(size_t i = 0; i != blocks; ++i) branch 0 taken 50% (fallthrough) branch 1 taken 50% -: 163: { 6: 164: uint16_t B0 = load_be(in, 0); 6: 165: uint16_t B1 = load_be(in, 1); 6: 166: uint16_t B2 = load_be(in, 2); 6: 167: uint16_t B3 = load_be(in, 3); -: 168: 30: 169: for(size_t j = 0; j != 8; j += 2) branch 0 taken 80% (fallthrough) branch 1 taken 20% -: 170: { 24: 171: const uint16_t* K = &m_EK[8*(6-j)]; -: 172: 24: 173: uint16_t L = B2, R = B3; -: 174: 24: 175: L = FI(L ^ K[10], K[11]) ^ R; 24: 176: R = FI(R ^ K[12], K[13]) ^ L; 24: 177: L = FI(L ^ K[14], K[15]) ^ R; -: 178: 24: 179: L ^= (rotl<1>(R) & K[8]); 24: 180: R ^= (rotl<1>(L) | K[9]); -: 181: 24: 182: R = B0 ^= R; 24: 183: L = B1 ^= L; -: 184: 24: 185: L ^= (rotl<1>(R) & K[0]); 24: 186: R ^= (rotl<1>(L) | K[1]); -: 187: 24: 188: R = FI(R ^ K[2], K[3]) ^ L; 24: 189: L = FI(L ^ K[4], K[5]) ^ R; 24: 190: R = FI(R ^ K[6], K[7]) ^ L; -: 191: 24: 192: B2 ^= L; 24: 193: B3 ^= R; -: 194: } -: 195: 6: 196: store_be(out, B0, B1, B2, B3); call 0 returned 100% -: 197: 6: 198: in += BLOCK_SIZE; 6: 199: out += BLOCK_SIZE; -: 200: } 6: 201: } -: 202: -: 203:/* -: 204:* KASUMI Key Schedule -: 205:*/ function _ZN5Botan6KASUMI12key_scheduleEPKhm called 9 returned 100% blocks executed 80% 9: 206:void KASUMI::key_schedule(const uint8_t key[], size_t) -: 207: { 9: 208: static const uint16_t RC[] = { 0x0123, 0x4567, 0x89AB, 0xCDEF, -: 209: 0xFEDC, 0xBA98, 0x7654, 0x3210 }; -: 210: 9: 211: secure_vector K(16); call 0 returned 100% 81: 212: for(size_t i = 0; i != 8; ++i) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 213: { 72: 214: K[i] = load_be(key, i); 72: 215: K[i+8] = K[i] ^ RC[i]; -: 216: } -: 217: 9: 218: m_EK.resize(64); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 219: 81: 220: for(size_t i = 0; i != 8; ++i) branch 0 taken 89% (fallthrough) branch 1 taken 11% -: 221: { 72: 222: m_EK[8*i ] = rotl<2>(K[(i+0) % 8]); 72: 223: m_EK[8*i+1] = rotl<1>(K[(i+2) % 8 + 8]); 72: 224: m_EK[8*i+2] = rotl<5>(K[(i+1) % 8]); 72: 225: m_EK[8*i+3] = K[(i+4) % 8 + 8]; 72: 226: m_EK[8*i+4] = rotl<8>(K[(i+5) % 8]); 72: 227: m_EK[8*i+5] = K[(i+3) % 8 + 8]; 72: 228: m_EK[8*i+6] = rotl<13>(K[(i+6) % 8]); 72: 229: m_EK[8*i+7] = K[(i+7) % 8 + 8]; -: 230: } 9: 231: } -: 232: function _ZN5Botan6KASUMI5clearEv called 6 returned 100% blocks executed 100% 6: 233:void KASUMI::clear() -: 234: { 6: 235: zap(m_EK); call 0 returned 100% 6: 236: } -: 237: -: 238:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#gost_3410#gost_3410.cpp.gcov -: 0:Source:src/lib/pubkey/gost_3410/gost_3410.cpp -: 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-2012 -: 3:* (C) 2007 Falko Strenzke, FlexSecure GmbH -: 4:* Manuel Hartl, FlexSecure GmbH -: 5:* (C) 2008-2010,2015,2018 Jack Lloyd -: 6:* -: 7:* Botan is released under the Simplified BSD License (see license.txt) -: 8:*/ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16: -: 17:namespace Botan { -: 18: function _ZNK5Botan19GOST_3410_PublicKey15public_key_bitsEv called 34 returned 100% blocks executed 60% 34: 19:std::vector GOST_3410_PublicKey::public_key_bits() const -: 20: { 34: 21: const BigInt x = public_point().get_affine_x(); call 0 returned 100% 68: 22: const BigInt y = public_point().get_affine_y(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 23: 34: 24: size_t part_size = std::max(x.bytes(), y.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% -: 25: 68: 26: std::vector bits(2*part_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed -: 27: 34: 28: x.binary_encode(&bits[part_size - x.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) 34: 29: y.binary_encode(&bits[2*part_size - y.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) -: 30: -: 31: // Keys are stored in little endian format (WTF) 578: 32: for(size_t i = 0; i != part_size / 2; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 33: { 544: 34: std::swap(bits[i], bits[part_size-1-i]); 544: 35: std::swap(bits[part_size+i], bits[2*part_size-1-i]); -: 36: } -: 37: 34: 38: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 68: 39: DER_Encoder(output).encode(bits, 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 68: 40: return output; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 41: } -: 42: function _ZNK5Botan19GOST_3410_PublicKey9algo_nameB5cxx11Ev called 334 returned 100% blocks executed 27% 334: 43:std::string GOST_3410_PublicKey::algo_name() const -: 44: { 334: 45: const size_t p_bits = domain().get_p_bits(); call 0 returned 100% -: 46: 334: 47: if(p_bits == 256 || p_bits == 512) branch 0 taken 100% (fallthrough) branch 1 taken 0% 668: 48: return "GOST-34.10-2012-" + std::to_string(p_bits); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 49: else #####: 50: throw Encoding_Error("GOST-34.10-2012 is not defined for parameters of this size"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 51: } -: 52: function _ZNK5Botan19GOST_3410_PublicKey20algorithm_identifierEv called 34 returned 100% blocks executed 61% 34: 53:AlgorithmIdentifier GOST_3410_PublicKey::algorithm_identifier() const -: 54: { 34: 55: std::vector params; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 56: 68: 57: const OID gost_oid = get_oid(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 68: 58: const OID domain_oid = domain().get_curve_oid(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 59: 34: 60: DER_Encoder(params).start_cons(SEQUENCE).encode(domain_oid).end_cons(); call 0 returned 100% branch 1 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% call 13 never executed branch 14 never executed branch 15 never executed -: 61: 68: 62: return AlgorithmIdentifier(gost_oid, params); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 63: } -: 64: 55*: 65:GOST_3410_PublicKey::GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id, 55*: 66: const std::vector& key_bits) -: 67: { 55*: 68: OID ecc_param_id; -: 69: -: 70: // The parameters also includes hash and cipher OIDs 55*: 71: BER_Decoder(alg_id.get_parameters()).start_cons(SEQUENCE).decode(ecc_param_id); -: 72: 55*: 73: m_domain_params = EC_Group(ecc_param_id); -: 74: 55*: 75: const size_t p_bits = m_domain_params.get_p_bits(); 55*: 76: if(p_bits != 256 && p_bits != 512) #####: 77: throw Decoding_Error("GOST-34.10-2012 is not defined for parameters of size " + #####: 78: std::to_string(p_bits)); -: 79: 110*: 80: secure_vector bits; 110*: 81: BER_Decoder(key_bits).decode(bits, OCTET_STRING); -: 82: 55*: 83: const size_t part_size = bits.size() / 2; -: 84: -: 85: // Keys are stored in little endian format (WTF) 935*: 86: for(size_t i = 0; i != part_size / 2; ++i) -: 87: { 880*: 88: std::swap(bits[i], bits[part_size-1-i]); 880*: 89: std::swap(bits[part_size+i], bits[2*part_size-1-i]); -: 90: } -: 91: 110*: 92: BigInt x(bits.data(), part_size); 110*: 93: BigInt y(&bits[part_size], part_size); -: 94: 110*: 95: m_public_key = domain().point(x, y); -: 96: 55*: 97: BOTAN_ASSERT(m_public_key.on_the_curve(), -: 98: "Loaded GOST 34.10 public key is on the curve"); 55*: 99: } ------------------ _ZN5Botan19GOST_3410_PublicKeyC1ERKNS_19AlgorithmIdentifierERKSt6vectorIhSaIhEE: function _ZN5Botan19GOST_3410_PublicKeyC1ERKNS_19AlgorithmIdentifierERKSt6vectorIhSaIhEE called 55 returned 100% blocks executed 45% 55: 65:GOST_3410_PublicKey::GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id, 55: 66: const std::vector& key_bits) call 0 returned 100% call 1 never executed -: 67: { 55: 68: OID ecc_param_id; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 69: -: 70: // The parameters also includes hash and cipher OIDs 55: 71: BER_Decoder(alg_id.get_parameters()).start_cons(SEQUENCE).decode(ecc_param_id); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% call 10 returned 100% call 11 never executed call 12 never executed branch 13 never executed branch 14 never executed -: 72: 55: 73: m_domain_params = EC_Group(ecc_param_id); 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% -: 74: 55: 75: const size_t p_bits = m_domain_params.get_p_bits(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 55: 76: if(p_bits != 256 && p_bits != 512) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 77: throw Decoding_Error("GOST-34.10-2012 is not defined for parameters of size " + branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 78: std::to_string(p_bits)); 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 call 11 never executed -: 79: 110: 80: secure_vector bits; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 110: 81: BER_Decoder(key_bits).decode(bits, 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 -: 82: 55: 83: const size_t part_size = bits.size() / 2; -: 84: -: 85: // Keys are stored in little endian format (WTF) 935: 86: for(size_t i = 0; i != part_size / 2; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% -: 87: { 880: 88: std::swap(bits[i], bits[part_size-1-i]); 880: 89: std::swap(bits[part_size+i], bits[2*part_size-1-i]); -: 90: } -: 91: 110: 92: BigInt x(bits.data(), part_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 110: 93: BigInt y(&bits[part_size], part_size); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 94: 110: 95: m_public_key = domain().point(x, y); 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 -: 96: 55*: 97: BOTAN_ASSERT(m_public_key.on_the_curve(), 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 -: 98: "Loaded GOST 34.10 public key is on the curve"); 55: 99: } ------------------ _ZN5Botan19GOST_3410_PublicKeyC2ERKNS_19AlgorithmIdentifierERKSt6vectorIhSaIhEE: function _ZN5Botan19GOST_3410_PublicKeyC2ERKNS_19AlgorithmIdentifierERKSt6vectorIhSaIhEE called 0 returned 0% blocks executed 0% #####: 65:GOST_3410_PublicKey::GOST_3410_PublicKey(const AlgorithmIdentifier& alg_id, #####: 66: const std::vector& key_bits) -: 67: { #####: 68: OID ecc_param_id; call 0 never executed branch 1 never executed branch 2 never executed -: 69: -: 70: // The parameters also includes hash and cipher OIDs #####: 71: BER_Decoder(alg_id.get_parameters()).start_cons(SEQUENCE).decode(ecc_param_id); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed call 10 never executed call 11 never executed call 12 never executed branch 13 never executed branch 14 never executed -: 72: #####: 73: m_domain_params = EC_Group(ecc_param_id); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed -: 74: #####: 75: const size_t p_bits = m_domain_params.get_p_bits(); call 0 never executed branch 1 never executed branch 2 never executed #####: 76: if(p_bits != 256 && p_bits != 512) branch 0 never executed branch 1 never executed #####: 77: throw Decoding_Error("GOST-34.10-2012 is not defined for parameters of size " + branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 78: std::to_string(p_bits)); 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 call 11 never executed -: 79: #####: 80: secure_vector bits; call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 81: BER_Decoder(key_bits).decode(bits, OCTET_STRING); 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 -: 82: #####: 83: const size_t part_size = bits.size() / 2; -: 84: -: 85: // Keys are stored in little endian format (WTF) #####: 86: for(size_t i = 0; i != part_size / 2; ++i) branch 0 never executed branch 1 never executed -: 87: { #####: 88: std::swap(bits[i], bits[part_size-1-i]); #####: 89: std::swap(bits[part_size+i], bits[2*part_size-1-i]); -: 90: } -: 91: #####: 92: BigInt x(bits.data(), part_size); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 93: BigInt y(&bits[part_size], part_size); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 94: #####: 95: m_public_key = domain().point(x, y); 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 -: 96: #####: 97: BOTAN_ASSERT(m_public_key.on_the_curve(), call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed -: 98: "Loaded GOST 34.10 public key is on the curve"); #####: 99: } ------------------ -: 100: 12*: 101:GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng, -: 102: const EC_Group& domain, 12: 103: const BigInt& x) : 12*: 104: EC_PrivateKey(rng, domain, x) -: 105: { 12*: 106: const size_t p_bits = m_domain_params.get_p_bits(); 12*: 107: if(p_bits != 256 && p_bits != 512) #####: 108: throw Decoding_Error("GOST-34.10-2012 is not defined for parameters of size " + #####: 109: std::to_string(p_bits)); 12*: 110: } ------------------ _ZN5Botan20GOST_3410_PrivateKeyC1ERNS_21RandomNumberGeneratorERKNS_8EC_GroupERKNS_6BigIntE: function _ZN5Botan20GOST_3410_PrivateKeyC1ERNS_21RandomNumberGeneratorERKNS_8EC_GroupERKNS_6BigIntE called 12 returned 100% blocks executed 19% 12: 101:GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng, -: 102: const EC_Group& domain, 12: 103: const BigInt& x) : 12: 104: EC_PrivateKey(rng, domain, x) 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 -: 105: { 12: 106: const size_t p_bits = m_domain_params.get_p_bits(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12: 107: if(p_bits != 256 && p_bits != 512) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 108: throw Decoding_Error("GOST-34.10-2012 is not defined for parameters of size " + branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 109: std::to_string(p_bits)); 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 call 11 never executed 12: 110: } ------------------ _ZN5Botan20GOST_3410_PrivateKeyC2ERNS_21RandomNumberGeneratorERKNS_8EC_GroupERKNS_6BigIntE: function _ZN5Botan20GOST_3410_PrivateKeyC2ERNS_21RandomNumberGeneratorERKNS_8EC_GroupERKNS_6BigIntE called 0 returned 0% blocks executed 0% #####: 101:GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng, -: 102: const EC_Group& domain, -: 103: const BigInt& x) : #####: 104: EC_PrivateKey(rng, domain, x) call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 105: { #####: 106: const size_t p_bits = m_domain_params.get_p_bits(); call 0 never executed branch 1 never executed branch 2 never executed #####: 107: if(p_bits != 256 && p_bits != 512) branch 0 never executed branch 1 never executed #####: 108: throw Decoding_Error("GOST-34.10-2012 is not defined for parameters of size " + branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 109: std::to_string(p_bits)); 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 call 11 never executed #####: 110: } ------------------ -: 111: -: 112:namespace { -: 113: function _ZN5Botan12_GLOBAL__N_19decode_leEPKhm called 127 returned 100% blocks executed 77% 127: 114:BigInt decode_le(const uint8_t msg[], size_t msg_len) -: 115: { 127: 116: secure_vector msg_le(msg, msg + msg_len); call 0 returned 100% -: 117: 2159: 118: for(size_t i = 0; i != msg_le.size() / 2; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% 2032: 119: std::swap(msg_le[i], msg_le[msg_le.size()-1-i]); -: 120: 254: 121: return BigInt(msg_le.data(), msg_le.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 122: } -: 123: -: 124:/** -: 125:* GOST-34.10 signature operation -: 126:*/ -: 127:class GOST_3410_Signature_Operation final : public PK_Ops::Signature_with_EMSA -: 128: { -: 129: public: function _ZN5Botan12_GLOBAL__N_129GOST_3410_Signature_OperationC2ERKNS_20GOST_3410_PrivateKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 39 returned 100% blocks executed 62% 39: 130: GOST_3410_Signature_Operation(const GOST_3410_PrivateKey& gost_3410, 39: 131: const std::string& emsa) : -: 132: PK_Ops::Signature_with_EMSA(emsa), -: 133: m_group(gost_3410.domain()), 39: 134: m_x(gost_3410.private_value()) 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 39: 135: {} -: 136: function _ZNK5Botan12_GLOBAL__N_129GOST_3410_Signature_Operation16signature_lengthEv called 1 returned 100% blocks executed 100% 1: 137: size_t signature_length() const override { return 2*m_group.get_order_bytes(); } call 0 returned 100% -: 138: function _ZNK5Botan12_GLOBAL__N_129GOST_3410_Signature_Operation14max_input_bitsEv called 48 returned 100% blocks executed 100% 48: 139: size_t max_input_bits() const override { return m_group.get_order_bits(); } call 0 returned 100% -: 140: -: 141: secure_vector raw_sign(const uint8_t msg[], size_t msg_len, -: 142: RandomNumberGenerator& rng) override; -: 143: -: 144: private: -: 145: const EC_Group m_group; -: 146: const BigInt& m_x; -: 147: std::vector m_ws; -: 148: }; -: 149: -: 150:secure_vector function _ZN5Botan12_GLOBAL__N_129GOST_3410_Signature_Operation8raw_signEPKhmRNS_21RandomNumberGeneratorE called 48 returned 100% blocks executed 48% 48: 151:GOST_3410_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, -: 152: RandomNumberGenerator& rng) -: 153: { 48: 154: const BigInt k = m_group.random_scalar(rng); call 0 returned 100% -: 155: 96: 156: BigInt e = decode_le(msg, msg_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 157: 48: 158: e = m_group.mod_order(e); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 48: 159: if(e == 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 160: e = 1; call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 161: 48: 162: const BigInt r = m_group.mod_order( 96: 163: m_group.blinded_base_point_multiply_x(k, rng, m_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) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 164: 48: 165: const BigInt s = m_group.mod_order( 144: 166: m_group.multiply_mod_order(r, m_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% 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 144: 167: m_group.multiply_mod_order(k, e)); call 0 returned 100% 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 -: 168: 96: 169: if(r == 0 || s == 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 taken 0% (fallthrough) branch 6 taken 100% #####: 170: throw Internal_Error("GOST 34.10 signature generation failed, r/s equal to zero"); 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 -: 171: 96: 172: return BigInt::encode_fixed_length_int_pair(s, r, m_group.get_order_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) -: 173: } -: 174: -: 175:/** -: 176:* GOST-34.10 verification operation -: 177:*/ -: 178:class GOST_3410_Verification_Operation final : public PK_Ops::Verification_with_EMSA -: 179: { -: 180: public: -: 181: function _ZN5Botan12_GLOBAL__N_132GOST_3410_Verification_OperationC2ERKNS_19GOST_3410_PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 39 returned 100% blocks executed 67% 39: 182: GOST_3410_Verification_Operation(const GOST_3410_PublicKey& gost, 39: 183: const std::string& emsa) : -: 184: PK_Ops::Verification_with_EMSA(emsa), -: 185: m_group(gost.domain()), 39: 186: m_gy_mul(m_group.get_base_point(), gost.public_point()) call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 never executed call 9 never executed 39: 187: {} -: 188: function _ZNK5Botan12_GLOBAL__N_132GOST_3410_Verification_Operation14max_input_bitsEv called 82 returned 100% blocks executed 100% 82: 189: size_t max_input_bits() const override { return m_group.get_order_bits(); } call 0 returned 100% -: 190: function _ZNK5Botan12_GLOBAL__N_132GOST_3410_Verification_Operation13with_recoveryEv called 82 returned 100% blocks executed 100% 82: 191: bool with_recovery() const override { return false; } -: 192: -: 193: bool verify(const uint8_t msg[], size_t msg_len, -: 194: const uint8_t sig[], size_t sig_len) override; -: 195: private: -: 196: const EC_Group m_group; -: 197: const PointGFp_Multi_Point_Precompute m_gy_mul; -: 198: }; -: 199: function _ZN5Botan12_GLOBAL__N_132GOST_3410_Verification_Operation6verifyEPKhmS3_m called 82 returned 100% blocks executed 62% 82: 200:bool GOST_3410_Verification_Operation::verify(const uint8_t msg[], size_t msg_len, -: 201: const uint8_t sig[], size_t sig_len) -: 202: { 82: 203: if(sig_len != m_group.get_order_bytes() * 2) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 204: return false; -: 205: 164: 206: const BigInt s(sig, sig_len / 2); call 0 returned 100% 164: 207: const BigInt r(sig + sig_len / 2, sig_len / 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 208: 82: 209: const BigInt& order = m_group.get_order(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 210: 320: 211: if(r <= 0 || r >= order || s <= 0 || s >= order) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 98% (fallthrough) branch 4 taken 2% branch 5 taken 99% (fallthrough) branch 6 taken 1% branch 7 taken 100% (fallthrough) branch 8 taken 0% branch 9 taken 0% (fallthrough) branch 10 taken 100% 3: 212: return false; -: 213: 161: 214: BigInt e = decode_le(msg, msg_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 79: 215: e = m_group.mod_order(e); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 79: 216: if(e == 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% #####: 217: e = 1; call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 218: 158: 219: const BigInt v = m_group.inverse_mod_order(e); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 220: 158: 221: const BigInt z1 = m_group.multiply_mod_order(s, v); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 158: 222: const BigInt z2 = m_group.multiply_mod_order(-r, v); call 0 returned 100% 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 -: 223: 158: 224: const PointGFp R = m_gy_mul.multi_exp(z1, z2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 225: 158: 226: if(R.is_zero()) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 227: return false; -: 228: 237: 229: return (R.get_affine_x() == r); 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 -: 230: } -: 231: -: 232:} -: 233: -: 234:std::unique_ptr function _ZNK5Botan19GOST_3410_PublicKey22create_verification_opERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ called 45 returned 87% blocks executed 67% 45: 235:GOST_3410_PublicKey::create_verification_op(const std::string& params, -: 236: const std::string& provider) const -: 237: { 45: 238: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% branch 3 taken 86% (fallthrough) branch 4 taken 14% 39: 239: return std::unique_ptr(new GOST_3410_Verification_Operation(*this, params)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed 12: 240: 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 -: 241: } -: 242: -: 243:std::unique_ptr function _ZNK5Botan20GOST_3410_PrivateKey19create_signature_opERNS_21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_ called 42 returned 93% blocks executed 67% 42: 244:GOST_3410_PrivateKey::create_signature_op(RandomNumberGenerator& /*rng*/, -: 245: const std::string& params, -: 246: const std::string& provider) const -: 247: { 42: 248: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% branch 3 taken 93% (fallthrough) branch 4 taken 7% 39: 249: return std::unique_ptr(new GOST_3410_Signature_Operation(*this, params)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed 6: 250: 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 -: 251: } -: 252: -: 253:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#hash#skein#skein_512.cpp.gcov -: 0:Source:src/lib/hash/skein/skein_512.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash_skein_512.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash_skein_512.gcda -: 0:Runs:2960 -: 1:/* -: 2:* The Skein-512 hash function -: 3:* (C) 2009,2010,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:#include -: 12: -: 13:namespace Botan { -: 14: function _ZN5Botan9Skein_512C2EmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 4123 returned 100% blocks executed 27% 4123: 15:Skein_512::Skein_512(size_t arg_output_bits, 4123: 16: const std::string& arg_personalization) : -: 17: m_personalization(arg_personalization), -: 18: m_output_bits(arg_output_bits), 4123: 19: m_threefish(new Threefish_512), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 12369: 20: m_T(2), m_buffer(64), m_buf_pos(0) call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% (throw) branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed call 16 never executed branch 17 never executed branch 18 never executed -: 21: { 4123: 22: if(m_output_bits == 0 || m_output_bits % 8 != 0 || m_output_bits > 512) branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 0% (fallthrough) branch 5 taken 100% #####: 23: throw Invalid_Argument("Bad output bits size for Skein-512"); 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 -: 24: 4123: 25: initial_block(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4123: 26: } -: 27: function _ZNK5Botan9Skein_5124nameB5cxx11Ev called 3111 returned 100% blocks executed 36% 3111: 28:std::string Skein_512::name() const -: 29: { 3111: 30: if(m_personalization != "") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% 6: 31: return "Skein-512(" + std::to_string(m_output_bits) + "," + 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 taken 0% (fallthrough) branch 15 taken 100% branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed call 22 never executed 3: 32: m_personalization + ")"; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6216: 33: return "Skein-512(" + std::to_string(m_output_bits) + ")"; 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 -: 34: } -: 35: function _ZNK5Botan9Skein_5125cloneEv called 1037 returned 100% blocks executed 80% 1037: 36:HashFunction* Skein_512::clone() const -: 37: { 1037: 38: return new Skein_512(m_output_bits, m_personalization); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 39: } -: 40: function _ZNK5Botan9Skein_51210copy_stateEv called 1012 returned 100% blocks executed 73% 1012: 41:std::unique_ptr Skein_512::copy_state() const -: 42: { 2024: 43: std::unique_ptr copy(new Skein_512(m_output_bits, m_personalization)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed call 6 never executed -: 44: 1012: 45: copy->m_threefish->m_K = this->m_threefish->m_K; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1012: 46: copy->m_T = this->m_T; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1012: 47: copy->m_buffer = this->m_buffer; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1012: 48: copy->m_buf_pos = this->m_buf_pos; call 0 returned 100% -: 49: -: 50: // work around GCC 4.8 bug 1012: 51: return std::unique_ptr(copy.release()); call 0 returned 100% -: 52: } -: 53: function _ZN5Botan9Skein_5125clearEv called 1037 returned 100% blocks executed 100% 1037: 54:void Skein_512::clear() -: 55: { 1037: 56: zeroise(m_buffer); branch 0 taken 100% (fallthrough) branch 1 taken 0% 1037: 57: m_buf_pos = 0; -: 58: 1037: 59: initial_block(); call 0 returned 100% 1037: 60: } -: 61: function _ZN5Botan9Skein_51211reset_tweakENS0_9type_codeEb called 28832 returned 100% blocks executed 100% 28832: 62:void Skein_512::reset_tweak(type_code type, bool is_final) -: 63: { 28832: 64: m_T[0] = 0; -: 65: 28832: 66: m_T[1] = (static_cast(type) << 56) | 28832: 67: (static_cast(1) << 62) | 28832: 68: (static_cast(is_final) << 63); 28832: 69: } -: 70: function _ZN5Botan9Skein_51213initial_blockEv called 11328 returned 100% blocks executed 46% 11328: 71:void Skein_512::initial_block() -: 72: { 11328: 73: const uint8_t zeros[64] = { 0 }; -: 74: 11328: 75: m_threefish->set_key(zeros, sizeof(zeros)); call 0 returned 100% -: 76: -: 77: // ASCII("SHA3") followed by version (0x0001) code 11328: 78: uint8_t config_str[32] = { 0x53, 0x48, 0x41, 0x33, 0x01, 0x00, 0 }; 11328: 79: store_le(uint32_t(m_output_bits), config_str + 8); call 0 returned 100% -: 80: 11328: 81: reset_tweak(SKEIN_CONFIG, true); call 0 returned 100% 11328: 82: ubi_512(config_str, sizeof(config_str)); call 0 returned 100% -: 83: 11328: 84: if(m_personalization != "") call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% -: 85: { -: 86: /* -: 87: This is a limitation of this implementation, and not of the -: 88: algorithm specification. Could be fixed relatively easily, but -: 89: doesn't seem worth the trouble. -: 90: */ 8: 91: if(m_personalization.length() > 64) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 92: throw Invalid_Argument("Skein personalization must be less than 64 bytes"); 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 -: 93: 8: 94: const uint8_t* bits = cast_char_ptr_to_uint8(m_personalization.data()); call 0 returned 100% 8: 95: reset_tweak(SKEIN_PERSONALIZATION, true); call 0 returned 100% 8: 96: ubi_512(bits, m_personalization.length()); call 0 returned 100% -: 97: } -: 98: 11328: 99: reset_tweak(SKEIN_MSG, false); call 0 returned 100% 11328: 100: } -: 101: function _ZN5Botan9Skein_5127ubi_512EPKhm called 29773 returned 100% blocks executed 84% 29773: 102:void Skein_512::ubi_512(const uint8_t msg[], size_t msg_len) -: 103: { 29773: 104: secure_vector M(8); call 0 returned 100% -: 105: 34478: 106: do -: 107: { 34478: 108: const size_t to_proc = std::min(msg_len, 64); branch 0 taken 14% (fallthrough) branch 1 taken 86% 34478: 109: m_T[0] += to_proc; branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 110: 34478: 111: load_le(M.data(), msg, to_proc / 8); branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 112: 34478: 113: if(to_proc % 8) branch 0 taken 16% (fallthrough) branch 1 taken 84% -: 114: { 27268: 115: for(size_t j = 0; j != to_proc % 8; ++j) branch 0 taken 80% (fallthrough) branch 1 taken 20% 21854: 116: M[to_proc/8] |= static_cast(msg[8*(to_proc/8)+j]) << (8*j); -: 117: } -: 118: 34478: 119: m_threefish->skein_feedfwd(M, m_T); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 120: -: 121: // clear first flag if set 34478: 122: m_T[1] &= ~(static_cast(1) << 62); branch 0 taken 14% branch 1 taken 86% (fallthrough) -: 123: 34478: 124: msg_len -= to_proc; 34478: 125: msg += to_proc; 34478: 126: } while(msg_len); branch 0 taken 14% branch 1 taken 86% (fallthrough) 29773: 127: } -: 128: function _ZN5Botan9Skein_5128add_dataEPKhm called 16833 returned 100% blocks executed 100% 16833: 129:void Skein_512::add_data(const uint8_t input[], size_t length) -: 130: { 16833: 131: if(length == 0) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 132: return; -: 133: 14757: 134: if(m_buf_pos) branch 0 taken 58% (fallthrough) branch 1 taken 42% -: 135: { 8576: 136: buffer_insert(m_buffer, m_buf_pos, input, length); call 0 returned 100% 8576: 137: if(m_buf_pos + length > 64) branch 0 taken 25% (fallthrough) branch 1 taken 75% -: 138: { 2179: 139: ubi_512(m_buffer.data(), m_buffer.size()); call 0 returned 100% -: 140: 2179: 141: input += (64 - m_buf_pos); 2179: 142: length -= (64 - m_buf_pos); 2179: 143: m_buf_pos = 0; -: 144: } -: 145: } -: 146: 14757: 147: const size_t full_blocks = (length - 1) / 64; -: 148: 14757: 149: if(full_blocks) branch 0 taken 27% (fallthrough) branch 1 taken 73% 3922: 150: ubi_512(input, 64*full_blocks); call 0 returned 100% -: 151: 14757: 152: length -= full_blocks * 64; -: 153: 14757: 154: buffer_insert(m_buffer, m_buf_pos, input + full_blocks * 64, length); call 0 returned 100% 14757: 155: m_buf_pos += length; -: 156: } -: 157: function _ZN5Botan9Skein_51212final_resultEPh called 6168 returned 100% blocks executed 100% 6168: 158:void Skein_512::final_result(uint8_t out[]) -: 159: { 6168: 160: m_T[1] |= (static_cast(1) << 63); // final block flag -: 161: 199722: 162: for(size_t i = m_buf_pos; i != m_buffer.size(); ++i) branch 0 taken 97% (fallthrough) branch 1 taken 3% 193554: 163: m_buffer[i] = 0; -: 164: 6168: 165: ubi_512(m_buffer.data(), m_buf_pos); call 0 returned 100% -: 166: 6168: 167: const uint8_t counter[8] = { 0 }; -: 168: 6168: 169: reset_tweak(SKEIN_OUTPUT, true); call 0 returned 100% 6168: 170: ubi_512(counter, sizeof(counter)); call 0 returned 100% -: 171: 6168: 172: copy_out_vec_le(out, m_output_bits / 8, m_threefish->m_K); call 0 returned 100% -: 173: 6168: 174: m_buf_pos = 0; 6168: 175: initial_block(); call 0 returned 100% 6168: 176: } -: 177: -: 178:} <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#throw_exception.hpp.gcov -: 0:Source:/usr/include/boost/throw_exception.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:#ifndef UUID_AA15E74A856F11E08B8D93F24824019B -: 2:#define UUID_AA15E74A856F11E08B8D93F24824019B -: 3: -: 4:// MS compatible compilers support #pragma once -: 5: -: 6:#if defined(_MSC_VER) && (_MSC_VER >= 1020) -: 7:# pragma once -: 8:#endif -: 9: -: 10:// -: 11:// boost/throw_exception.hpp -: 12:// -: 13:// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -: 14:// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc. -: 15:// -: 16:// Distributed under the Boost Software License, Version 1.0. (See -: 17:// accompanying file LICENSE_1_0.txt or copy at -: 18:// http://www.boost.org/LICENSE_1_0.txt) -: 19:// -: 20:// http://www.boost.org/libs/utility/throw_exception.html -: 21:// -: 22: -: 23:#include -: 24:#include -: 25:#include -: 26: -: 27:#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) ) -: 28:# define BOOST_EXCEPTION_DISABLE -: 29:#endif -: 30: -: 31:#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 ) -: 32:# define BOOST_EXCEPTION_DISABLE -: 33:#endif -: 34: -: 35:#if !defined( BOOST_EXCEPTION_DISABLE ) -: 36:# include -: 37:#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION) -: 38:# include -: 39:# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION -: 40:#endif -: 41:# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__) -: 42:#else -: 43:# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) -: 44:#endif -: 45: -: 46:#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) -: 47:#pragma GCC system_header -: 48:#endif -: 49:#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) -: 50:#pragma warning(push,1) -: 51:#endif -: 52: -: 53:namespace boost -: 54:{ -: 55:#ifdef BOOST_NO_EXCEPTIONS -: 56: -: 57:BOOST_NORETURN void throw_exception( std::exception const & e ); // user defined -: 58: -: 59:#else -: 60: #####: 61:inline void throw_exception_assert_compatibility( std::exception const & ) { } -: 62: #####: 63:template BOOST_NORETURN inline void throw_exception( E const & e ) -: 64:{ -: 65: //All boost exceptions are required to derive from std::exception, -: 66: //to ensure compatibility with BOOST_NO_EXCEPTIONS. #####: 67: throw_exception_assert_compatibility(e); -: 68: -: 69:#ifndef BOOST_EXCEPTION_DISABLE #####: 70: throw exception_detail::enable_both( e ); -: 71:#else -: 72: throw e; -: 73:#endif -: 74:} -: 75: -: 76:#endif -: 77: -: 78:#if !defined( BOOST_EXCEPTION_DISABLE ) -: 79: namespace -: 80: exception_detail -: 81: { -: 82: template -: 83: BOOST_NORETURN -: 84: void -: 85: throw_exception_( E const & x, char const * current_function, char const * file, int line ) -: 86: { -: 87: boost::throw_exception( -: 88: set_info( -: 89: set_info( -: 90: set_info( -: 91: enable_error_info(x), -: 92: throw_function(current_function)), -: 93: throw_file(file)), -: 94: throw_line(line))); -: 95: } -: 96: } -: 97:#endif -: 98:} // namespace boost -: 99: -: 100:#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) -: 101:#pragma warning(pop) -: 102:#endif -: 103:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#mem_pool.cpp.gcov -: 0:Source:src/fuzzer/mem_pool.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/mem_pool.gcno -: 0:Data:- -: 0:Runs:0 -: 1:/* -: 2:* (C) 2018 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:#include -: 11:#include -: 12:#include -: 13: -: 14:#include -: 15: -: 16:namespace { -: 17: #####: 18:size_t compute_expected_alignment(size_t plen) -: 19: { #####: 20: if(Botan::is_power_of_2(plen)) -: 21: { -: 22: return plen; -: 23: } -: 24: else -: 25: { #####: 26: return 8; -: 27: } -: 28: } -: 29: -: 30:struct RawPage -: 31: { -: 32: public: #####: 33: RawPage(void* p) : m_p(p) {} #####: 34: ~RawPage() { std::free(m_p); } -: 35: -: 36: RawPage(const RawPage& other) = default; -: 37: RawPage& operator=(const RawPage& other) = default; -: 38: #####: 39: RawPage(RawPage&& other) : m_p(nullptr) -: 40: { #####: 41: std::swap(m_p, other.m_p); -: 42: } -: 43: -: 44: RawPage& operator=(RawPage&& other) -: 45: { -: 46: if(this != &other) -: 47: { -: 48: std::swap(m_p, other.m_p); -: 49: } -: 50: return (*this); -: 51: } -: 52: #####: 53: void* ptr() const { return m_p; } call 0 never executed branch 1 never executed branch 2 never executed -: 54: private: -: 55: void* m_p; -: 56: }; -: 57: function _ZN12_GLOBAL__N_118allocate_raw_pagesEmm called 0 returned 0% blocks executed 0% #####: 58:std::vector allocate_raw_pages(size_t count, size_t page_size) -: 59: { #####: 60: std::vector pages; call 0 never executed branch 1 never executed branch 2 never executed #####: 61: pages.reserve(count); call 0 never executed branch 1 never executed branch 2 never executed -: 62: #####: 63: for(size_t i = 0; i != count; ++i) branch 0 never executed branch 1 never executed -: 64: { #####: 65: void* ptr = nullptr; -: 66: #####: 67: int rc = ::posix_memalign(&ptr, page_size, page_size); call 0 never executed #####: 68: FUZZER_ASSERT_EQUAL(rc, 0); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed branch 9 never executed branch 10 never executed call 11 never executed branch 12 never executed branch 13 never executed call 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed call 20 never executed branch 21 never executed branch 22 never executed call 23 never executed branch 24 never executed branch 25 never executed call 26 never executed -: 69: #####: 70: if(ptr) branch 0 never executed branch 1 never executed -: 71: { #####: 72: pages.push_back(RawPage(ptr)); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 73: } -: 74: } -: 75: #####: 76: return pages; -: 77: } -: 78: -: 79:} -: 80: function _Z4fuzzPKhm called 0 returned 0% blocks executed 0% #####: 81:void fuzz(const uint8_t in[], size_t in_len) -: 82: { #####: 83: const size_t page_count = 4; #####: 84: const size_t page_size = 4096; -: 85: -: 86: // static to avoid repeated allocations #####: 87: static std::vector raw_mem = allocate_raw_pages(page_count, page_size); branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed call 9 never executed call 10 never executed -: 88: #####: 89: std::vector mem_pages; call 0 never executed branch 1 never executed branch 2 never executed #####: 90: mem_pages.reserve(raw_mem.size()); call 0 never executed branch 1 never executed branch 2 never executed #####: 91: for(size_t i = 0; i != raw_mem.size(); ++i) branch 0 never executed branch 1 never executed #####: 92: mem_pages.push_back(raw_mem[i].ptr()); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 93: #####: 94: Botan::Memory_Pool pool(mem_pages, page_size); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 95: std::map ptrs; call 0 never executed -: 96: #####: 97: while(in_len > 0) branch 0 never executed branch 1 never executed -: 98: { #####: 99: const uint8_t op = in[0] % 2; #####: 100: size_t idx = (in[0] >> 1); #####: 101: in += 1; #####: 102: in_len -= 1; -: 103: #####: 104: if(in_len > 0 && idx < 4) branch 0 never executed branch 1 never executed -: 105: { #####: 106: idx = idx * 256 + in[0]; #####: 107: in += 1; #####: 108: in_len -= 1; -: 109: } -: 110: -: 111: //printf("%d %d\n", op, idx); -: 112: #####: 113: if(op == 0) branch 0 never executed branch 1 never executed -: 114: { #####: 115: const size_t plen = idx + 1; // ensure non-zero #####: 116: uint8_t* p = static_cast(pool.allocate(plen)); call 0 never executed branch 1 never executed branch 2 never executed -: 117: #####: 118: if(p) branch 0 never executed branch 1 never executed -: 119: { #####: 120: const size_t expected_alignment = compute_expected_alignment(plen); branch 0 never executed branch 1 never executed #####: 121: const size_t alignment = reinterpret_cast(p) % expected_alignment; #####: 122: if(alignment != 0) branch 0 never executed branch 1 never executed -: 123: { #####: 124: FUZZER_WRITE_AND_CRASH("Pointer allocated non-aligned pointer " << static_cast(p) << " for len " << plen 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 -: 125: << " expected " << expected_alignment << " got " << alignment); -: 126: } -: 127: -: 128: //printf("alloc %d -> %p\n", plen, p); -: 129: #####: 130: for(size_t i = 0; i != plen; ++i) branch 0 never executed branch 1 never executed -: 131: { #####: 132: if(p[i] != 0) branch 0 never executed branch 1 never executed -: 133: { #####: 134: FUZZER_WRITE_AND_CRASH("Pool gave out non-zeroed memory"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 135: } -: 136: } -: 137: -: 138: // verify it becomes zeroed later #####: 139: std::memset(p, idx, plen); call 0 never executed branch 1 never executed branch 2 never executed -: 140: #####: 141: auto insert = ptrs.insert(std::make_pair(p, plen)); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed #####: 142: if(insert.second == false) branch 0 never executed branch 1 never executed -: 143: { #####: 144: FUZZER_WRITE_AND_CRASH("Pointer " << static_cast(p) << " already existed\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 -: 145: } -: 146: #####: 147: auto itr = insert.first; -: 148: -: 149: // Verify this pointer doesn't overlap with the one before it #####: 150: if(itr != ptrs.begin()) branch 0 never executed branch 1 never executed -: 151: { #####: 152: auto before = std::prev(itr); call 0 never executed #####: 153: auto ptr_before = *before; branch 0 never executed branch 1 never executed -: 154: #####: 155: if(ptr_before.first + ptr_before.second > p) branch 0 never executed branch 1 never executed -: 156: { #####: 157: FUZZER_WRITE_AND_CRASH("Previous " << static_cast(ptr_before.first) << "/" << ptr_before.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 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 -: 158: " overlaps with new " << static_cast(p)); -: 159: } -: 160: } -: 161: #####: 162: auto after = std::next(itr); call 0 never executed -: 163: #####: 164: if(after != ptrs.end()) branch 0 never executed branch 1 never executed -: 165: { #####: 166: if(p + plen > after->first) branch 0 never executed branch 1 never executed -: 167: { #####: 168: FUZZER_WRITE_AND_CRASH("New " << static_cast(p) << "/" << plen 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 -: 169: << " overlaps following " << static_cast(after->first)); -: 170: } -: 171: } -: 172: } -: 173: } #####: 174: else if(op == 1) -: 175: { #####: 176: if(ptrs.empty()) branch 0 never executed branch 1 never executed #####: 177: return; call 0 never executed -: 178: #####: 179: size_t which_ptr = idx % ptrs.size(); -: 180: #####: 181: auto itr = ptrs.begin(); -: 182: #####: 183: while(which_ptr-- > 0) -: 184: { #####: 185: ++itr; branch 0 never executed branch 1 never executed -: 186: } -: 187: -: 188: //printf("free %p %d\n", itr->first, itr->second); #####: 189: FUZZER_ASSERT_TRUE(pool.deallocate(itr->first, itr->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 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 #####: 190: ptrs.erase(itr); call 0 never executed -: 191: } -: 192: } -: 193: } <<<<<< EOF # path=/home/runner/work/botan/botan/src#tests#test_hash.cpp.gcov -: 0:Source:src/tests/test_hash.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_hash.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_hash.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2014,2015,2018,2019 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#include "tests.h" -: 8: -: 9:#if defined(BOTAN_HAS_HASH) -: 10: #include -: 11:#endif -: 12: -: 13:namespace Botan_Tests { -: 14: -: 15:#if defined(BOTAN_HAS_HASH) -: 16: -: 17:namespace { -: 18: 1: 19:class Invalid_Hash_Name_Tests final : public Test -: 20: { -: 21: public: function _ZN11Botan_Tests12_GLOBAL__N_123Invalid_Hash_Name_Tests3runEv called 1 returned 100% blocks executed 41% 1: 22: std::vector run() override -: 23: { 1: 24: Test::Result result("Invalid HashFunction names"); call 0 returned 100% branch 1 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: 25: test_invalid_name(result, "NonExistentHash"); call 0 returned 100% branch 1 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% 2: 26: test_invalid_name(result, "Blake2b(9)", "Bad output bits size for BLAKE2b"); call 0 returned 100% branch 1 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% 2: 27: test_invalid_name(result, "Comb4P(MD5,MD5)", "Comb4P: Must use two distinct hashes"); call 0 returned 100% branch 1 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% 2: 28: test_invalid_name(result, "Comb4P(MD5,SHA-256)", "Comb4P: Incompatible hashes MD5 and SHA-256"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% 2: 29: test_invalid_name(result, "Tiger(168)", "Tiger: Illegal hash output size: 168"); call 0 returned 100% branch 1 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% 2: 30: test_invalid_name(result, "Tiger(20,2)", "Tiger: Invalid number of passes: 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) branch 9 taken 100% (fallthrough) branch 10 taken 0% 2: 31: test_invalid_name(result, "Keccak-1600(160)", "Keccak_1600: Invalid output length 160"); call 0 returned 100% branch 1 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% 2: 32: test_invalid_name(result, "SHA-3(160)", "SHA_3: Invalid output length 160"); call 0 returned 100% branch 1 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% -: 33: 2: 34: return {result}; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 0% (throw) branch 5 taken 100% (fallthrough) branch 6 taken 50% (fallthrough) branch 7 taken 50% call 8 returned 100% call 9 returned 100% branch 10 never executed branch 11 never executed call 12 never executed call 13 never executed -: 35: } -: 36: -: 37: private: -: 38: void test_invalid_name(Result& result, -: 39: const std::string& name, -: 40: const std::string& expected_msg = "") const -: 41: { -: 42: try -: 43: { -: 44: auto hash = Botan::HashFunction::create_or_throw(name); -: 45: result.test_failure("Was successfully able to create " + name); -: 46: } -: 47: catch(Botan::Invalid_Argument& e) -: 48: { -: 49: const std::string msg = e.what(); -: 50: const std::string full_msg = "" + expected_msg; -: 51: result.test_eq("expected error message", msg, full_msg); -: 52: } -: 53: catch(Botan::Lookup_Error& e) -: 54: { -: 55: const std::string algo_not_found_msg = "Unavailable Hash " + name; -: 56: const std::string msg = e.what(); -: 57: result.test_eq("expected error message", msg, algo_not_found_msg); -: 58: } -: 59: catch(std::exception& e) -: 60: { -: 61: result.test_failure("some unknown exception", e.what()); -: 62: } -: 63: catch(...) -: 64: { -: 65: result.test_failure("some unknown exception"); -: 66: } -: 67: } -: 68: }; -: 69: -: 70:BOTAN_REGISTER_TEST("hash", "invalid_name_hash", Invalid_Hash_Name_Tests); -: 71: -: 72:class Hash_Function_Tests final : public Text_Based_Test -: 73: { -: 74: public: function _ZN11Botan_Tests12_GLOBAL__N_119Hash_Function_TestsC2Ev called 1 returned 100% blocks executed 31% 2: 75: Hash_Function_Tests() : Text_Based_Test("hash", "In,Out") {} call 0 returned 100% branch 1 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% -: 76: function _ZN11Botan_Tests12_GLOBAL__N_119Hash_Function_Tests18possible_providersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 6823 returned 100% blocks executed 83% 6823: 77: std::vector possible_providers(const std::string& algo) override -: 78: { 6823: 79: return provider_filter(Botan::HashFunction::providers(algo)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed -: 80: } -: 81: function _ZN11Botan_Tests12_GLOBAL__N_119Hash_Function_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 6823 returned 100% blocks executed 44% 6823: 82: Test::Result run_one_test(const std::string& algo, const VarMap& vars) override -: 83: { 13646: 84: const std::vector input = vars.get_req_bin("In"); call 0 returned 100% branch 1 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 13646: 85: const std::vector expected = vars.get_req_bin("Out"); call 0 returned 100% 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% -: 86: 6823: 87: Test::Result result(algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 88: 13646: 89: const std::vector providers = possible_providers(algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 90: 6823: 91: if(providers.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 92: { #####: 93: result.note_missing("hash " + algo); 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 #####: 94: return result; -: 95: } -: 96: 13646: 97: for(auto const& provider_ask : providers) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 98: { 13646: 99: std::unique_ptr hash(Botan::HashFunction::create(algo, provider_ask)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 100: 6823*: 101: if(!hash) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 102: { #####: 103: result.test_failure("Hash " + algo + " supported by " + provider_ask + " but not found"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed call 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed #####: 104: continue; branch 0 never executed branch 1 never executed -: 105: } -: 106: 13646: 107: std::unique_ptr clone(hash->clone()); call 0 returned 100% 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% -: 108: 13646: 109: const std::string provider(hash->provider()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 6823: 110: result.test_is_nonempty("provider", 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) 6823: 111: result.test_eq(provider, hash->name(), algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 13646: 112: result.test_eq(provider, hash->name(), clone->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) branch 9 taken 16% (fallthrough) branch 10 taken 84% branch 11 never executed branch 12 never executed -: 113: 6823: 114: hash->update(input); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 13646: 115: result.test_eq(provider, "hashing", hash->final(), expected); call 0 returned 100% branch 1 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% -: 116: 6823: 117: clone->update(input); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 13646: 118: result.test_eq(provider, "hashing (clone)", clone->final(), expected); call 0 returned 100% branch 1 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% -: 119: -: 120: // Test to make sure clear() resets what we need it to 13646: 121: hash->update("some discarded input"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 6823: 122: hash->clear(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6823: 123: hash->update(nullptr, 0); // this should be effectively ignored call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6823: 124: hash->update(input); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 125: 13646: 126: result.test_eq(provider, "hashing after clear", hash->final(), expected); call 0 returned 100% branch 1 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 never executed branch 12 never executed -: 127: -: 128: // Test that misaligned inputs work -: 129: 6823: 130: if(input.size() > 0) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 131: { 13542: 132: std::vector misaligned = input; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6771: 133: const size_t current_alignment = reinterpret_cast(misaligned.data()) % 16; -: 134: 6771: 135: const size_t bytes_to_misalign = 15 - current_alignment; -: 136: 108336: 137: for(size_t i = 0; i != bytes_to_misalign; ++i) branch 0 taken 94% (fallthrough) branch 1 taken 6% 101565: 138: misaligned.insert(misaligned.begin(), 0x23); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 139: 6771: 140: hash->update(&misaligned[bytes_to_misalign], input.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 20313: 141: result.test_eq(provider, "hashing misaligned data", hash->final(), expected); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed -: 142: } -: 143: 6823: 144: if(input.size() > 5) branch 0 taken 96% (fallthrough) branch 1 taken 4% -: 145: { 6555: 146: hash->update(input[0]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 147: 13110: 148: std::unique_ptr fork = hash->copy_state(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 149: // verify fork copy doesn't affect original computation 6555: 150: fork->update(&input[1], input.size() - 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 151: -: 152: size_t so_far = 1; 54226: 153: while(so_far < input.size()) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 154: { 47671: 155: size_t take = Test::rng().next_byte() % (input.size() - so_far); call 0 returned 100% 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 14% (fallthrough) branch 7 taken 86% -: 156: 47671: 157: if(input.size() - so_far == 1) branch 0 taken 14% (fallthrough) branch 1 taken 86% 6555: 158: take = 1; -: 159: 47671: 160: hash->update(&input[so_far], take); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 47671: 161: so_far += take; -: 162: } 13110: 163: result.test_eq(provider, "hashing split", hash->final(), expected); call 0 returned 100% branch 1 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% -: 164: 6555: 165: fork->update(&input[input.size() - 1], 1); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 19665: 166: result.test_eq(provider, "hashing split", fork->final(), expected); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed -: 167: } -: 168: 6823: 169: if(hash->hash_block_size() > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 99% (fallthrough) branch 4 taken 1% -: 170: { -: 171: // GOST-34.11 uses 32 byte block 13448: 172: result.test_gte("If hash_block_size is set, it is large", hash->hash_block_size(), 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% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) -: 173: } -: 174: } -: 175: -: 176: return result; -: 177: } -: 178: -: 179: }; -: 180: -: 181:BOTAN_REGISTER_TEST("hash", "hash", Hash_Function_Tests); -: 182: -: 183:class Hash_NIST_MonteCarlo_Tests final : public Text_Based_Test -: 184: { -: 185: public: function _ZN11Botan_Tests12_GLOBAL__N_126Hash_NIST_MonteCarlo_TestsC2Ev called 1 returned 100% blocks executed 38% 3: 186: Hash_NIST_MonteCarlo_Tests() : Text_Based_Test("hash_mc.vec", "Seed,Count,Output") {} call 0 returned 100% branch 1 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 taken 0% (fallthrough) branch 15 taken 100% -: 187: function _ZN11Botan_Tests12_GLOBAL__N_126Hash_NIST_MonteCarlo_Tests18possible_providersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 7 returned 100% blocks executed 83% 7: 188: std::vector possible_providers(const std::string& algo) override -: 189: { 7: 190: return provider_filter(Botan::HashFunction::providers(algo)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed -: 191: } -: 192: function _ZN11Botan_Tests12_GLOBAL__N_126Hash_NIST_MonteCarlo_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 7 returned 100% blocks executed 43% 7: 193: Test::Result run_one_test(const std::string& algo, const VarMap& vars) override -: 194: { 14: 195: const std::vector seed = vars.get_req_bin("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) call 6 never executed 7: 196: const size_t count = vars.get_req_sz("Count"); call 0 returned 100% 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% 14: 197: const std::vector expected = vars.get_req_bin("Output"); call 0 returned 100% 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% -: 198: 7: 199: Test::Result result("NIST Monte Carlo " + algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 never executed branch 7 never executed -: 200: 14: 201: const std::vector providers = possible_providers(algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 202: 7: 203: if(providers.empty()) branch 0 taken 86% (fallthrough) branch 1 taken 14% -: 204: { 1: 205: result.note_missing("hash " + algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 never executed 1: 206: return result; -: 207: } -: 208: 12: 209: for(auto const& provider_ask : providers) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 210: { 12: 211: std::unique_ptr hash(Botan::HashFunction::create(algo, provider_ask)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 212: 6*: 213: if(!hash) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 214: { #####: 215: result.test_failure("Hash " + algo + " supported by " + provider_ask + " but not found"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed call 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed #####: 216: continue; branch 0 never executed branch 1 never executed -: 217: } -: 218: 12: 219: std::vector> input; 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 6: 220: input.push_back(seed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 221: input.push_back(seed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 6: 222: input.push_back(seed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 223: 12: 224: std::vector buf(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 returned 100% -: 225: 606: 226: for(size_t j = 0; j <= count; ++j) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 227: { 600600: 228: for(size_t i = 3; i != 1003; ++i) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 229: { 600000: 230: hash->update(input[0]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 600000: 231: hash->update(input[1]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 600000: 232: hash->update(input[2]); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 233: 600000: 234: hash->final(input[0].data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 600000: 235: input[0].swap(input[1]); 600000: 236: input[1].swap(input[2]); -: 237: } -: 238: 600: 239: if(j < count) branch 0 taken 99% (fallthrough) branch 1 taken 1% -: 240: { 594: 241: input[0] = input[2]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 594: 242: input[1] = input[2]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 243: } -: 244: } -: 245: 12: 246: result.test_eq("Output is expected", input[2], expected); call 0 returned 100% 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% -: 247: } -: 248: -: 249: return result; -: 250: } -: 251: }; -: 252: -: 253:BOTAN_REGISTER_TEST("hash", "hash_nist_mc", Hash_NIST_MonteCarlo_Tests); -: 254: -: 255:class Hash_LongRepeat_Tests final : public Text_Based_Test -: 256: { -: 257: public: function _ZN11Botan_Tests12_GLOBAL__N_121Hash_LongRepeat_TestsC2Ev called 1 returned 100% blocks executed 38% 3: 258: Hash_LongRepeat_Tests() : Text_Based_Test("hash_rep.vec", "Input,TotalLength,Digest") {} call 0 returned 100% branch 1 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 taken 0% (fallthrough) branch 15 taken 100% -: 259: function _ZN11Botan_Tests12_GLOBAL__N_121Hash_LongRepeat_Tests18possible_providersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 19 returned 100% blocks executed 83% 19: 260: std::vector possible_providers(const std::string& algo) override -: 261: { 19: 262: return provider_filter(Botan::HashFunction::providers(algo)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed -: 263: } -: 264: -: 265: // repeating the output several times reduces buffering overhead during processing function _ZN11Botan_Tests12_GLOBAL__N_121Hash_LongRepeat_Tests12expand_inputERKSt6vectorIhSaIhEEm called 19 returned 100% blocks executed 70% 19: 266: static std::vector expand_input(const std::vector& input, size_t min_len) -: 267: { 19: 268: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 19: 269: output.reserve(min_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 270: 2615: 271: while(output.size() < min_len) branch 0 taken 99% (fallthrough) branch 1 taken 1% 2596: 272: output.insert(output.end(), input.begin(), input.end()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 273: 19: 274: return output; -: 275: } -: 276: function _ZN11Botan_Tests12_GLOBAL__N_121Hash_LongRepeat_Tests12run_one_testERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6VarMapE called 19 returned 100% blocks executed 36% 19: 277: Test::Result run_one_test(const std::string& algo, const VarMap& vars) override -: 278: { 57: 279: const std::vector input = expand_input(vars.get_req_bin("Input"), 256); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% branch 11 never executed branch 12 never executed call 13 never executed 19: 280: const size_t total_len = vars.get_req_sz("TotalLength"); call 0 returned 100% 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% 38: 281: const std::vector expected = vars.get_req_bin("Digest"); call 0 returned 100% 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% -: 282: 19: 283: Test::Result result("Long input " + algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 never executed branch 7 never executed -: 284: 38: 285: const std::vector providers = possible_providers(algo); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% -: 286: 19: 287: if(total_len > 1000000 && Test::run_long_tests() == false) branch 0 taken 47% (fallthrough) branch 1 taken 53% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 288: { -: 289: return result; -: 290: } -: 291: 19: 292: if(providers.empty()) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 293: { #####: 294: result.note_missing("hash " + algo); 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 #####: 295: return result; -: 296: } -: 297: 38: 298: for(auto const& provider_ask : providers) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 299: { 38: 300: std::unique_ptr hash(Botan::HashFunction::create(algo, provider_ask)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 301: 19*: 302: if(!hash) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 303: { #####: 304: result.test_failure("Hash " + algo + " supported by " + provider_ask + " but not found"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed call 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed branch 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed #####: 305: continue; branch 0 never executed branch 1 never executed -: 306: } -: 307: 19: 308: const size_t full_inputs = total_len / input.size(); 19: 309: const size_t leftover = total_len % input.size(); -: 310: 37787815: 311: for(size_t i = 0; i != full_inputs; ++i) branch 0 taken 100% (fallthrough) branch 1 taken 1% 75575592: 312: hash->update(input); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 313: 19: 314: if(leftover > 0) branch 0 taken 53% (fallthrough) branch 1 taken 47% 10: 315: hash->update(input.data(), leftover); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 316: 38: 317: 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) branch 6 taken 100% (fallthrough) branch 7 taken 0% 19: 318: hash->final(output.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 38: 319: result.test_eq("Output is expected", output, expected); call 0 returned 100% 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% -: 320: } -: 321: -: 322: return result; -: 323: } -: 324: }; -: 325: -: 326:BOTAN_REGISTER_TEST("hash", "hash_rep", Hash_LongRepeat_Tests); -: 327: -: 328:} -: 329: -: 330:#endif -: 331: -: 332:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#curve25519.h.gcov -: 0:Source:build/include/botan/curve25519.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_c25519.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_c25519.gcda -: 0:Runs:1 -: 1:/* -: 2:* Curve25519 -: 3:* (C) 2014 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_CURVE_25519_H_ -: 9:#define BOTAN_CURVE_25519_H_ -: 10: -: 11:#include -: 12: -: 13:namespace Botan { -: 14: -: 15:class BOTAN_PUBLIC_API(2,0) Curve25519_PublicKey : public virtual Public_Key -: 16: { -: 17: public: -: 18: std::string algo_name() const override { return "Curve25519"; } -: 19: -: 20: size_t estimated_strength() const override { return 128; } -: 21: -: 22: size_t key_length() const override { return 255; } -: 23: -: 24: bool check_key(RandomNumberGenerator& rng, bool strong) const override; -: 25: -: 26: AlgorithmIdentifier algorithm_identifier() const override; -: 27: -: 28: std::vector public_key_bits() const override; -: 29: 20: 30: std::vector public_value() const { return m_public; } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 31: -: 32: /** -: 33: * Create a Curve25519 Public Key. -: 34: * @param alg_id the X.509 algorithm identifier -: 35: * @param key_bits DER encoded public key bits -: 36: */ -: 37: Curve25519_PublicKey(const AlgorithmIdentifier& alg_id, -: 38: const std::vector& key_bits); -: 39: -: 40: /** -: 41: * Create a Curve25519 Public Key. -: 42: * @param pub 32-byte raw public key -: 43: */ -: 44: explicit Curve25519_PublicKey(const std::vector& pub) : m_public(pub) {} -: 45: -: 46: /** -: 47: * Create a Curve25519 Public Key. -: 48: * @param pub 32-byte raw public key -: 49: */ -: 50: explicit Curve25519_PublicKey(const secure_vector& pub) : -: 51: m_public(pub.begin(), pub.end()) {} -: 52: -: 53: protected: -: 54: Curve25519_PublicKey() = default; -: 55: std::vector m_public; -: 56: }; -: 57: -: 58:class BOTAN_PUBLIC_API(2,0) Curve25519_PrivateKey final : public Curve25519_PublicKey, -: 59: public virtual Private_Key, -: 60: public virtual PK_Key_Agreement_Key -: 61: { -: 62: public: -: 63: /** -: 64: * Construct a private key from the specified parameters. -: 65: * @param alg_id the X.509 algorithm identifier -: 66: * @param key_bits PKCS #8 structure -: 67: */ -: 68: Curve25519_PrivateKey(const AlgorithmIdentifier& alg_id, -: 69: const secure_vector& key_bits); -: 70: -: 71: /** -: 72: * Generate a private key. -: 73: * @param rng the RNG to use -: 74: */ -: 75: explicit Curve25519_PrivateKey(RandomNumberGenerator& rng); -: 76: -: 77: /** -: 78: * Construct a private key from the specified parameters. -: 79: * @param secret_key the private key -: 80: */ -: 81: explicit Curve25519_PrivateKey(const secure_vector& secret_key); -: 82: -: 83: std::vector public_value() const override { return Curve25519_PublicKey::public_value(); } -: 84: -: 85: secure_vector agree(const uint8_t w[], size_t w_len) const; -: 86: -: 87: const secure_vector& get_x() const { return m_private; } -: 88: -: 89: secure_vector private_key_bits() const override; -: 90: -: 91: bool check_key(RandomNumberGenerator& rng, bool strong) const override; -: 92: -: 93: std::unique_ptr -: 94: create_key_agreement_op(RandomNumberGenerator& rng, -: 95: const std::string& params, -: 96: const std::string& provider) const override; -: 97: -: 98: private: -: 99: secure_vector m_private; -: 100: }; -: 101: -: 102:typedef Curve25519_PublicKey X25519_PublicKey; -: 103:typedef Curve25519_PrivateKey X25519_PrivateKey; -: 104: -: 105:/* -: 106:* The types above are just wrappers for curve25519_donna, plus defining -: 107:* encodings for public and private keys. -: 108:*/ -: 109:void BOTAN_PUBLIC_API(2,0) curve25519_donna(uint8_t mypublic[32], -: 110: const uint8_t secret[32], -: 111: const uint8_t basepoint[32]); -: 112: -: 113:/** -: 114:* Exponentiate by the x25519 base point -: 115:* @param mypublic output value -: 116:* @param secret random scalar -: 117:*/ -: 118:void BOTAN_PUBLIC_API(2,0) curve25519_basepoint(uint8_t mypublic[32], -: 119: const uint8_t secret[32]); -: 120: -: 121:} -: 122: -: 123:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#xmss_wots.h.gcov -: 0:Source:build/include/botan/xmss_wots.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_xmss_signature.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_xmss_signature.gcda -: 0:Runs:2960 -: 1:/* -: 2: * XMSS WOTS -: 3: * (C) 2016,2018 Matthias Gierlings -: 4: * -: 5: * Botan is released under the Simplified BSD License (see license.txt) -: 6: **/ -: 7: -: 8:#ifndef BOTAN_XMSS_WOTS_H_ -: 9:#define BOTAN_XMSS_WOTS_H_ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18:#include -: 19:#include -: 20:#include -: 21: -: 22:namespace Botan { -: 23: -: 24:/** -: 25: * Descibes a signature method for XMSS Winternitz One Time Signatures, -: 26: * as defined in: -: 27: * [1] XMSS: Extended Hash-Based Signatures, -: 28: * Request for Comments: 8391 -: 29: * Release: May 2018. -: 30: * https://datatracker.ietf.org/doc/rfc8391/ -: 31: **/ -: 32:class XMSS_WOTS_Parameters final -: 33: { -: 34: public: -: 35: enum ots_algorithm_t -: 36: { -: 37: WOTSP_SHA2_256 = 0x00000001, -: 38: WOTSP_SHA2_512 = 0x00000002, -: 39: WOTSP_SHAKE_256 = 0x00000003, -: 40: WOTSP_SHAKE_512 = 0x00000004 -: 41: }; -: 42: -: 43: XMSS_WOTS_Parameters(const std::string& algo_name); -: 44: XMSS_WOTS_Parameters(ots_algorithm_t ots_spec); -: 45: -: 46: static ots_algorithm_t xmss_wots_id_from_string(const std::string& param_set); -: 47: -: 48: /** -: 49: * Algorithm 1: convert input string to base. -: 50: * -: 51: * @param msg Input string (referred to as X in [1]). -: 52: * @param out_size size of message in base w. -: 53: * -: 54: * @return Input string converted to the given base. -: 55: **/ -: 56: secure_vector base_w(const secure_vector& msg, size_t out_size) const; -: 57: -: 58: secure_vector base_w(size_t value) const; -: 59: -: 60: void append_checksum(secure_vector& data); -: 61: -: 62: /** -: 63: * @return XMSS WOTS registry name for the chosen parameter set. -: 64: **/ -: 65: const std::string& name() const -: 66: { -: 67: return m_name; -: 68: } -: 69: -: 70: /** -: 71: * @return Botan name for the hash function used. -: 72: **/ -: 73: const std::string& hash_function_name() const -: 74: { -: 75: return m_hash_name; -: 76: } -: 77: -: 78: /** -: 79: * Retrieves the uniform length of a message, and the size of -: 80: * each node. This correlates to XMSS parameter "n" defined -: 81: * in [1]. -: 82: * -: 83: * @return element length in bytes. -: 84: **/ -: 85: size_t element_size() const { return m_element_size; } -: 86: -: 87: /** -: 88: * The Winternitz parameter. -: 89: * -: 90: * @return numeric base used for internal representation of -: 91: * data. -: 92: **/ -: 93: size_t wots_parameter() const { return m_w; } -: 94: -: 95: size_t len() const { return m_len; } -: 96: -: 97: size_t len_1() const { return m_len_1; } -: 98: -: 99: size_t len_2() const { return m_len_2; } -: 100: -: 101: size_t lg_w() const { return m_lg_w; } -: 102: -: 103: ots_algorithm_t oid() const { return m_oid; } -: 104: -: 105: size_t estimated_strength() const { return m_strength; } -: 106: -: 107: bool operator==(const XMSS_WOTS_Parameters& p) const -: 108: { -: 109: return m_oid == p.m_oid; -: 110: } -: 111: -: 112: private: -: 113: static const std::map m_oid_name_lut; -: 114: ots_algorithm_t m_oid; -: 115: std::string m_name; -: 116: std::string m_hash_name; -: 117: size_t m_element_size; -: 118: size_t m_w; -: 119: size_t m_len_1; -: 120: size_t m_len_2; -: 121: size_t m_len; -: 122: size_t m_strength; -: 123: uint8_t m_lg_w; -: 124: }; -: 125: -: 126:class XMSS_Address; -: 127: -: 128:typedef std::vector> wots_keysig_t; -: 129: -: 130:/** -: 131: * A Winternitz One Time Signature public key for use with Extended Hash-Based -: 132: * Signatures. -: 133: **/ -: 134:class XMSS_WOTS_PublicKey : virtual public Public_Key -: 135: { -: 136: public: 162: 137: class TreeSignature final call 0 returned 100% call 1 returned 100% -: 138: { -: 139: public: 1399: 140: TreeSignature() = default; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 141: -: 142: TreeSignature(const wots_keysig_t& ots_sig, -: 143: const wots_keysig_t& auth_path) -: 144: : m_ots_sig(ots_sig), m_auth_path(auth_path) -: 145: {} -: 146: -: 147: TreeSignature(wots_keysig_t&& ots_sig, -: 148: wots_keysig_t&& auth_path) -: 149: : m_ots_sig(std::move(ots_sig)), -: 150: m_auth_path(std::move(auth_path)) -: 151: {} -: 152: 15: 153: const wots_keysig_t& ots_signature() const -: 154: { 15: 155: return m_ots_sig; -: 156: } -: 157: 367293: 158: wots_keysig_t& ots_signature() -: 159: { 244862: 160: return m_ots_sig; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 161: } -: 162: 15: 163: const wots_keysig_t& authentication_path() const -: 164: { 15: 165: return m_auth_path; -: 166: } -: 167: 52722: 168: wots_keysig_t& authentication_path() -: 169: { 35148: 170: return m_auth_path; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) -: 171: } -: 172: -: 173: private: -: 174: wots_keysig_t m_ots_sig; -: 175: wots_keysig_t m_auth_path; -: 176: }; -: 177: -: 178: /** -: 179: * Creates a XMSS_WOTS_PublicKey for the signature method identified by -: 180: * oid. The public seed for this key will be initialized with a -: 181: * uniformly random n-byte value, where "n" is the element size of the -: 182: * selected signature method. -: 183: * -: 184: * @param oid Identifier for the selected signature method. -: 185: **/ -: 186: XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid) -: 187: : m_wots_params(oid), -: 188: m_hash(m_wots_params.hash_function_name()) {} -: 189: -: 190: /** -: 191: * Creates a XMSS_WOTS_PublicKey for the signature method identified by -: 192: * oid. The public seed for this key will be initialized with a -: 193: * uniformly random n-byte value, where "n" is the element size of the -: 194: * selected signature method. -: 195: * -: 196: * @param oid Identifier for the selected signature method. -: 197: * @param rng A random number generate used to generate the public seed. -: 198: **/ -: 199: XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 200: RandomNumberGenerator& rng) -: 201: : m_wots_params(oid), -: 202: m_hash(m_wots_params.hash_function_name()), -: 203: m_public_seed(rng.random_vec(m_wots_params.element_size())) {} -: 204: -: 205: /** -: 206: * Creates a XMSS_WOTS_PrivateKey for the signature method identified by -: 207: * oid, with a precomputed public seed. -: 208: * -: 209: * @param oid Identifier for the selected signature method. -: 210: * @param public_seed A precomputed public seed of n-bytes length. -: 211: **/ -: 212: XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 213: secure_vector public_seed) -: 214: : m_wots_params(oid), -: 215: m_hash(m_wots_params.hash_function_name()), -: 216: m_public_seed(public_seed) {} -: 217: -: 218: /** -: 219: * Creates a XMSS_WOTS_PublicKey for the signature method identified by -: 220: * oid. The public seed will be initialized with a precomputed seed and -: 221: * and precomputed key data which should be derived from a -: 222: * XMSS_WOTS_PrivateKey. -: 223: * -: 224: * @param oid Ident:s/ifier for the selected signature methods. -: 225: * @param public_seed A precomputed public seed of n-bytes length. -: 226: * @param key Precomputed raw key data of the XMSS_WOTS_PublicKey. -: 227: **/ -: 228: XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 229: secure_vector&& public_seed, -: 230: wots_keysig_t&& key) -: 231: : m_wots_params(oid), -: 232: m_hash(m_wots_params.hash_function_name()), -: 233: m_key(std::move(key)), -: 234: m_public_seed(std::move(public_seed)) -: 235: {} -: 236: -: 237: /** -: 238: * Creates a XMSS_WOTS_PublicKey for the signature method identified by -: 239: * oid. The public seed will be initialized with a precomputed seed and -: 240: * and precomputed key data which should be derived from a -: 241: * XMSS_WOTS_PrivateKey. -: 242: * -: 243: * @param oid Identifier for the selected signature methods. -: 244: * @param public_seed A precomputed public seed of n-bytes length. -: 245: * @param key Precomputed raw key data of the XMSS_WOTS_PublicKey. -: 246: **/ -: 247: XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 248: const secure_vector& public_seed, -: 249: const wots_keysig_t& key) -: 250: : m_wots_params(oid), -: 251: m_hash(m_wots_params.hash_function_name()), -: 252: m_key(key), -: 253: m_public_seed(public_seed) -: 254: {} -: 255: -: 256: /** -: 257: * Creates a XMSS_WOTS_PublicKey form a message and signature using -: 258: * Algorithm 6 WOTS_pkFromSig defined in the XMSS standard. This -: 259: * overload is used to verify a message using a public key. -: 260: * -: 261: * @param oid WOTSP algorithm identifier. -: 262: * @param msg A message. -: 263: * @param sig A WOTS signature for msg. -: 264: * @param adrs An XMSS_Address. -: 265: * @param public_seed The public public_seed. -: 266: **/ -: 267: XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 268: const secure_vector& msg, -: 269: const wots_keysig_t& sig, -: 270: XMSS_Address& adrs, -: 271: const secure_vector& public_seed) -: 272: : m_wots_params(oid), -: 273: m_hash(m_wots_params.hash_function_name()), -: 274: m_key(pub_key_from_signature(msg, -: 275: sig, -: 276: adrs, -: 277: public_seed)), -: 278: m_public_seed(public_seed) -: 279: {} -: 280: -: 281: /** -: 282: * Retrieves the i-th element out of the length len chain of -: 283: * n-byte elements contained in the public key. -: 284: * -: 285: * @param i index of the element. -: 286: * @returns n-byte element addressed by i. -: 287: **/ -: 288: const secure_vector& operator[](size_t i) const { return m_key[i]; } -: 289: secure_vector& operator[](size_t i) { return m_key[i]; } -: 290: -: 291: /** -: 292: * Convert the key into the raw key data. The key becomes a length -: 293: * len vector of n-byte elements. -: 294: **/ -: 295: operator const wots_keysig_t& () const { return m_key; } -: 296: -: 297: /** -: 298: * Convert the key into the raw key data. The key becomes a length -: 299: * len vector of n-byte elements. -: 300: **/ -: 301: operator wots_keysig_t& () { return m_key; } -: 302: -: 303: const secure_vector& public_seed() const { return m_public_seed; } -: 304: -: 305: secure_vector& public_seed() { return m_public_seed; } -: 306: -: 307: void set_public_seed(const secure_vector& public_seed) -: 308: { -: 309: m_public_seed = public_seed; -: 310: } -: 311: -: 312: void set_public_seed(secure_vector&& public_seed) -: 313: { -: 314: m_public_seed = std::move(public_seed); -: 315: } -: 316: -: 317: const wots_keysig_t& key_data() const { return m_key; } -: 318: -: 319: wots_keysig_t& key_data() { return m_key; } -: 320: -: 321: void set_key_data(const wots_keysig_t& key_data) -: 322: { -: 323: m_key = key_data; -: 324: } -: 325: -: 326: void set_key_data(wots_keysig_t&& key_data) -: 327: { -: 328: m_key = std::move(key_data); -: 329: } -: 330: -: 331: const XMSS_WOTS_Parameters& wots_parameters() const -: 332: { -: 333: return m_wots_params; -: 334: } -: 335: -: 336: std::string algo_name() const override -: 337: { -: 338: return m_wots_params.name(); -: 339: } -: 340: -: 341: AlgorithmIdentifier algorithm_identifier() const override -: 342: { -: 343: throw Not_Implemented("No AlgorithmIdentifier available for XMSS-WOTS."); -: 344: } -: 345: -: 346: bool check_key(RandomNumberGenerator&, bool) const override -: 347: { -: 348: return true; -: 349: } -: 350: -: 351: size_t estimated_strength() const override -: 352: { -: 353: return m_wots_params.estimated_strength(); -: 354: } -: 355: -: 356: size_t key_length() const override -: 357: { -: 358: return m_wots_params.estimated_strength(); -: 359: } -: 360: -: 361: std::vector public_key_bits() const override -: 362: { -: 363: throw Not_Implemented("No key format defined for XMSS-WOTS"); -: 364: } -: 365: -: 366: bool operator==(const XMSS_WOTS_PublicKey& key) -: 367: { -: 368: return m_key == key.m_key; -: 369: } -: 370: -: 371: bool operator!=(const XMSS_WOTS_PublicKey& key) -: 372: { -: 373: return !(*this == key); -: 374: } -: 375: -: 376: protected: -: 377: /** -: 378: * Algorithm 2: Chaining Function. -: 379: * -: 380: * Takes an n-byte input string and transforms it into a the function -: 381: * result iterating the cryptographic hash function "F" steps times on -: 382: * the input x using the outputs of the PRNG "G". -: 383: * -: 384: * This overload is used in multithreaded scenarios, where it is -: 385: * required to provide seperate instances of XMSS_Hash to each -: 386: * thread. -: 387: * -: 388: * @param[out] x An n-byte input string, that will be transformed into -: 389: * the chaining function result. -: 390: * @param start_idx The start index. -: 391: * @param steps A number of steps. -: 392: * @param adrs An OTS Hash Address. -: 393: * @param public_seed A public seed. -: 394: * @param hash Instance of XMSS_Hash, that may only by the thead -: 395: * executing chain. -: 396: **/ -: 397: void chain(secure_vector& x, -: 398: size_t start_idx, -: 399: size_t steps, -: 400: XMSS_Address& adrs, -: 401: const secure_vector& public_seed, -: 402: XMSS_Hash& hash); -: 403: -: 404: /** -: 405: * Algorithm 2: Chaining Function. -: 406: * -: 407: * Takes an n-byte input string and transforms it into a the function -: 408: * result iterating the cryptographic hash function "F" steps times on -: 409: * the input x using the outputs of the PRNG "G". -: 410: * -: 411: * @param[out] x An n-byte input string, that will be transformed into -: 412: * the chaining function result. -: 413: * @param start_idx The start index. -: 414: * @param steps A number of steps. -: 415: * @param adrs An OTS Hash Address. -: 416: * @param public_seed A public seed. -: 417: **/ -: 418: inline void chain(secure_vector& x, -: 419: size_t start_idx, -: 420: size_t steps, -: 421: XMSS_Address& adrs, -: 422: const secure_vector& public_seed) -: 423: { -: 424: chain(x, start_idx, steps, adrs, public_seed, m_hash); -: 425: } -: 426: -: 427: XMSS_WOTS_Parameters m_wots_params; -: 428: XMSS_Hash m_hash; -: 429: wots_keysig_t m_key; -: 430: secure_vector m_public_seed; -: 431: -: 432: private: -: 433: /** -: 434: * Algorithm 6: "WOTS_pkFromSig" -: 435: * Computes a Winternitz One Time Signature+ public key from a message and -: 436: * its signature. -: 437: * -: 438: * @param msg A message. -: 439: * @param sig The signature for msg. -: 440: * @param adrs An address. -: 441: * @param public_seed A public_seed. -: 442: * -: 443: * @return Temporary WOTS+ public key. -: 444: **/ -: 445: wots_keysig_t pub_key_from_signature( -: 446: const secure_vector& msg, -: 447: const wots_keysig_t& sig, -: 448: XMSS_Address& adrs, -: 449: const secure_vector& public_seed); -: 450: }; -: 451: -: 452:/** A Winternitz One Time Signature private key for use with Extended Hash-Based -: 453: * Signatures. -: 454: **/ -: 455:class XMSS_WOTS_PrivateKey final : public virtual XMSS_WOTS_PublicKey, -: 456: public virtual Private_Key -: 457: { -: 458: public: -: 459: /** -: 460: * Creates a WOTS private key for the chosen XMSS WOTS signature method. -: 461: * Members need to be initialized manually. -: 462: * -: 463: * @param oid Identifier for the selected signature method. -: 464: **/ -: 465: XMSS_WOTS_PrivateKey(XMSS_WOTS_Parameters::ots_algorithm_t oid) -: 466: : XMSS_WOTS_PublicKey(oid) -: 467: {} -: 468: -: 469: /** -: 470: * Creates a WOTS private key for the chosen XMSS WOTS signature method. -: 471: * -: 472: * @param oid Identifier for the selected signature method. -: 473: * @param rng A random number generator to use for key generation. -: 474: **/ -: 475: XMSS_WOTS_PrivateKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 476: RandomNumberGenerator& rng) -: 477: : XMSS_WOTS_PublicKey(oid, rng), -: 478: m_private_seed(rng.random_vec(m_wots_params.element_size())) -: 479: { -: 480: set_key_data(generate(m_private_seed)); -: 481: } -: 482: -: 483: /** -: 484: * Constructs a WOTS private key. Chains will be generated on demand -: 485: * applying a hash function to a unique value generated from a secret -: 486: * seed and a counter. The secret seed of length n, will be -: 487: * automatically generated using AutoSeeded_RNG(). "n" equals -: 488: * the element size of the chosen WOTS security parameter set. -: 489: * -: 490: * @param oid Identifier for the selected signature method. -: 491: * @param public_seed A public seed used for the pseudo random generation -: 492: * of public keys derived from this private key. -: 493: * @param rng A random number generator to use for key generation. -: 494: **/ -: 495: XMSS_WOTS_PrivateKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 496: const secure_vector& public_seed, -: 497: RandomNumberGenerator& rng) -: 498: : XMSS_WOTS_PublicKey(oid, public_seed), -: 499: m_private_seed(rng.random_vec(m_wots_params.element_size())) -: 500: { -: 501: set_key_data(generate(m_private_seed)); -: 502: } -: 503: -: 504: /** -: 505: * Constructs a WOTS private key. Chains will be generated on demand -: 506: * applying a hash function to a unique value generated from a secret -: 507: * seed and a counter. The secret seed of length n, will be -: 508: * automatically generated using AutoSeeded_RNG(). "n" equals -: 509: * the element size of the chosen WOTS security parameter set. -: 510: * -: 511: * @param oid Identifier for the selected signature method. -: 512: * @param public_seed A public seed used for the pseudo random generation -: 513: * of public keys derived from this private key. -: 514: **/ -: 515: XMSS_WOTS_PrivateKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 516: const secure_vector& public_seed) -: 517: : XMSS_WOTS_PublicKey(oid, public_seed) -: 518: {} -: 519: -: 520: /** -: 521: * Constructs a WOTS private key. Chains will be generated on demand -: 522: * applying a hash function to a unique value generated from the -: 523: * secret seed and a counter. -: 524: * -: 525: * @param oid Identifier for the selected signature method. -: 526: * @param public_seed A public seed used for the pseudo random generation -: 527: * of public keys derived from this private key. -: 528: * @param private_seed A secret uniformly random n-byte value. -: 529: **/ -: 530: XMSS_WOTS_PrivateKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, -: 531: const secure_vector& public_seed, -: 532: const secure_vector& private_seed) -: 533: : XMSS_WOTS_PublicKey(oid, public_seed), -: 534: m_private_seed(private_seed) -: 535: { -: 536: set_key_data(generate(private_seed)); -: 537: } -: 538: -: 539: /** -: 540: * Retrieves the i-th WOTS private key using pseudo random key -: 541: * (re-)generation. -: 542: * -: 543: * This overload is used in multithreaded scenarios, where it is -: 544: * required to provide seperate instances of XMSS_Hash to each -: 545: * thread. -: 546: * -: 547: * @param i Index of the key to retrieve. -: 548: * @param hash Instance of XMSS_Hash, that may only be used by the -: 549: * thead executing at. -: 550: * -: 551: * @return WOTS secret key. -: 552: **/ -: 553: wots_keysig_t at(size_t i, XMSS_Hash& hash); -: 554: -: 555: /** -: 556: * Retrieves the i-th WOTS private key using pseudo random key -: 557: * (re-)generation. -: 558: * -: 559: * @param i Index of the key to retrieve. -: 560: * -: 561: * @return WOTS secret key. -: 562: **/ -: 563: inline wots_keysig_t operator[](size_t i) -: 564: { -: 565: return this->at(i, m_hash); -: 566: } -: 567: -: 568: /** -: 569: * Retrieves the i-th WOTS private key using pseudo random key -: 570: * (re-)generation. -: 571: * -: 572: * This overload is used in multithreaded scenarios, where it is -: 573: * required to provide seperate instances of XMSS_Hash to each -: 574: * thread. -: 575: * -: 576: * @param adrs The address of the key to retrieve. -: 577: * @param hash Instance of XMSS_Hash, that may only be used by the -: 578: * thead executing at. -: 579: * -: 580: * @return WOTS secret key. -: 581: **/ -: 582: wots_keysig_t at(const XMSS_Address& adrs, XMSS_Hash& hash); -: 583: -: 584: inline wots_keysig_t operator[](const XMSS_Address& adrs) -: 585: { -: 586: return this->at(adrs, m_hash); -: 587: } -: 588: -: 589: wots_keysig_t generate_private_key(const secure_vector& priv_seed); -: 590: -: 591: /** -: 592: * Algorithm 4: "WOTS_genPK" -: 593: * Generates a Winternitz One Time Signature+ (WOTS+) Public Key from a -: 594: * given private key. -: 595: * -: 596: * @param adrs Hash function address encoding the address of the WOTS+ -: 597: * key pair within a greater structure. -: 598: * -: 599: * @return A XMSS_WOTS_PublicKey. -: 600: **/ -: 601: XMSS_WOTS_PublicKey generate_public_key(XMSS_Address& adrs); -: 602: -: 603: /** -: 604: * Algorithm 4: "WOTS_genPK" -: 605: * Initializes a Winternitz One Time Signature+ (WOTS+) Public Key's -: 606: * key_data() member, with data derived from in_key_data using the -: 607: * WOTS chaining function. -: 608: * -: 609: * This overload is used in multithreaded scenarios, where it is -: 610: * required to provide seperate instances of XMSS_Hash to each -: 611: * thread. -: 612: * -: 613: * @param[out] pub_key Public key to initialize key_data() member on. -: 614: * @param in_key_data Input key material from private key used for -: 615: * public key generation. -: 616: * @param adrs Hash function address encoding the address of -: 617: * the WOTS+ key pair within a greater structure. -: 618: * @param hash Instance of XMSS_Hash, that may only by the thead -: 619: * executing generate_public_key. -: 620: **/ -: 621: void generate_public_key(XMSS_WOTS_PublicKey& pub_key, -: 622: wots_keysig_t&& in_key_data, -: 623: XMSS_Address& adrs, -: 624: XMSS_Hash& hash); -: 625: /** -: 626: * Algorithm 4: "WOTS_genPK" -: 627: * Initializes a Winternitz One Time Signature+ (WOTS+) Public Key's -: 628: * key_data() member, with data derived from in_key_data using the -: 629: * WOTS chaining function. -: 630: * -: 631: * @param[out] pub_key Public key to initialize key_data() member on. -: 632: * @param in_key_data Input key material from private key used for -: 633: * public key generation. -: 634: * @param adrs Hash function address encoding the address of -: 635: * the WOTS+ key pair within a greater structure. -: 636: **/ -: 637: inline void generate_public_key(XMSS_WOTS_PublicKey& pub_key, -: 638: wots_keysig_t&& in_key_data, -: 639: XMSS_Address& adrs) -: 640: { -: 641: generate_public_key(pub_key, std::forward(in_key_data), adrs, m_hash); -: 642: } -: 643: -: 644: /** -: 645: * Algorithm 5: "WOTS_sign" -: 646: * Generates a signature from a private key and a message. -: 647: * -: 648: * @param msg A message to sign. -: 649: * @param adrs An OTS hash address identifying the WOTS+ key pair -: 650: * used for signing. -: 651: * -: 652: * @return signature for msg. -: 653: **/ -: 654: inline wots_keysig_t sign(const secure_vector& msg, -: 655: XMSS_Address& adrs) -: 656: { -: 657: return sign(msg, adrs, m_hash); -: 658: } -: 659: -: 660: /** -: 661: * Algorithm 5: "WOTS_sign" -: 662: * Generates a signature from a private key and a message. -: 663: * -: 664: * This overload is used in multithreaded scenarios, where it is -: 665: * required to provide seperate instances of XMSS_Hash to each -: 666: * thread. -: 667: * -: 668: * @param msg A message to sign. -: 669: * @param adrs An OTS hash address identifying the WOTS+ key pair -: 670: * used for signing. -: 671: * @param hash Instance of XMSS_Hash, that may only be used by the -: 672: * thead executing sign. -: 673: * -: 674: * @return signature for msg. -: 675: **/ -: 676: wots_keysig_t sign(const secure_vector& msg, -: 677: XMSS_Address& adrs, -: 678: XMSS_Hash& hash); -: 679: -: 680: /** -: 681: * Retrieves the secret seed used to generate WOTS+ chains. The seed -: 682: * should be a uniformly random n-byte value. -: 683: * -: 684: * @return secret seed. -: 685: **/ -: 686: const secure_vector& private_seed() const -: 687: { -: 688: return m_private_seed; -: 689: } -: 690: -: 691: /** -: 692: * Sets the secret seed used to generate WOTS+ chains. The seed -: 693: * should be a uniformly random n-byte value. -: 694: * -: 695: * @param private_seed Uniformly random n-byte value. -: 696: **/ -: 697: void set_private_seed(const secure_vector& private_seed) -: 698: { -: 699: m_private_seed = private_seed; -: 700: } -: 701: -: 702: /** -: 703: * Sets the secret seed used to generate WOTS+ chains. The seed -: 704: * should be a uniformly random n-byte value. -: 705: * -: 706: * @param private_seed Uniformly random n-byte value. -: 707: **/ -: 708: void set_private_seed(secure_vector&& private_seed) -: 709: { -: 710: m_private_seed = std::move(private_seed); -: 711: } -: 712: -: 713: AlgorithmIdentifier -: 714: pkcs8_algorithm_identifier() const override -: 715: { -: 716: throw Not_Implemented("No AlgorithmIdentifier available for XMSS-WOTS."); -: 717: } -: 718: -: 719: secure_vector private_key_bits() const override -: 720: { -: 721: throw Not_Implemented("No PKCS8 key format defined for XMSS-WOTS."); -: 722: } -: 723: -: 724: private: -: 725: /** -: 726: * Algorithm 3: "Generating a WOTS+ Private Key". -: 727: * Generates a private key. -: 728: * -: 729: * This overload is used in multithreaded scenarios, where it is -: 730: * required to provide seperate instances of XMSS_Hash to each thread. -: 731: * -: 732: * @param private_seed Uniformly random n-byte value. -: 733: * @param[in] hash Instance of XMSS_Hash, that may only be used by the -: 734: * thead executing generate. -: 735: * -: 736: * @returns a vector of length key_size() of vectors of n bytes length -: 737: * containing uniformly random data. -: 738: **/ -: 739: wots_keysig_t generate(const secure_vector& private_seed, -: 740: XMSS_Hash& hash); -: 741: -: 742: inline wots_keysig_t generate(const secure_vector& private_seed) -: 743: { -: 744: return generate(private_seed, m_hash); -: 745: } -: 746: -: 747: secure_vector m_private_seed; -: 748: }; -: 749: -: 750:} -: 751: -: 752:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#md4.h.gcov -: 0:Source:build/include/botan/md4.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/hash.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/hash.gcda -: 0:Runs:2960 -: 1:/* -: 2:* MD4 -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_MD4_H_ -: 9:#define BOTAN_MD4_H_ -: 10: -: 11:#include -: 12: -: 13:BOTAN_FUTURE_INTERNAL_HEADER(md4.h) -: 14: -: 15:namespace Botan { -: 16: -: 17:/** -: 18:* MD4 -: 19:*/ -: 20:class BOTAN_PUBLIC_API(2,0) MD4 final : public MDx_HashFunction -: 21: { -: 22: public: -: 23: std::string name() const override { return "MD4"; } -: 24: size_t output_length() const override { return 16; } -: 25: HashFunction* clone() const override { return new MD4; } -: 26: std::unique_ptr copy_state() const override; -: 27: -: 28: void clear() override; -: 29: function _ZN5Botan3MD4C2Ev called 156 returned 100% blocks executed 42% 156: 30: MD4() : MDx_HashFunction(64, false, true), m_digest(4) 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 branch 6 never executed branch 7 never executed 156: 31: { clear(); } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 32: -: 33: private: -: 34: void compress_n(const uint8_t input[], size_t blocks) override; -: 35: void copy_out(uint8_t[]) override; -: 36: -: 37: /** -: 38: * The digest value -: 39: */ -: 40: secure_vector m_digest; -: 41: }; -: 42: -: 43:} -: 44: -: 45:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#impl#eventfd_select_interrupter.ipp.gcov -: 0:Source:/usr/include/boost/asio/detail/impl/eventfd_select_interrupter.ipp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:// -: 2:// detail/impl/eventfd_select_interrupter.ipp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) -: 7:// -: 8:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 9:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 10:// -: 11: -: 12:#ifndef BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP -: 13:#define BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP -: 14: -: 15:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 16:# pragma once -: 17:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 18: -: 19:#include -: 20: -: 21:#if defined(BOOST_ASIO_HAS_EVENTFD) -: 22: -: 23:#include -: 24:#include -: 25:#include -: 26:#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 -: 27:# include -: 28:#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 -: 29:# include -: 30:#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 -: 31:#include -: 32:#include -: 33:#include -: 34:#include -: 35: -: 36:#include -: 37: -: 38:namespace boost { -: 39:namespace asio { -: 40:namespace detail { -: 41: #####: 42:eventfd_select_interrupter::eventfd_select_interrupter() -: 43:{ #####: 44: open_descriptors(); call 0 never executed branch 1 never executed branch 2 never executed #####: 45:} -: 46: function _ZN5boost4asio6detail26eventfd_select_interrupter16open_descriptorsEv called 0 returned 0% blocks executed 0% #####: 47:void eventfd_select_interrupter::open_descriptors() -: 48:{ -: 49:#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 -: 50: write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0); -: 51: if (read_descriptor_ != -1) -: 52: { -: 53: ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK); -: 54: ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); -: 55: } -: 56:#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 -: 57:# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK) #####: 58: write_descriptor_ = read_descriptor_ = #####: 59: ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); call 0 never executed -: 60:# else // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK) -: 61: errno = EINVAL; -: 62: write_descriptor_ = read_descriptor_ = -1; -: 63:# endif // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK) #####: 64: if (read_descriptor_ == -1 && errno == EINVAL) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 65: { #####: 66: write_descriptor_ = read_descriptor_ = ::eventfd(0, 0); call 0 never executed #####: 67: if (read_descriptor_ != -1) branch 0 never executed branch 1 never executed -: 68: { #####: 69: ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK); call 0 never executed #####: 70: ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); call 0 never executed -: 71: } -: 72: } -: 73:#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 -: 74: #####: 75: if (read_descriptor_ == -1) branch 0 never executed branch 1 never executed -: 76: { #####: 77: int pipe_fds[2]; #####: 78: if (pipe(pipe_fds) == 0) call 0 never executed branch 1 never executed branch 2 never executed -: 79: { #####: 80: read_descriptor_ = pipe_fds[0]; #####: 81: ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK); call 0 never executed #####: 82: ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); call 0 never executed #####: 83: write_descriptor_ = pipe_fds[1]; #####: 84: ::fcntl(write_descriptor_, F_SETFL, O_NONBLOCK); call 0 never executed #####: 85: ::fcntl(write_descriptor_, F_SETFD, FD_CLOEXEC); call 0 never executed -: 86: } -: 87: else -: 88: { #####: 89: boost::system::error_code ec(errno, call 0 never executed #####: 90: boost::asio::error::get_system_category()); call 0 never executed #####: 91: boost::asio::detail::throw_error(ec, "eventfd_select_interrupter"); branch 0 never executed branch 1 never executed -: 92: } -: 93: } #####: 94:} -: 95: #####: 96:eventfd_select_interrupter::~eventfd_select_interrupter() call 0 never executed -: 97:{ #####: 98: close_descriptors(); call 0 never executed call 1 never executed -: 99:} -: 100: -: 101:void eventfd_select_interrupter::close_descriptors() -: 102:{ -: 103: if (write_descriptor_ != -1 && write_descriptor_ != read_descriptor_) -: 104: ::close(write_descriptor_); -: 105: if (read_descriptor_ != -1) -: 106: ::close(read_descriptor_); -: 107:} -: 108: function _ZN5boost4asio6detail26eventfd_select_interrupter8recreateEv called 0 returned 0% blocks executed 0% #####: 109:void eventfd_select_interrupter::recreate() -: 110:{ #####: 111: close_descriptors(); call 0 never executed -: 112: #####: 113: write_descriptor_ = -1; #####: 114: read_descriptor_ = -1; -: 115: #####: 116: open_descriptors(); call 0 never executed #####: 117:} -: 118: #####: 119:void eventfd_select_interrupter::interrupt() -: 120:{ #####: 121: uint64_t counter(1UL); #####: 122: int result = ::write(write_descriptor_, &counter, sizeof(uint64_t)); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed #####: 123: (void)result; branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 124:} -: 125: -: 126:bool eventfd_select_interrupter::reset() -: 127:{ -: 128: if (write_descriptor_ == read_descriptor_) -: 129: { -: 130: for (;;) -: 131: { -: 132: // Only perform one read. The kernel maintains an atomic counter. -: 133: uint64_t counter(0); -: 134: errno = 0; -: 135: int bytes_read = ::read(read_descriptor_, &counter, sizeof(uint64_t)); -: 136: if (bytes_read < 0 && errno == EINTR) -: 137: continue; -: 138: bool was_interrupted = (bytes_read > 0); -: 139: return was_interrupted; -: 140: } -: 141: } -: 142: else -: 143: { -: 144: for (;;) -: 145: { -: 146: // Clear all data from the pipe. -: 147: char data[1024]; -: 148: int bytes_read = ::read(read_descriptor_, data, sizeof(data)); -: 149: if (bytes_read < 0 && errno == EINTR) -: 150: continue; -: 151: bool was_interrupted = (bytes_read > 0); -: 152: while (bytes_read == sizeof(data)) -: 153: bytes_read = ::read(read_descriptor_, data, sizeof(data)); -: 154: return was_interrupted; -: 155: } -: 156: } -: 157:} -: 158: -: 159:} // namespace detail -: 160:} // namespace asio -: 161:} // namespace boost -: 162: -: 163:#include -: 164: -: 165:#endif // defined(BOOST_ASIO_HAS_EVENTFD) -: 166: -: 167:#endif // BOOST_ASIO_DETAIL_IMPL_EVENTFD_SELECT_INTERRUPTER_IPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#bits#stl_construct.h.gcov -: 0:Source:/usr/include/c++/9/bits/stl_construct.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/redc_p256.gcno -: 0:Data:- -: 0:Runs:0 -: 1:// nonstandard construct and destroy functions -*- 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_construct.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_CONSTRUCT_H -: 57:#define _STL_CONSTRUCT_H 1 -: 58: -: 59:#include -: 60:#include -: 61:#include -: 62: -: 63:namespace std _GLIBCXX_VISIBILITY(default) -: 64:{ -: 65:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 66: -: 67: /** -: 68: * Constructs an object in existing memory by invoking an allocated -: 69: * object's constructor with an initializer. -: 70: */ -: 71:#if __cplusplus >= 201103L -: 72: template -: 73: inline void -: 74: _Construct(_T1* __p, _Args&&... __args) -: 75: { ::new(static_cast(__p)) _T1(std::forward<_Args>(__args)...); } -: 76:#else -: 77: template -: 78: inline void -: 79: _Construct(_T1* __p, const _T2& __value) -: 80: { -: 81: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 82: // 402. wrong new expression in [some_]allocator::construct -: 83: ::new(static_cast(__p)) _T1(__value); -: 84: } -: 85:#endif -: 86: -: 87: template -: 88: inline void -: 89: _Construct_novalue(_T1* __p) -: 90: { ::new(static_cast(__p)) _T1; } -: 91: -: 92: /** -: 93: * Destroy the object pointed to by a pointer type. -: 94: */ -: 95: template -: 96: inline void -: 97: _Destroy(_Tp* __pointer) -: 98: { __pointer->~_Tp(); } -: 99: -: 100: template -: 101: struct _Destroy_aux -: 102: { -: 103: template -: 104: static void -: 105: __destroy(_ForwardIterator __first, _ForwardIterator __last) -: 106: { -: 107: for (; __first != __last; ++__first) -: 108: std::_Destroy(std::__addressof(*__first)); -: 109: } -: 110: }; -: 111: -: 112: template<> -: 113: struct _Destroy_aux -: 114: { -: 115: template -: 116: static void #####: 117: __destroy(_ForwardIterator, _ForwardIterator) { } -: 118: }; -: 119: -: 120: /** -: 121: * Destroy a range of objects. If the value_type of the object has -: 122: * a trivial destructor, the compiler should optimize all of this -: 123: * away, otherwise the objects' destructors must be invoked. -: 124: */ -: 125: template -: 126: inline void #####: 127: _Destroy(_ForwardIterator __first, _ForwardIterator __last) -: 128: { -: 129: typedef typename iterator_traits<_ForwardIterator>::value_type -: 130: _Value_type; -: 131:#if __cplusplus >= 201103L -: 132: // A deleted destructor is trivial, this ensures we reject such types: -: 133: static_assert(is_destructible<_Value_type>::value, -: 134: "value type is destructible"); -: 135:#endif -: 136: std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: #####: 137: __destroy(__first, __last); -: 138: } -: 139: -: 140: template -: 141: struct _Destroy_n_aux -: 142: { -: 143: template -: 144: static _ForwardIterator -: 145: __destroy_n(_ForwardIterator __first, _Size __count) -: 146: { -: 147: for (; __count > 0; (void)++__first, --__count) -: 148: std::_Destroy(std::__addressof(*__first)); -: 149: return __first; -: 150: } -: 151: }; -: 152: -: 153: template<> -: 154: struct _Destroy_n_aux -: 155: { -: 156: template -: 157: static _ForwardIterator -: 158: __destroy_n(_ForwardIterator __first, _Size __count) -: 159: { -: 160: std::advance(__first, __count); -: 161: return __first; -: 162: } -: 163: }; -: 164: -: 165: /** -: 166: * Destroy a range of objects. If the value_type of the object has -: 167: * a trivial destructor, the compiler should optimize all of this -: 168: * away, otherwise the objects' destructors must be invoked. -: 169: */ -: 170: template -: 171: inline _ForwardIterator -: 172: _Destroy_n(_ForwardIterator __first, _Size __count) -: 173: { -: 174: typedef typename iterator_traits<_ForwardIterator>::value_type -: 175: _Value_type; -: 176:#if __cplusplus >= 201103L -: 177: // A deleted destructor is trivial, this ensures we reject such types: -: 178: static_assert(is_destructible<_Value_type>::value, -: 179: "value type is destructible"); -: 180:#endif -: 181: return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: -: 182: __destroy_n(__first, __count); -: 183: } -: 184: -: 185: /** -: 186: * Destroy a range of objects using the supplied allocator. For -: 187: * nondefault allocators we do not optimize away invocation of -: 188: * destroy() even if _Tp has a trivial destructor. -: 189: */ -: 190: -: 191: template -: 192: void #####: 193: _Destroy(_ForwardIterator __first, _ForwardIterator __last, -: 194: _Allocator& __alloc) -: 195: { -: 196: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; #####: 197: for (; __first != __last; ++__first) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed branch 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed -: 198: __traits::destroy(__alloc, std::__addressof(*__first)); -: 199: } -: 200: -: 201: template -: 202: inline void #####: 203: _Destroy(_ForwardIterator __first, _ForwardIterator __last, -: 204: allocator<_Tp>&) -: 205: { #####: 206: _Destroy(__first, __last); branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed -: 207: } -: 208: -: 209:#if __cplusplus > 201402L -: 210: template -: 211: inline void -: 212: destroy_at(_Tp* __location) -: 213: { -: 214: std::_Destroy(__location); -: 215: } -: 216: -: 217: template -: 218: inline void -: 219: destroy(_ForwardIterator __first, _ForwardIterator __last) -: 220: { -: 221: std::_Destroy(__first, __last); -: 222: } -: 223: -: 224: template -: 225: inline _ForwardIterator -: 226: destroy_n(_ForwardIterator __first, _Size __count) -: 227: { -: 228: return std::_Destroy_n(__first, __count); -: 229: } -: 230:#endif -: 231: -: 232:_GLIBCXX_END_NAMESPACE_VERSION -: 233:} // namespace std -: 234: -: 235:#endif /* _STL_CONSTRUCT_H */ -: 236: <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#c++#9#future.gcov -: 0:Source:/usr/include/c++/9/future -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:// -*- C++ -*- -: 2: -: 3:// Copyright (C) 2009-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/future -: 26: * This is a Standard C++ Library header. -: 27: */ -: 28: -: 29:#ifndef _GLIBCXX_FUTURE -: 30:#define _GLIBCXX_FUTURE 1 -: 31: -: 32:#pragma GCC system_header -: 33: -: 34:#if __cplusplus < 201103L -: 35:# include -: 36:#else -: 37: -: 38:#include -: 39:#include -: 40:#include -: 41:#include -: 42:#include -: 43:#include -: 44:#include -: 45:#include -: 46:#include -: 47:#include -: 48:#include -: 49:#include -: 50:#include -: 51:#include -: 52: -: 53:namespace std _GLIBCXX_VISIBILITY(default) -: 54:{ -: 55:_GLIBCXX_BEGIN_NAMESPACE_VERSION -: 56: -: 57: /** -: 58: * @defgroup futures Futures -: 59: * @ingroup concurrency -: 60: * -: 61: * Classes for futures support. -: 62: * @{ -: 63: */ -: 64: -: 65: /// Error code for futures -: 66: enum class future_errc -: 67: { -: 68: future_already_retrieved = 1, -: 69: promise_already_satisfied, -: 70: no_state, -: 71: broken_promise -: 72: }; -: 73: -: 74: /// Specialization. -: 75: template<> -: 76: struct is_error_code_enum : public true_type { }; -: 77: -: 78: /// Points to a statically-allocated object derived from error_category. -: 79: const error_category& -: 80: future_category() noexcept; -: 81: -: 82: /// Overload for make_error_code. -: 83: inline error_code -: 84: make_error_code(future_errc __errc) noexcept -: 85: { return error_code(static_cast(__errc), future_category()); } -: 86: -: 87: /// Overload for make_error_condition. -: 88: inline error_condition -: 89: make_error_condition(future_errc __errc) noexcept -: 90: { return error_condition(static_cast(__errc), future_category()); } -: 91: -: 92: /** -: 93: * @brief Exception type thrown by futures. -: 94: * @ingroup exceptions -: 95: */ -: 96: class future_error : public logic_error -: 97: { -: 98: public: -: 99: explicit -: 100: future_error(future_errc __errc) -: 101: : future_error(std::make_error_code(__errc)) -: 102: { } -: 103: -: 104: virtual ~future_error() noexcept; -: 105: -: 106: virtual const char* -: 107: what() const noexcept; -: 108: -: 109: const error_code& -: 110: code() const noexcept { return _M_code; } -: 111: -: 112: private: -: 113: explicit -: 114: future_error(error_code __ec) -: 115: : logic_error("std::future_error: " + __ec.message()), _M_code(__ec) -: 116: { } -: 117: -: 118: friend void __throw_future_error(int); -: 119: -: 120: error_code _M_code; -: 121: }; -: 122: -: 123: // Forward declarations. -: 124: template -: 125: class future; -: 126: -: 127: template -: 128: class shared_future; -: 129: -: 130: template -: 131: class packaged_task; -: 132: -: 133: template -: 134: class promise; -: 135: -: 136: /// Launch code for futures -: 137: enum class launch -: 138: { -: 139: async = 1, -: 140: deferred = 2 -: 141: }; -: 142: -: 143: constexpr launch operator&(launch __x, launch __y) -: 144: { -: 145: return static_cast( -: 146: static_cast(__x) & static_cast(__y)); -: 147: } -: 148: -: 149: constexpr launch operator|(launch __x, launch __y) -: 150: { -: 151: return static_cast( -: 152: static_cast(__x) | static_cast(__y)); -: 153: } -: 154: -: 155: constexpr launch operator^(launch __x, launch __y) -: 156: { -: 157: return static_cast( -: 158: static_cast(__x) ^ static_cast(__y)); -: 159: } -: 160: -: 161: constexpr launch operator~(launch __x) -: 162: { return static_cast(~static_cast(__x)); } -: 163: -: 164: inline launch& operator&=(launch& __x, launch __y) -: 165: { return __x = __x & __y; } -: 166: -: 167: inline launch& operator|=(launch& __x, launch __y) -: 168: { return __x = __x | __y; } -: 169: -: 170: inline launch& operator^=(launch& __x, launch __y) -: 171: { return __x = __x ^ __y; } -: 172: -: 173: /// Status code for futures -: 174: enum class future_status -: 175: { -: 176: ready, -: 177: timeout, -: 178: deferred -: 179: }; -: 180: -: 181: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 182: // 2021. Further incorrect usages of result_of -: 183: template -: 184: using __async_result_of = typename __invoke_result< -: 185: typename decay<_Fn>::type, typename decay<_Args>::type...>::type; -: 186: -: 187: template -: 188: future<__async_result_of<_Fn, _Args...>> -: 189: async(launch __policy, _Fn&& __fn, _Args&&... __args); -: 190: -: 191: template -: 192: future<__async_result_of<_Fn, _Args...>> -: 193: async(_Fn&& __fn, _Args&&... __args); -: 194: -: 195:#if defined(_GLIBCXX_HAS_GTHREADS) -: 196: -: 197: /// Base class and enclosing scope. -: 198: struct __future_base -: 199: { -: 200: /// Base class for results. -: 201: struct _Result_base -: 202: { -: 203: exception_ptr _M_error; -: 204: -: 205: _Result_base(const _Result_base&) = delete; -: 206: _Result_base& operator=(const _Result_base&) = delete; -: 207: -: 208: // _M_destroy() allows derived classes to control deallocation -: 209: virtual void _M_destroy() = 0; -: 210: -: 211: struct _Deleter -: 212: { #####: 213: void operator()(_Result_base* __fr) const { __fr->_M_destroy(); } call 0 never executed call 1 never executed -: 214: }; -: 215: -: 216: protected: -: 217: _Result_base(); -: 218: virtual ~_Result_base(); -: 219: }; -: 220: -: 221: /// A unique_ptr for result objects. -: 222: template -: 223: using _Ptr = unique_ptr<_Res, _Result_base::_Deleter>; -: 224: -: 225: /// A result object that has storage for an object of type _Res. -: 226: template -: 227: struct _Result : _Result_base -: 228: { -: 229: private: -: 230: __gnu_cxx::__aligned_buffer<_Res> _M_storage; -: 231: bool _M_initialized; -: 232: -: 233: public: -: 234: typedef _Res result_type; -: 235: -: 236: _Result() noexcept : _M_initialized() { } -: 237: -: 238: ~_Result() -: 239: { -: 240: if (_M_initialized) -: 241: _M_value().~_Res(); -: 242: } -: 243: -: 244: // Return lvalue, future will add const or rvalue-reference -: 245: _Res& -: 246: _M_value() noexcept { return *_M_storage._M_ptr(); } -: 247: -: 248: void -: 249: _M_set(const _Res& __res) -: 250: { -: 251: ::new (_M_storage._M_addr()) _Res(__res); -: 252: _M_initialized = true; -: 253: } -: 254: -: 255: void -: 256: _M_set(_Res&& __res) -: 257: { -: 258: ::new (_M_storage._M_addr()) _Res(std::move(__res)); -: 259: _M_initialized = true; -: 260: } -: 261: -: 262: private: -: 263: void _M_destroy() { delete this; } -: 264: }; -: 265: -: 266: /// A result object that uses an allocator. -: 267: template -: 268: struct _Result_alloc final : _Result<_Res>, _Alloc -: 269: { -: 270: using __allocator_type = __alloc_rebind<_Alloc, _Result_alloc>; -: 271: -: 272: explicit -: 273: _Result_alloc(const _Alloc& __a) : _Result<_Res>(), _Alloc(__a) -: 274: { } -: 275: -: 276: private: -: 277: void _M_destroy() -: 278: { -: 279: __allocator_type __a(*this); -: 280: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; -: 281: this->~_Result_alloc(); -: 282: } -: 283: }; -: 284: -: 285: // Create a result object that uses an allocator. -: 286: template -: 287: static _Ptr<_Result_alloc<_Res, _Allocator>> -: 288: _S_allocate_result(const _Allocator& __a) -: 289: { -: 290: using __result_type = _Result_alloc<_Res, _Allocator>; -: 291: typename __result_type::__allocator_type __a2(__a); -: 292: auto __guard = std::__allocate_guarded(__a2); -: 293: __result_type* __p = ::new((void*)__guard.get()) __result_type{__a}; -: 294: __guard = nullptr; -: 295: return _Ptr<__result_type>(__p); -: 296: } -: 297: -: 298: // Keep it simple for std::allocator. -: 299: template -: 300: static _Ptr<_Result<_Res>> -: 301: _S_allocate_result(const std::allocator<_Tp>& __a) -: 302: { -: 303: return _Ptr<_Result<_Res>>(new _Result<_Res>); -: 304: } -: 305: -: 306: // Base class for various types of shared state created by an -: 307: // asynchronous provider (such as a std::promise) and shared with one -: 308: // or more associated futures. -: 309: class _State_baseV2 -: 310: { -: 311: typedef _Ptr<_Result_base> _Ptr_type; -: 312: -: 313: enum _Status : unsigned { -: 314: __not_ready, -: 315: __ready -: 316: }; -: 317: -: 318: _Ptr_type _M_result; -: 319: __atomic_futex_unsigned<> _M_status; -: 320: atomic_flag _M_retrieved = ATOMIC_FLAG_INIT; -: 321: once_flag _M_once; -: 322: -: 323: public: -: 324: _State_baseV2() noexcept : _M_result(), _M_status(_Status::__not_ready) -: 325: { } -: 326: _State_baseV2(const _State_baseV2&) = delete; -: 327: _State_baseV2& operator=(const _State_baseV2&) = delete; #####: 328: virtual ~_State_baseV2() = default; ------------------ _ZNSt13__future_base13_State_baseV2D0Ev: function _ZNSt13__future_base13_State_baseV2D0Ev called 0 returned 0% blocks executed 0% #####: 328: virtual ~_State_baseV2() = default; branch 0 never executed branch 1 never executed call 2 never executed ------------------ _ZNSt13__future_base13_State_baseV2D2Ev: function _ZNSt13__future_base13_State_baseV2D2Ev called 0 returned 0% blocks executed 0% #####: 328: virtual ~_State_baseV2() = default; branch 0 never executed branch 1 never executed ------------------ -: 329: -: 330: _Result_base& -: 331: wait() -: 332: { -: 333: // Run any deferred function or join any asynchronous thread: -: 334: _M_complete_async(); -: 335: // Acquire MO makes sure this synchronizes with the thread that made -: 336: // the future ready. -: 337: _M_status._M_load_when_equal(_Status::__ready, memory_order_acquire); -: 338: return *_M_result; -: 339: } -: 340: -: 341: template -: 342: future_status -: 343: wait_for(const chrono::duration<_Rep, _Period>& __rel) -: 344: { -: 345: // First, check if the future has been made ready. Use acquire MO -: 346: // to synchronize with the thread that made it ready. -: 347: if (_M_status._M_load(memory_order_acquire) == _Status::__ready) -: 348: return future_status::ready; -: 349: if (_M_is_deferred_future()) -: 350: return future_status::deferred; -: 351: if (_M_status._M_load_when_equal_for(_Status::__ready, -: 352: memory_order_acquire, __rel)) -: 353: { -: 354: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 355: // 2100. timed waiting functions must also join -: 356: // This call is a no-op by default except on an async future, -: 357: // in which case the async thread is joined. It's also not a -: 358: // no-op for a deferred future, but such a future will never -: 359: // reach this point because it returns future_status::deferred -: 360: // instead of waiting for the future to become ready (see -: 361: // above). Async futures synchronize in this call, so we need -: 362: // no further synchronization here. -: 363: _M_complete_async(); -: 364: -: 365: return future_status::ready; -: 366: } -: 367: return future_status::timeout; -: 368: } -: 369: -: 370: template -: 371: future_status -: 372: wait_until(const chrono::time_point<_Clock, _Duration>& __abs) -: 373: { -: 374: // First, check if the future has been made ready. Use acquire MO -: 375: // to synchronize with the thread that made it ready. -: 376: if (_M_status._M_load(memory_order_acquire) == _Status::__ready) -: 377: return future_status::ready; -: 378: if (_M_is_deferred_future()) -: 379: return future_status::deferred; -: 380: if (_M_status._M_load_when_equal_until(_Status::__ready, -: 381: memory_order_acquire, __abs)) -: 382: { -: 383: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 384: // 2100. timed waiting functions must also join -: 385: // See wait_for(...) above. -: 386: _M_complete_async(); -: 387: -: 388: return future_status::ready; -: 389: } -: 390: return future_status::timeout; -: 391: } -: 392: -: 393: // Provide a result to the shared state and make it ready. -: 394: // Calls at most once: _M_result = __res(); -: 395: void -: 396: _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false) -: 397: { -: 398: bool __did_set = false; -: 399: // all calls to this function are serialized, -: 400: // side-effects of invoking __res only happen once -: 401: call_once(_M_once, &_State_baseV2::_M_do_set, this, -: 402: std::__addressof(__res), std::__addressof(__did_set)); -: 403: if (__did_set) -: 404: // Use release MO to synchronize with observers of the ready state. -: 405: _M_status._M_store_notify_all(_Status::__ready, -: 406: memory_order_release); -: 407: else if (!__ignore_failure) -: 408: __throw_future_error(int(future_errc::promise_already_satisfied)); -: 409: } -: 410: -: 411: // Provide a result to the shared state but delay making it ready -: 412: // until the calling thread exits. -: 413: // Calls at most once: _M_result = __res(); -: 414: void -: 415: _M_set_delayed_result(function<_Ptr_type()> __res, -: 416: weak_ptr<_State_baseV2> __self) -: 417: { -: 418: bool __did_set = false; -: 419: unique_ptr<_Make_ready> __mr{new _Make_ready}; -: 420: // all calls to this function are serialized, -: 421: // side-effects of invoking __res only happen once -: 422: call_once(_M_once, &_State_baseV2::_M_do_set, this, -: 423: std::__addressof(__res), std::__addressof(__did_set)); -: 424: if (!__did_set) -: 425: __throw_future_error(int(future_errc::promise_already_satisfied)); -: 426: __mr->_M_shared_state = std::move(__self); -: 427: __mr->_M_set(); -: 428: __mr.release(); -: 429: } -: 430: -: 431: // Abandon this shared state. -: 432: void -: 433: _M_break_promise(_Ptr_type __res) -: 434: { -: 435: if (static_cast(__res)) -: 436: { -: 437: __res->_M_error = -: 438: make_exception_ptr(future_error(future_errc::broken_promise)); -: 439: // This function is only called when the last asynchronous result -: 440: // provider is abandoning this shared state, so noone can be -: 441: // trying to make the shared state ready at the same time, and -: 442: // we can access _M_result directly instead of through call_once. -: 443: _M_result.swap(__res); -: 444: // Use release MO to synchronize with observers of the ready state. -: 445: _M_status._M_store_notify_all(_Status::__ready, -: 446: memory_order_release); -: 447: } -: 448: } -: 449: -: 450: // Called when this object is first passed to a future. -: 451: void -: 452: _M_set_retrieved_flag() -: 453: { -: 454: if (_M_retrieved.test_and_set()) -: 455: __throw_future_error(int(future_errc::future_already_retrieved)); -: 456: } -: 457: -: 458: template -: 459: struct _Setter; -: 460: -: 461: // set lvalues -: 462: template -: 463: struct _Setter<_Res, _Arg&> -: 464: { -: 465: // check this is only used by promise::set_value(const R&) -: 466: // or promise::set_value(R&) -: 467: static_assert(is_same<_Res, _Arg&>::value // promise -: 468: || is_same::value, // promise -: 469: "Invalid specialisation"); -: 470: -: 471: // Used by std::promise to copy construct the result. -: 472: typename promise<_Res>::_Ptr_type operator()() const -: 473: { -: 474: _M_promise->_M_storage->_M_set(*_M_arg); -: 475: return std::move(_M_promise->_M_storage); -: 476: } -: 477: promise<_Res>* _M_promise; -: 478: _Arg* _M_arg; -: 479: }; -: 480: -: 481: // set rvalues -: 482: template -: 483: struct _Setter<_Res, _Res&&> -: 484: { -: 485: // Used by std::promise to move construct the result. -: 486: typename promise<_Res>::_Ptr_type operator()() const -: 487: { -: 488: _M_promise->_M_storage->_M_set(std::move(*_M_arg)); -: 489: return std::move(_M_promise->_M_storage); -: 490: } -: 491: promise<_Res>* _M_promise; -: 492: _Res* _M_arg; -: 493: }; -: 494: -: 495: // set void -: 496: template -: 497: struct _Setter<_Res, void> -: 498: { -: 499: static_assert(is_void<_Res>::value, "Only used for promise"); -: 500: -: 501: typename promise<_Res>::_Ptr_type operator()() const -: 502: { return std::move(_M_promise->_M_storage); } -: 503: -: 504: promise<_Res>* _M_promise; -: 505: }; -: 506: -: 507: struct __exception_ptr_tag { }; -: 508: -: 509: // set exceptions -: 510: template -: 511: struct _Setter<_Res, __exception_ptr_tag> -: 512: { -: 513: // Used by std::promise to store an exception as the result. -: 514: typename promise<_Res>::_Ptr_type operator()() const -: 515: { -: 516: _M_promise->_M_storage->_M_error = *_M_ex; -: 517: return std::move(_M_promise->_M_storage); -: 518: } -: 519: -: 520: promise<_Res>* _M_promise; -: 521: exception_ptr* _M_ex; -: 522: }; -: 523: -: 524: template -: 525: static _Setter<_Res, _Arg&&> -: 526: __setter(promise<_Res>* __prom, _Arg&& __arg) -: 527: { -: 528: _S_check(__prom->_M_future); -: 529: return _Setter<_Res, _Arg&&>{ __prom, std::__addressof(__arg) }; -: 530: } -: 531: -: 532: template -: 533: static _Setter<_Res, __exception_ptr_tag> -: 534: __setter(exception_ptr& __ex, promise<_Res>* __prom) -: 535: { -: 536: _S_check(__prom->_M_future); -: 537: return _Setter<_Res, __exception_ptr_tag>{ __prom, &__ex }; -: 538: } -: 539: -: 540: template -: 541: static _Setter<_Res, void> -: 542: __setter(promise<_Res>* __prom) -: 543: { -: 544: _S_check(__prom->_M_future); -: 545: return _Setter<_Res, void>{ __prom }; -: 546: } -: 547: -: 548: template -: 549: static void -: 550: _S_check(const shared_ptr<_Tp>& __p) -: 551: { -: 552: if (!static_cast(__p)) -: 553: __throw_future_error((int)future_errc::no_state); -: 554: } -: 555: -: 556: private: -: 557: // The function invoked with std::call_once(_M_once, ...). -: 558: void -: 559: _M_do_set(function<_Ptr_type()>* __f, bool* __did_set) -: 560: { -: 561: _Ptr_type __res = (*__f)(); -: 562: // Notify the caller that we did try to set; if we do not throw an -: 563: // exception, the caller will be aware that it did set (e.g., see -: 564: // _M_set_result). -: 565: *__did_set = true; -: 566: _M_result.swap(__res); // nothrow -: 567: } -: 568: -: 569: // Wait for completion of async function. function _ZNSt13__future_base13_State_baseV217_M_complete_asyncEv called 0 returned 0% blocks executed 0% #####: 570: virtual void _M_complete_async() { } -: 571: -: 572: // Return true if state corresponds to a deferred function. function _ZNKSt13__future_base13_State_baseV221_M_is_deferred_futureEv called 0 returned 0% blocks executed 0% #####: 573: virtual bool _M_is_deferred_future() const { return false; } -: 574: -: 575: struct _Make_ready final : __at_thread_exit_elt -: 576: { -: 577: weak_ptr<_State_baseV2> _M_shared_state; -: 578: static void _S_run(void*); -: 579: void _M_set(); -: 580: }; -: 581: }; -: 582: -: 583:#ifdef _GLIBCXX_ASYNC_ABI_COMPAT -: 584: class _State_base; -: 585: class _Async_state_common; -: 586:#else -: 587: using _State_base = _State_baseV2; -: 588: class _Async_state_commonV2; -: 589:#endif -: 590: -: 591: template()())> -: 593: class _Deferred_state; -: 594: -: 595: template()())> -: 597: class _Async_state_impl; -: 598: -: 599: template -: 600: class _Task_state_base; -: 601: -: 602: template -: 603: class _Task_state; -: 604: -: 605: template -: 606: static std::shared_ptr<_State_base> -: 607: _S_make_deferred_state(_BoundFn&& __fn); -: 608: -: 609: template -: 610: static std::shared_ptr<_State_base> -: 611: _S_make_async_state(_BoundFn&& __fn); -: 612: -: 613: template -: 615: struct _Task_setter; -: 616: -: 617: template -: 618: static _Task_setter<_Res_ptr, _BoundFn> -: 619: _S_task_setter(_Res_ptr& __ptr, _BoundFn& __call) -: 620: { -: 621: return { std::__addressof(__ptr), std::__addressof(__call) }; -: 622: } -: 623: }; -: 624: -: 625: /// Partial specialization for reference types. -: 626: template -: 627: struct __future_base::_Result<_Res&> : __future_base::_Result_base -: 628: { -: 629: typedef _Res& result_type; -: 630: -: 631: _Result() noexcept : _M_value_ptr() { } -: 632: -: 633: void -: 634: _M_set(_Res& __res) noexcept -: 635: { _M_value_ptr = std::addressof(__res); } -: 636: -: 637: _Res& _M_get() noexcept { return *_M_value_ptr; } -: 638: -: 639: private: -: 640: _Res* _M_value_ptr; -: 641: -: 642: void _M_destroy() { delete this; } -: 643: }; -: 644: -: 645: /// Explicit specialization for void. -: 646: template<> -: 647: struct __future_base::_Result : __future_base::_Result_base -: 648: { -: 649: typedef void result_type; -: 650: -: 651: private: function _ZNSt13__future_base7_ResultIvE10_M_destroyEv called 0 returned 0% blocks executed 0% #####: 652: void _M_destroy() { delete this; } call 0 never executed -: 653: }; -: 654: -: 655:#ifndef _GLIBCXX_ASYNC_ABI_COMPAT -: 656: -: 657: // Allow _Setter objects to be stored locally in std::function -: 658: template -: 659: struct __is_location_invariant -: 660: <__future_base::_State_base::_Setter<_Res, _Arg>> -: 661: : true_type { }; -: 662: -: 663: // Allow _Task_setter objects to be stored locally in std::function -: 664: template -: 665: struct __is_location_invariant -: 666: <__future_base::_Task_setter<_Res_ptr, _Fn, _Res>> -: 667: : true_type { }; -: 668: -: 669: /// Common implementation for future and shared_future. -: 670: template -: 671: class __basic_future : public __future_base -: 672: { -: 673: protected: -: 674: typedef shared_ptr<_State_base> __state_type; -: 675: typedef __future_base::_Result<_Res>& __result_type; -: 676: -: 677: private: -: 678: __state_type _M_state; -: 679: -: 680: public: -: 681: // Disable copying. -: 682: __basic_future(const __basic_future&) = delete; -: 683: __basic_future& operator=(const __basic_future&) = delete; -: 684: -: 685: bool -: 686: valid() const noexcept { return static_cast(_M_state); } -: 687: -: 688: void -: 689: wait() const -: 690: { -: 691: _State_base::_S_check(_M_state); -: 692: _M_state->wait(); -: 693: } -: 694: -: 695: template -: 696: future_status -: 697: wait_for(const chrono::duration<_Rep, _Period>& __rel) const -: 698: { -: 699: _State_base::_S_check(_M_state); -: 700: return _M_state->wait_for(__rel); -: 701: } -: 702: -: 703: template -: 704: future_status -: 705: wait_until(const chrono::time_point<_Clock, _Duration>& __abs) const -: 706: { -: 707: _State_base::_S_check(_M_state); -: 708: return _M_state->wait_until(__abs); -: 709: } -: 710: -: 711: protected: -: 712: /// Wait for the state to be ready and rethrow any stored exception -: 713: __result_type -: 714: _M_get_result() const -: 715: { -: 716: _State_base::_S_check(_M_state); -: 717: _Result_base& __res = _M_state->wait(); -: 718: if (!(__res._M_error == 0)) -: 719: rethrow_exception(__res._M_error); -: 720: return static_cast<__result_type>(__res); -: 721: } -: 722: -: 723: void _M_swap(__basic_future& __that) noexcept -: 724: { -: 725: _M_state.swap(__that._M_state); -: 726: } -: 727: -: 728: // Construction of a future by promise::get_future() -: 729: explicit -: 730: __basic_future(const __state_type& __state) : _M_state(__state) -: 731: { -: 732: _State_base::_S_check(_M_state); -: 733: _M_state->_M_set_retrieved_flag(); -: 734: } -: 735: -: 736: // Copy construction from a shared_future -: 737: explicit -: 738: __basic_future(const shared_future<_Res>&) noexcept; -: 739: -: 740: // Move construction from a shared_future -: 741: explicit -: 742: __basic_future(shared_future<_Res>&&) noexcept; -: 743: -: 744: // Move construction from a future -: 745: explicit -: 746: __basic_future(future<_Res>&&) noexcept; -: 747: -: 748: constexpr __basic_future() noexcept : _M_state() { } -: 749: -: 750: struct _Reset -: 751: { -: 752: explicit _Reset(__basic_future& __fut) noexcept : _M_fut(__fut) { } -: 753: ~_Reset() { _M_fut._M_state.reset(); } -: 754: __basic_future& _M_fut; -: 755: }; -: 756: }; -: 757: -: 758: -: 759: /// Primary template for future. -: 760: template -: 761: class future : public __basic_future<_Res> -: 762: { -: 763: friend class promise<_Res>; -: 764: template friend class packaged_task; -: 765: template -: 766: friend future<__async_result_of<_Fn, _Args...>> -: 767: async(launch, _Fn&&, _Args&&...); -: 768: -: 769: typedef __basic_future<_Res> _Base_type; -: 770: typedef typename _Base_type::__state_type __state_type; -: 771: -: 772: explicit -: 773: future(const __state_type& __state) : _Base_type(__state) { } -: 774: -: 775: public: -: 776: constexpr future() noexcept : _Base_type() { } -: 777: -: 778: /// Move constructor -: 779: future(future&& __uf) noexcept : _Base_type(std::move(__uf)) { } -: 780: -: 781: // Disable copying -: 782: future(const future&) = delete; -: 783: future& operator=(const future&) = delete; -: 784: -: 785: future& operator=(future&& __fut) noexcept -: 786: { -: 787: future(std::move(__fut))._M_swap(*this); -: 788: return *this; -: 789: } -: 790: -: 791: /// Retrieving the value -: 792: _Res -: 793: get() -: 794: { -: 795: typename _Base_type::_Reset __reset(*this); -: 796: return std::move(this->_M_get_result()._M_value()); -: 797: } -: 798: -: 799: shared_future<_Res> share() noexcept; -: 800: }; -: 801: -: 802: /// Partial specialization for future -: 803: template -: 804: class future<_Res&> : public __basic_future<_Res&> -: 805: { -: 806: friend class promise<_Res&>; -: 807: template friend class packaged_task; -: 808: template -: 809: friend future<__async_result_of<_Fn, _Args...>> -: 810: async(launch, _Fn&&, _Args&&...); -: 811: -: 812: typedef __basic_future<_Res&> _Base_type; -: 813: typedef typename _Base_type::__state_type __state_type; -: 814: -: 815: explicit -: 816: future(const __state_type& __state) : _Base_type(__state) { } -: 817: -: 818: public: -: 819: constexpr future() noexcept : _Base_type() { } -: 820: -: 821: /// Move constructor -: 822: future(future&& __uf) noexcept : _Base_type(std::move(__uf)) { } -: 823: -: 824: // Disable copying -: 825: future(const future&) = delete; -: 826: future& operator=(const future&) = delete; -: 827: -: 828: future& operator=(future&& __fut) noexcept -: 829: { -: 830: future(std::move(__fut))._M_swap(*this); -: 831: return *this; -: 832: } -: 833: -: 834: /// Retrieving the value -: 835: _Res& -: 836: get() -: 837: { -: 838: typename _Base_type::_Reset __reset(*this); -: 839: return this->_M_get_result()._M_get(); -: 840: } -: 841: -: 842: shared_future<_Res&> share() noexcept; -: 843: }; -: 844: -: 845: /// Explicit specialization for future -: 846: template<> -: 847: class future : public __basic_future -: 848: { -: 849: friend class promise; -: 850: template friend class packaged_task; -: 851: template -: 852: friend future<__async_result_of<_Fn, _Args...>> -: 853: async(launch, _Fn&&, _Args&&...); -: 854: -: 855: typedef __basic_future _Base_type; -: 856: typedef typename _Base_type::__state_type __state_type; -: 857: -: 858: explicit -: 859: future(const __state_type& __state) : _Base_type(__state) { } -: 860: -: 861: public: -: 862: constexpr future() noexcept : _Base_type() { } -: 863: -: 864: /// Move constructor -: 865: future(future&& __uf) noexcept : _Base_type(std::move(__uf)) { } -: 866: -: 867: // Disable copying -: 868: future(const future&) = delete; -: 869: future& operator=(const future&) = delete; -: 870: -: 871: future& operator=(future&& __fut) noexcept -: 872: { -: 873: future(std::move(__fut))._M_swap(*this); -: 874: return *this; -: 875: } -: 876: -: 877: /// Retrieving the value -: 878: void -: 879: get() -: 880: { -: 881: typename _Base_type::_Reset __reset(*this); -: 882: this->_M_get_result(); -: 883: } -: 884: -: 885: shared_future share() noexcept; -: 886: }; -: 887: -: 888: -: 889: /// Primary template for shared_future. -: 890: template -: 891: class shared_future : public __basic_future<_Res> -: 892: { -: 893: typedef __basic_future<_Res> _Base_type; -: 894: -: 895: public: -: 896: constexpr shared_future() noexcept : _Base_type() { } -: 897: -: 898: /// Copy constructor -: 899: shared_future(const shared_future& __sf) noexcept : _Base_type(__sf) { } -: 900: -: 901: /// Construct from a future rvalue -: 902: shared_future(future<_Res>&& __uf) noexcept -: 903: : _Base_type(std::move(__uf)) -: 904: { } -: 905: -: 906: /// Construct from a shared_future rvalue -: 907: shared_future(shared_future&& __sf) noexcept -: 908: : _Base_type(std::move(__sf)) -: 909: { } -: 910: -: 911: shared_future& operator=(const shared_future& __sf) noexcept -: 912: { -: 913: shared_future(__sf)._M_swap(*this); -: 914: return *this; -: 915: } -: 916: -: 917: shared_future& operator=(shared_future&& __sf) noexcept -: 918: { -: 919: shared_future(std::move(__sf))._M_swap(*this); -: 920: return *this; -: 921: } -: 922: -: 923: /// Retrieving the value -: 924: const _Res& -: 925: get() const { return this->_M_get_result()._M_value(); } -: 926: }; -: 927: -: 928: /// Partial specialization for shared_future -: 929: template -: 930: class shared_future<_Res&> : public __basic_future<_Res&> -: 931: { -: 932: typedef __basic_future<_Res&> _Base_type; -: 933: -: 934: public: -: 935: constexpr shared_future() noexcept : _Base_type() { } -: 936: -: 937: /// Copy constructor -: 938: shared_future(const shared_future& __sf) : _Base_type(__sf) { } -: 939: -: 940: /// Construct from a future rvalue -: 941: shared_future(future<_Res&>&& __uf) noexcept -: 942: : _Base_type(std::move(__uf)) -: 943: { } -: 944: -: 945: /// Construct from a shared_future rvalue -: 946: shared_future(shared_future&& __sf) noexcept -: 947: : _Base_type(std::move(__sf)) -: 948: { } -: 949: -: 950: shared_future& operator=(const shared_future& __sf) -: 951: { -: 952: shared_future(__sf)._M_swap(*this); -: 953: return *this; -: 954: } -: 955: -: 956: shared_future& operator=(shared_future&& __sf) noexcept -: 957: { -: 958: shared_future(std::move(__sf))._M_swap(*this); -: 959: return *this; -: 960: } -: 961: -: 962: /// Retrieving the value -: 963: _Res& -: 964: get() const { return this->_M_get_result()._M_get(); } -: 965: }; -: 966: -: 967: /// Explicit specialization for shared_future -: 968: template<> -: 969: class shared_future : public __basic_future -: 970: { -: 971: typedef __basic_future _Base_type; -: 972: -: 973: public: -: 974: constexpr shared_future() noexcept : _Base_type() { } -: 975: -: 976: /// Copy constructor -: 977: shared_future(const shared_future& __sf) : _Base_type(__sf) { } -: 978: -: 979: /// Construct from a future rvalue -: 980: shared_future(future&& __uf) noexcept -: 981: : _Base_type(std::move(__uf)) -: 982: { } -: 983: -: 984: /// Construct from a shared_future rvalue -: 985: shared_future(shared_future&& __sf) noexcept -: 986: : _Base_type(std::move(__sf)) -: 987: { } -: 988: -: 989: shared_future& operator=(const shared_future& __sf) -: 990: { -: 991: shared_future(__sf)._M_swap(*this); -: 992: return *this; -: 993: } -: 994: -: 995: shared_future& operator=(shared_future&& __sf) noexcept -: 996: { -: 997: shared_future(std::move(__sf))._M_swap(*this); -: 998: return *this; -: 999: } -: 1000: -: 1001: // Retrieving the value -: 1002: void -: 1003: get() const { this->_M_get_result(); } -: 1004: }; -: 1005: -: 1006: // Now we can define the protected __basic_future constructors. -: 1007: template -: 1008: inline __basic_future<_Res>:: -: 1009: __basic_future(const shared_future<_Res>& __sf) noexcept -: 1010: : _M_state(__sf._M_state) -: 1011: { } -: 1012: -: 1013: template -: 1014: inline __basic_future<_Res>:: -: 1015: __basic_future(shared_future<_Res>&& __sf) noexcept -: 1016: : _M_state(std::move(__sf._M_state)) -: 1017: { } -: 1018: -: 1019: template -: 1020: inline __basic_future<_Res>:: -: 1021: __basic_future(future<_Res>&& __uf) noexcept -: 1022: : _M_state(std::move(__uf._M_state)) -: 1023: { } -: 1024: -: 1025: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1026: // 2556. Wide contract for future::share() -: 1027: template -: 1028: inline shared_future<_Res> -: 1029: future<_Res>::share() noexcept -: 1030: { return shared_future<_Res>(std::move(*this)); } -: 1031: -: 1032: template -: 1033: inline shared_future<_Res&> -: 1034: future<_Res&>::share() noexcept -: 1035: { return shared_future<_Res&>(std::move(*this)); } -: 1036: -: 1037: inline shared_future -: 1038: future::share() noexcept -: 1039: { return shared_future(std::move(*this)); } -: 1040: -: 1041: /// Primary template for promise -: 1042: template -: 1043: class promise -: 1044: { -: 1045: typedef __future_base::_State_base _State; -: 1046: typedef __future_base::_Result<_Res> _Res_type; -: 1047: typedef __future_base::_Ptr<_Res_type> _Ptr_type; -: 1048: template friend class _State::_Setter; -: 1049: friend _State; -: 1050: -: 1051: shared_ptr<_State> _M_future; -: 1052: _Ptr_type _M_storage; -: 1053: -: 1054: public: -: 1055: promise() -: 1056: : _M_future(std::make_shared<_State>()), -: 1057: _M_storage(new _Res_type()) -: 1058: { } -: 1059: -: 1060: promise(promise&& __rhs) noexcept -: 1061: : _M_future(std::move(__rhs._M_future)), -: 1062: _M_storage(std::move(__rhs._M_storage)) -: 1063: { } -: 1064: -: 1065: template -: 1066: promise(allocator_arg_t, const _Allocator& __a) -: 1067: : _M_future(std::allocate_shared<_State>(__a)), -: 1068: _M_storage(__future_base::_S_allocate_result<_Res>(__a)) -: 1069: { } -: 1070: -: 1071: template -: 1072: promise(allocator_arg_t, const _Allocator&, promise&& __rhs) -: 1073: : _M_future(std::move(__rhs._M_future)), -: 1074: _M_storage(std::move(__rhs._M_storage)) -: 1075: { } -: 1076: -: 1077: promise(const promise&) = delete; -: 1078: -: 1079: ~promise() -: 1080: { -: 1081: if (static_cast(_M_future) && !_M_future.unique()) -: 1082: _M_future->_M_break_promise(std::move(_M_storage)); -: 1083: } -: 1084: -: 1085: // Assignment -: 1086: promise& -: 1087: operator=(promise&& __rhs) noexcept -: 1088: { -: 1089: promise(std::move(__rhs)).swap(*this); -: 1090: return *this; -: 1091: } -: 1092: -: 1093: promise& operator=(const promise&) = delete; -: 1094: -: 1095: void -: 1096: swap(promise& __rhs) noexcept -: 1097: { -: 1098: _M_future.swap(__rhs._M_future); -: 1099: _M_storage.swap(__rhs._M_storage); -: 1100: } -: 1101: -: 1102: // Retrieving the result -: 1103: future<_Res> -: 1104: get_future() -: 1105: { return future<_Res>(_M_future); } -: 1106: -: 1107: // Setting the result -: 1108: void -: 1109: set_value(const _Res& __r) -: 1110: { _M_future->_M_set_result(_State::__setter(this, __r)); } -: 1111: -: 1112: void -: 1113: set_value(_Res&& __r) -: 1114: { _M_future->_M_set_result(_State::__setter(this, std::move(__r))); } -: 1115: -: 1116: void -: 1117: set_exception(exception_ptr __p) -: 1118: { _M_future->_M_set_result(_State::__setter(__p, this)); } -: 1119: -: 1120: void -: 1121: set_value_at_thread_exit(const _Res& __r) -: 1122: { -: 1123: _M_future->_M_set_delayed_result(_State::__setter(this, __r), -: 1124: _M_future); -: 1125: } -: 1126: -: 1127: void -: 1128: set_value_at_thread_exit(_Res&& __r) -: 1129: { -: 1130: _M_future->_M_set_delayed_result( -: 1131: _State::__setter(this, std::move(__r)), _M_future); -: 1132: } -: 1133: -: 1134: void -: 1135: set_exception_at_thread_exit(exception_ptr __p) -: 1136: { -: 1137: _M_future->_M_set_delayed_result(_State::__setter(__p, this), -: 1138: _M_future); -: 1139: } -: 1140: }; -: 1141: -: 1142: template -: 1143: inline void -: 1144: swap(promise<_Res>& __x, promise<_Res>& __y) noexcept -: 1145: { __x.swap(__y); } -: 1146: -: 1147: template -: 1148: struct uses_allocator, _Alloc> -: 1149: : public true_type { }; -: 1150: -: 1151: -: 1152: /// Partial specialization for promise -: 1153: template -: 1154: class promise<_Res&> -: 1155: { -: 1156: typedef __future_base::_State_base _State; -: 1157: typedef __future_base::_Result<_Res&> _Res_type; -: 1158: typedef __future_base::_Ptr<_Res_type> _Ptr_type; -: 1159: template friend class _State::_Setter; -: 1160: friend _State; -: 1161: -: 1162: shared_ptr<_State> _M_future; -: 1163: _Ptr_type _M_storage; -: 1164: -: 1165: public: -: 1166: promise() -: 1167: : _M_future(std::make_shared<_State>()), -: 1168: _M_storage(new _Res_type()) -: 1169: { } -: 1170: -: 1171: promise(promise&& __rhs) noexcept -: 1172: : _M_future(std::move(__rhs._M_future)), -: 1173: _M_storage(std::move(__rhs._M_storage)) -: 1174: { } -: 1175: -: 1176: template -: 1177: promise(allocator_arg_t, const _Allocator& __a) -: 1178: : _M_future(std::allocate_shared<_State>(__a)), -: 1179: _M_storage(__future_base::_S_allocate_result<_Res&>(__a)) -: 1180: { } -: 1181: -: 1182: template -: 1183: promise(allocator_arg_t, const _Allocator&, promise&& __rhs) -: 1184: : _M_future(std::move(__rhs._M_future)), -: 1185: _M_storage(std::move(__rhs._M_storage)) -: 1186: { } -: 1187: -: 1188: promise(const promise&) = delete; -: 1189: -: 1190: ~promise() -: 1191: { -: 1192: if (static_cast(_M_future) && !_M_future.unique()) -: 1193: _M_future->_M_break_promise(std::move(_M_storage)); -: 1194: } -: 1195: -: 1196: // Assignment -: 1197: promise& -: 1198: operator=(promise&& __rhs) noexcept -: 1199: { -: 1200: promise(std::move(__rhs)).swap(*this); -: 1201: return *this; -: 1202: } -: 1203: -: 1204: promise& operator=(const promise&) = delete; -: 1205: -: 1206: void -: 1207: swap(promise& __rhs) noexcept -: 1208: { -: 1209: _M_future.swap(__rhs._M_future); -: 1210: _M_storage.swap(__rhs._M_storage); -: 1211: } -: 1212: -: 1213: // Retrieving the result -: 1214: future<_Res&> -: 1215: get_future() -: 1216: { return future<_Res&>(_M_future); } -: 1217: -: 1218: // Setting the result -: 1219: void -: 1220: set_value(_Res& __r) -: 1221: { _M_future->_M_set_result(_State::__setter(this, __r)); } -: 1222: -: 1223: void -: 1224: set_exception(exception_ptr __p) -: 1225: { _M_future->_M_set_result(_State::__setter(__p, this)); } -: 1226: -: 1227: void -: 1228: set_value_at_thread_exit(_Res& __r) -: 1229: { -: 1230: _M_future->_M_set_delayed_result(_State::__setter(this, __r), -: 1231: _M_future); -: 1232: } -: 1233: -: 1234: void -: 1235: set_exception_at_thread_exit(exception_ptr __p) -: 1236: { -: 1237: _M_future->_M_set_delayed_result(_State::__setter(__p, this), -: 1238: _M_future); -: 1239: } -: 1240: }; -: 1241: -: 1242: /// Explicit specialization for promise -: 1243: template<> -: 1244: class promise -: 1245: { -: 1246: typedef __future_base::_State_base _State; -: 1247: typedef __future_base::_Result _Res_type; -: 1248: typedef __future_base::_Ptr<_Res_type> _Ptr_type; -: 1249: template friend class _State::_Setter; -: 1250: friend _State; -: 1251: -: 1252: shared_ptr<_State> _M_future; -: 1253: _Ptr_type _M_storage; -: 1254: -: 1255: public: -: 1256: promise() -: 1257: : _M_future(std::make_shared<_State>()), -: 1258: _M_storage(new _Res_type()) -: 1259: { } -: 1260: -: 1261: promise(promise&& __rhs) noexcept -: 1262: : _M_future(std::move(__rhs._M_future)), -: 1263: _M_storage(std::move(__rhs._M_storage)) -: 1264: { } -: 1265: -: 1266: template -: 1267: promise(allocator_arg_t, const _Allocator& __a) -: 1268: : _M_future(std::allocate_shared<_State>(__a)), -: 1269: _M_storage(__future_base::_S_allocate_result(__a)) -: 1270: { } -: 1271: -: 1272: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1273: // 2095. missing constructors needed for uses-allocator construction -: 1274: template -: 1275: promise(allocator_arg_t, const _Allocator&, promise&& __rhs) -: 1276: : _M_future(std::move(__rhs._M_future)), -: 1277: _M_storage(std::move(__rhs._M_storage)) -: 1278: { } -: 1279: -: 1280: promise(const promise&) = delete; -: 1281: -: 1282: ~promise() -: 1283: { -: 1284: if (static_cast(_M_future) && !_M_future.unique()) -: 1285: _M_future->_M_break_promise(std::move(_M_storage)); -: 1286: } -: 1287: -: 1288: // Assignment -: 1289: promise& -: 1290: operator=(promise&& __rhs) noexcept -: 1291: { -: 1292: promise(std::move(__rhs)).swap(*this); -: 1293: return *this; -: 1294: } -: 1295: -: 1296: promise& operator=(const promise&) = delete; -: 1297: -: 1298: void -: 1299: swap(promise& __rhs) noexcept -: 1300: { -: 1301: _M_future.swap(__rhs._M_future); -: 1302: _M_storage.swap(__rhs._M_storage); -: 1303: } -: 1304: -: 1305: // Retrieving the result -: 1306: future -: 1307: get_future() -: 1308: { return future(_M_future); } -: 1309: -: 1310: // Setting the result -: 1311: void -: 1312: set_value() -: 1313: { _M_future->_M_set_result(_State::__setter(this)); } -: 1314: -: 1315: void -: 1316: set_exception(exception_ptr __p) -: 1317: { _M_future->_M_set_result(_State::__setter(__p, this)); } -: 1318: -: 1319: void -: 1320: set_value_at_thread_exit() -: 1321: { _M_future->_M_set_delayed_result(_State::__setter(this), _M_future); } -: 1322: -: 1323: void -: 1324: set_exception_at_thread_exit(exception_ptr __p) -: 1325: { -: 1326: _M_future->_M_set_delayed_result(_State::__setter(__p, this), -: 1327: _M_future); -: 1328: } -: 1329: }; -: 1330: -: 1331: template -: 1332: struct __future_base::_Task_setter -: 1333: { -: 1334: // Invoke the function and provide the result to the caller. -: 1335: _Ptr_type operator()() const -: 1336: { -: 1337: __try -: 1338: { -: 1339: (*_M_result)->_M_set((*_M_fn)()); -: 1340: } -: 1341: __catch(const __cxxabiv1::__forced_unwind&) -: 1342: { -: 1343: __throw_exception_again; // will cause broken_promise -: 1344: } -: 1345: __catch(...) -: 1346: { -: 1347: (*_M_result)->_M_error = current_exception(); -: 1348: } -: 1349: return std::move(*_M_result); -: 1350: } -: 1351: _Ptr_type* _M_result; -: 1352: _Fn* _M_fn; -: 1353: }; -: 1354: -: 1355: template -: 1356: struct __future_base::_Task_setter<_Ptr_type, _Fn, void> -: 1357: { -: 1358: _Ptr_type operator()() const -: 1359: { -: 1360: __try -: 1361: { -: 1362: (*_M_fn)(); -: 1363: } -: 1364: __catch(const __cxxabiv1::__forced_unwind&) -: 1365: { -: 1366: __throw_exception_again; // will cause broken_promise -: 1367: } -: 1368: __catch(...) -: 1369: { -: 1370: (*_M_result)->_M_error = current_exception(); -: 1371: } -: 1372: return std::move(*_M_result); -: 1373: } -: 1374: _Ptr_type* _M_result; -: 1375: _Fn* _M_fn; -: 1376: }; -: 1377: -: 1378: // Holds storage for a packaged_task's result. -: 1379: template -: 1380: struct __future_base::_Task_state_base<_Res(_Args...)> -: 1381: : __future_base::_State_base -: 1382: { -: 1383: typedef _Res _Res_type; -: 1384: -: 1385: template -: 1386: _Task_state_base(const _Alloc& __a) -: 1387: : _M_result(_S_allocate_result<_Res>(__a)) -: 1388: { } -: 1389: -: 1390: // Invoke the stored task and make the state ready. -: 1391: virtual void -: 1392: _M_run(_Args&&... __args) = 0; -: 1393: -: 1394: // Invoke the stored task and make the state ready at thread exit. -: 1395: virtual void -: 1396: _M_run_delayed(_Args&&... __args, weak_ptr<_State_base>) = 0; -: 1397: -: 1398: virtual shared_ptr<_Task_state_base> -: 1399: _M_reset() = 0; -: 1400: -: 1401: typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; -: 1402: _Ptr_type _M_result; -: 1403: }; -: 1404: -: 1405: // Holds a packaged_task's stored task. -: 1406: template -: 1407: struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final -: 1408: : __future_base::_Task_state_base<_Res(_Args...)> -: 1409: { -: 1410: template -: 1411: _Task_state(_Fn2&& __fn, const _Alloc& __a) -: 1412: : _Task_state_base<_Res(_Args...)>(__a), -: 1413: _M_impl(std::forward<_Fn2>(__fn), __a) -: 1414: { } -: 1415: -: 1416: private: -: 1417: virtual void -: 1418: _M_run(_Args&&... __args) -: 1419: { -: 1420: auto __boundfn = [&] () -> typename result_of<_Fn&(_Args&&...)>::type { -: 1421: return std::__invoke(_M_impl._M_fn, std::forward<_Args>(__args)...); -: 1422: }; -: 1423: this->_M_set_result(_S_task_setter(this->_M_result, __boundfn)); -: 1424: } -: 1425: -: 1426: virtual void -: 1427: _M_run_delayed(_Args&&... __args, weak_ptr<_State_base> __self) -: 1428: { -: 1429: auto __boundfn = [&] () -> typename result_of<_Fn&(_Args&&...)>::type { -: 1430: return std::__invoke(_M_impl._M_fn, std::forward<_Args>(__args)...); -: 1431: }; -: 1432: this->_M_set_delayed_result(_S_task_setter(this->_M_result, __boundfn), -: 1433: std::move(__self)); -: 1434: } -: 1435: -: 1436: virtual shared_ptr<_Task_state_base<_Res(_Args...)>> -: 1437: _M_reset(); -: 1438: -: 1439: struct _Impl : _Alloc -: 1440: { -: 1441: template -: 1442: _Impl(_Fn2&& __fn, const _Alloc& __a) -: 1443: : _Alloc(__a), _M_fn(std::forward<_Fn2>(__fn)) { } -: 1444: _Fn _M_fn; -: 1445: } _M_impl; -: 1446: }; -: 1447: -: 1448: template -: 1449: static shared_ptr<__future_base::_Task_state_base<_Signature>> -: 1450: __create_task_state(_Fn&& __fn, const _Alloc& __a) -: 1451: { -: 1452: typedef typename decay<_Fn>::type _Fn2; -: 1453: typedef __future_base::_Task_state<_Fn2, _Alloc, _Signature> _State; -: 1454: return std::allocate_shared<_State>(__a, std::forward<_Fn>(__fn), __a); -: 1455: } -: 1456: -: 1457: template -: 1458: shared_ptr<__future_base::_Task_state_base<_Res(_Args...)>> -: 1459: __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)>::_M_reset() -: 1460: { -: 1461: return __create_task_state<_Res(_Args...)>(std::move(_M_impl._M_fn), -: 1462: static_cast<_Alloc&>(_M_impl)); -: 1463: } -: 1464: -: 1465: /// packaged_task -: 1466: template -: 1467: class packaged_task<_Res(_ArgTypes...)> -: 1468: { -: 1469: typedef __future_base::_Task_state_base<_Res(_ArgTypes...)> _State_type; -: 1470: shared_ptr<_State_type> _M_state; -: 1471: -: 1472: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1473: // 3039. Unnecessary decay in thread and packaged_task -: 1474: template> -: 1475: using __not_same -: 1476: = typename enable_if::value>::type; -: 1477: -: 1478: public: -: 1479: // Construction and destruction -: 1480: packaged_task() noexcept { } -: 1481: -: 1482: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1483: // 2095. missing constructors needed for uses-allocator construction -: 1484: template -: 1485: packaged_task(allocator_arg_t, const _Allocator& __a) noexcept -: 1486: { } -: 1487: -: 1488: template> -: 1489: explicit -: 1490: packaged_task(_Fn&& __fn) -: 1491: : packaged_task(allocator_arg, std::allocator(), -: 1492: std::forward<_Fn>(__fn)) -: 1493: { } -: 1494: -: 1495: // _GLIBCXX_RESOLVE_LIB_DEFECTS -: 1496: // 2097. packaged_task constructors should be constrained -: 1497: // 2407. [this constructor should not be] explicit -: 1498: template> -: 1499: packaged_task(allocator_arg_t, const _Alloc& __a, _Fn&& __fn) -: 1500: : _M_state(__create_task_state<_Res(_ArgTypes...)>( -: 1501: std::forward<_Fn>(__fn), __a)) -: 1502: { } -: 1503: -: 1504: ~packaged_task() -: 1505: { -: 1506: if (static_cast(_M_state) && !_M_state.unique()) -: 1507: _M_state->_M_break_promise(std::move(_M_state->_M_result)); -: 1508: } -: 1509: -: 1510: // No copy -: 1511: packaged_task(const packaged_task&) = delete; -: 1512: packaged_task& operator=(const packaged_task&) = delete; -: 1513: -: 1514: template -: 1515: packaged_task(allocator_arg_t, const _Allocator&, -: 1516: const packaged_task&) = delete; -: 1517: -: 1518: // Move support -: 1519: packaged_task(packaged_task&& __other) noexcept -: 1520: { this->swap(__other); } -: 1521: -: 1522: template -: 1523: packaged_task(allocator_arg_t, const _Allocator&, -: 1524: packaged_task&& __other) noexcept -: 1525: { this->swap(__other); } -: 1526: -: 1527: packaged_task& operator=(packaged_task&& __other) noexcept -: 1528: { -: 1529: packaged_task(std::move(__other)).swap(*this); -: 1530: return *this; -: 1531: } -: 1532: -: 1533: void -: 1534: swap(packaged_task& __other) noexcept -: 1535: { _M_state.swap(__other._M_state); } -: 1536: -: 1537: bool -: 1538: valid() const noexcept -: 1539: { return static_cast(_M_state); } -: 1540: -: 1541: // Result retrieval -: 1542: future<_Res> -: 1543: get_future() -: 1544: { return future<_Res>(_M_state); } -: 1545: -: 1546: // Execution -: 1547: void -: 1548: operator()(_ArgTypes... __args) -: 1549: { -: 1550: __future_base::_State_base::_S_check(_M_state); -: 1551: _M_state->_M_run(std::forward<_ArgTypes>(__args)...); -: 1552: } -: 1553: -: 1554: void -: 1555: make_ready_at_thread_exit(_ArgTypes... __args) -: 1556: { -: 1557: __future_base::_State_base::_S_check(_M_state); -: 1558: _M_state->_M_run_delayed(std::forward<_ArgTypes>(__args)..., _M_state); -: 1559: } -: 1560: -: 1561: void -: 1562: reset() -: 1563: { -: 1564: __future_base::_State_base::_S_check(_M_state); -: 1565: packaged_task __tmp; -: 1566: __tmp._M_state = _M_state; -: 1567: _M_state = _M_state->_M_reset(); -: 1568: } -: 1569: }; -: 1570: -: 1571: /// swap -: 1572: template -: 1573: inline void -: 1574: swap(packaged_task<_Res(_ArgTypes...)>& __x, -: 1575: packaged_task<_Res(_ArgTypes...)>& __y) noexcept -: 1576: { __x.swap(__y); } -: 1577: -: 1578: template -: 1579: struct uses_allocator, _Alloc> -: 1580: : public true_type { }; -: 1581: -: 1582: -: 1583: // Shared state created by std::async(). -: 1584: // Holds a deferred function and storage for its result. -: 1585: template -: 1586: class __future_base::_Deferred_state final -: 1587: : public __future_base::_State_base -: 1588: { -: 1589: public: -: 1590: explicit -: 1591: _Deferred_state(_BoundFn&& __fn) -: 1592: : _M_result(new _Result<_Res>()), _M_fn(std::move(__fn)) -: 1593: { } -: 1594: -: 1595: private: -: 1596: typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; -: 1597: _Ptr_type _M_result; -: 1598: _BoundFn _M_fn; -: 1599: -: 1600: // Run the deferred function. -: 1601: virtual void -: 1602: _M_complete_async() -: 1603: { -: 1604: // Multiple threads can call a waiting function on the future and -: 1605: // reach this point at the same time. The call_once in _M_set_result -: 1606: // ensures only the first one run the deferred function, stores the -: 1607: // result in _M_result, swaps that with the base _M_result and makes -: 1608: // the state ready. Tell _M_set_result to ignore failure so all later -: 1609: // calls do nothing. -: 1610: _M_set_result(_S_task_setter(_M_result, _M_fn), true); -: 1611: } -: 1612: -: 1613: // Caller should check whether the state is ready first, because this -: 1614: // function will return true even after the deferred function has run. -: 1615: virtual bool _M_is_deferred_future() const { return true; } -: 1616: }; -: 1617: -: 1618: // Common functionality hoisted out of the _Async_state_impl template. -: 1619: class __future_base::_Async_state_commonV2 -: 1620: : public __future_base::_State_base -: 1621: { -: 1622: protected: -: 1623: ~_Async_state_commonV2() = default; -: 1624: -: 1625: // Make waiting functions block until the thread completes, as if joined. -: 1626: // -: 1627: // This function is used by wait() to satisfy the first requirement below -: 1628: // and by wait_for() / wait_until() to satisfy the second. -: 1629: // -: 1630: // [futures.async]: -: 1631: // -: 1632: // - a call to a waiting function on an asynchronous return object that -: 1633: // shares the shared state created by this async call shall block until -: 1634: // the associated thread has completed, as if joined, or else time out. -: 1635: // -: 1636: // - the associated thread completion synchronizes with the return from -: 1637: // the first function that successfully detects the ready status of the -: 1638: // shared state or with the return from the last function that releases -: 1639: // the shared state, whichever happens first. -: 1640: virtual void _M_complete_async() { _M_join(); } -: 1641: -: 1642: void _M_join() { std::call_once(_M_once, &thread::join, &_M_thread); } -: 1643: -: 1644: thread _M_thread; -: 1645: once_flag _M_once; -: 1646: }; -: 1647: -: 1648: // Shared state created by std::async(). -: 1649: // Starts a new thread that runs a function and makes the shared state ready. -: 1650: template -: 1651: class __future_base::_Async_state_impl final -: 1652: : public __future_base::_Async_state_commonV2 -: 1653: { -: 1654: public: -: 1655: explicit -: 1656: _Async_state_impl(_BoundFn&& __fn) -: 1657: : _M_result(new _Result<_Res>()), _M_fn(std::move(__fn)) -: 1658: { -: 1659: _M_thread = std::thread{ [this] { -: 1660: __try -: 1661: { -: 1662: _M_set_result(_S_task_setter(_M_result, _M_fn)); -: 1663: } -: 1664: __catch (const __cxxabiv1::__forced_unwind&) -: 1665: { -: 1666: // make the shared state ready on thread cancellation -: 1667: if (static_cast(_M_result)) -: 1668: this->_M_break_promise(std::move(_M_result)); -: 1669: __throw_exception_again; -: 1670: } -: 1671: } }; -: 1672: } -: 1673: -: 1674: // Must not destroy _M_result and _M_fn until the thread finishes. -: 1675: // Call join() directly rather than through _M_join() because no other -: 1676: // thread can be referring to this state if it is being destroyed. -: 1677: ~_Async_state_impl() { if (_M_thread.joinable()) _M_thread.join(); } -: 1678: -: 1679: private: -: 1680: typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; -: 1681: _Ptr_type _M_result; -: 1682: _BoundFn _M_fn; -: 1683: }; -: 1684: -: 1685: template -: 1686: inline std::shared_ptr<__future_base::_State_base> -: 1687: __future_base::_S_make_deferred_state(_BoundFn&& __fn) -: 1688: { -: 1689: typedef typename remove_reference<_BoundFn>::type __fn_type; -: 1690: typedef _Deferred_state<__fn_type> __state_type; -: 1691: return std::make_shared<__state_type>(std::move(__fn)); -: 1692: } -: 1693: -: 1694: template -: 1695: inline std::shared_ptr<__future_base::_State_base> -: 1696: __future_base::_S_make_async_state(_BoundFn&& __fn) -: 1697: { -: 1698: typedef typename remove_reference<_BoundFn>::type __fn_type; -: 1699: typedef _Async_state_impl<__fn_type> __state_type; -: 1700: return std::make_shared<__state_type>(std::move(__fn)); -: 1701: } -: 1702: -: 1703: -: 1704: /// async -: 1705: template -: 1706: _GLIBCXX_NODISCARD future<__async_result_of<_Fn, _Args...>> -: 1707: async(launch __policy, _Fn&& __fn, _Args&&... __args) -: 1708: { -: 1709: std::shared_ptr<__future_base::_State_base> __state; -: 1710: if ((__policy & launch::async) == launch::async) -: 1711: { -: 1712: __try -: 1713: { -: 1714: __state = __future_base::_S_make_async_state( -: 1715: std::thread::__make_invoker(std::forward<_Fn>(__fn), -: 1716: std::forward<_Args>(__args)...) -: 1717: ); -: 1718: } -: 1719:#if __cpp_exceptions -: 1720: catch(const system_error& __e) -: 1721: { -: 1722: if (__e.code() != errc::resource_unavailable_try_again -: 1723: || (__policy & launch::deferred) != launch::deferred) -: 1724: throw; -: 1725: } -: 1726:#endif -: 1727: } -: 1728: if (!__state) -: 1729: { -: 1730: __state = __future_base::_S_make_deferred_state( -: 1731: std::thread::__make_invoker(std::forward<_Fn>(__fn), -: 1732: std::forward<_Args>(__args)...)); -: 1733: } -: 1734: return future<__async_result_of<_Fn, _Args...>>(__state); -: 1735: } -: 1736: -: 1737: /// async, potential overload -: 1738: template -: 1739: _GLIBCXX_NODISCARD inline future<__async_result_of<_Fn, _Args...>> -: 1740: async(_Fn&& __fn, _Args&&... __args) -: 1741: { -: 1742: return std::async(launch::async|launch::deferred, -: 1743: std::forward<_Fn>(__fn), -: 1744: std::forward<_Args>(__args)...); -: 1745: } -: 1746: -: 1747:#endif // _GLIBCXX_ASYNC_ABI_COMPAT -: 1748:#endif // _GLIBCXX_HAS_GTHREADS -: 1749: -: 1750: /// @} group futures -: 1751:_GLIBCXX_END_NAMESPACE_VERSION -: 1752:} // namespace -: 1753: -: 1754:#endif // C++11 -: 1755: -: 1756:#endif // _GLIBCXX_FUTURE <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#xmss#xmss_verification_operation.cpp.gcov -: 0:Source:src/lib/pubkey/xmss/xmss_verification_operation.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_xmss_verification_operation.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_xmss_verification_operation.gcda -: 0:Runs:2960 -: 1:/* -: 2: * XMSS Verification Operation -: 3: * Provides signature verification capabilities for Extended Hash-Based -: 4: * Signatures (XMSS). -: 5: * -: 6: * (C) 2016,2017 Matthias Gierlings -: 7: * -: 8: * Botan is released under the Simplified BSD License (see license.txt) -: 9: **/ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15: -: 16:namespace Botan { -: 17: 390*: 18:XMSS_Verification_Operation::XMSS_Verification_Operation( 390: 19: const XMSS_PublicKey& public_key) : -: 20: m_pub_key(public_key), #####: 21: m_hash(public_key.xmss_hash_function()), 780*: 22: m_msg_buf(0) -: 23: { 390*: 24: } ------------------ _ZN5Botan27XMSS_Verification_OperationC1ERKNS_14XMSS_PublicKeyE: function _ZN5Botan27XMSS_Verification_OperationC1ERKNS_14XMSS_PublicKeyE called 390 returned 100% blocks executed 46% 390: 18:XMSS_Verification_Operation::XMSS_Verification_Operation( 390: 19: const XMSS_PublicKey& public_key) : -: 20: m_pub_key(public_key), #####: 21: m_hash(public_key.xmss_hash_function()), call 0 never executed 780: 22: m_msg_buf(0) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 never executed -: 23: { 390: 24: } ------------------ _ZN5Botan27XMSS_Verification_OperationC2ERKNS_14XMSS_PublicKeyE: function _ZN5Botan27XMSS_Verification_OperationC2ERKNS_14XMSS_PublicKeyE called 0 returned 0% blocks executed 0% #####: 18:XMSS_Verification_Operation::XMSS_Verification_Operation( -: 19: const XMSS_PublicKey& public_key) : -: 20: m_pub_key(public_key), #####: 21: m_hash(public_key.xmss_hash_function()), call 0 never executed #####: 22: m_msg_buf(0) call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed -: 23: { #####: 24: } ------------------ -: 25: -: 26:secure_vector function _ZN5Botan27XMSS_Verification_Operation19root_from_signatureERKNS_14XMSS_SignatureERKSt6vectorIhNS_16secure_allocatorIhEEERNS_12XMSS_AddressES9_ called 1237 returned 100% blocks executed 82% 1237: 27:XMSS_Verification_Operation::root_from_signature(const XMSS_Signature& sig, -: 28: const secure_vector& msg, -: 29: XMSS_Address& adrs, -: 30: const secure_vector& seed) -: 31: { 2474: 32: const auto params = m_pub_key.xmss_parameters(); call 0 returned 100% call 1 returned 100% call 2 never executed -: 33: 1237: 34: const uint32_t next_index = static_cast(sig.unused_leaf_index()); call 0 returned 100% 1237: 35: adrs.set_type(XMSS_Address::Type::OTS_Hash_Address); call 0 returned 100% 1237: 36: adrs.set_ots_address(next_index); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 37: 1237: 38: XMSS_WOTS_PublicKey pub_key_ots(m_pub_key.wots_parameters().oid(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 39: msg, 1237: 40: sig.tree().ots_signature(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 41: adrs, 2474: 42: seed); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 43: 1237: 44: adrs.set_type(XMSS_Address::Type::LTree_Address); call 0 returned 100% 1237: 45: adrs.set_ltree_address(next_index); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 46: 4948: 47: std::array, 2> node; branch 0 taken 67% (fallthrough) branch 1 taken 33% call 2 returned 100% 1237: 48: XMSS_Common_Ops::create_l_tree(node[0], pub_key_ots, adrs, seed, m_hash, 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% call 7 never executed call 8 never executed -: 49: 1237: 50: adrs.set_type(XMSS_Address::Type::Hash_Tree_Address); call 0 returned 100% 1237: 51: adrs.set_tree_index(next_index); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 52: 18811: 53: for(size_t k = 0; k < params.tree_height(); k++) branch 0 taken 93% (fallthrough) branch 1 taken 7% -: 54: { 17574: 55: adrs.set_tree_height(static_cast(k)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 17574: 56: if(((next_index / (static_cast(1) << k)) & 0x01) == 0) branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 57: { 17523: 58: adrs.set_tree_index(adrs.get_tree_index() >> 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) 17523: 59: XMSS_Common_Ops::randomize_tree_hash(node[1], 17523: 60: node[0], call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 17523: 61: sig.tree().authentication_path()[k], call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 62: adrs, -: 63: seed, 17523: 64: m_hash, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 65: params); -: 66: } -: 67: else -: 68: { 51: 69: adrs.set_tree_index((adrs.get_tree_index() - 1) >> 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) 51: 70: XMSS_Common_Ops::randomize_tree_hash(node[1], 51: 71: sig.tree().authentication_path()[k], call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 51: 72: node[0], call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 73: adrs, -: 74: seed, 51: 75: m_hash, call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 76: params); -: 77: } 17574: 78: node[0] = node[1]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 79: } 2474: 80: return node[0]; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 81: } -: 82: -: 83:bool function _ZN5Botan27XMSS_Verification_Operation6verifyERKNS_14XMSS_SignatureERKSt6vectorIhNS_16secure_allocatorIhEEERKNS_14XMSS_PublicKeyE called 1237 returned 100% blocks executed 61% 1237: 84:XMSS_Verification_Operation::verify(const XMSS_Signature& sig, -: 85: const secure_vector& msg, -: 86: const XMSS_PublicKey& public_key) -: 87: { 1237: 88: XMSS_Address adrs; call 0 returned 100% 2474: 89: secure_vector index_bytes; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 1237: 90: XMSS_Tools::concat(index_bytes, 1237: 91: sig.unused_leaf_index(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1237: 92: m_pub_key.xmss_parameters().element_size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1237: 93: secure_vector msg_digest = #####: 94: m_hash.h_msg(sig.randomness(), branch 0 never executed branch 1 never executed -: 95: public_key.root(), -: 96: index_bytes, 2474: 97: 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% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 98: 1237: 99: secure_vector node = root_from_signature(sig, -: 100: msg_digest, -: 101: adrs, 2474: 102: public_key.public_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 100% (fallthrough) branch 7 taken 0% -: 103: 2474: 104: return (node == public_key.root()); branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 105: } -: 106: -: 107:// FIXME: XMSS signature verification requires the "randomness" parameter out -: 108:// of the XMSS signature, which is part of the prefix that is hashed before -: 109:// msg. Since the signature is unknown till sign() is called all message -: 110:// content has to be buffered. For large messages this can be inconvenient or -: 111:// impossible. -: 112:// Possible solution: Change PK_Ops::Verification interface to take the -: 113:// signature as constructor argument, make sign a parameterless member call. function _ZN5Botan27XMSS_Verification_Operation6updateEPKhm called 1399 returned 100% blocks executed 100% 1399: 114:void XMSS_Verification_Operation::update(const uint8_t msg[], size_t msg_len) -: 115: { 1399: 116: std::copy(msg, msg + msg_len, std::back_inserter(m_msg_buf)); 1399: 117: } -: 118: function _ZN5Botan27XMSS_Verification_Operation18is_valid_signatureEPKhm called 1399 returned 100% blocks executed 91% 1399: 119:bool XMSS_Verification_Operation::is_valid_signature(const uint8_t sig[], -: 120: size_t sig_len) -: 121: { 1399: 122: try -: 123: { 1399: 124: XMSS_Signature signature(m_pub_key.xmss_parameters().oid(), call 0 returned 100% branch 1 taken 88% (fallthrough) branch 2 taken 12% (throw) 1561: 125: secure_vector(sig, sig + sig_len)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 88% (fallthrough) branch 5 taken 12% (throw) call 6 never executed 1237: 126: bool result = verify(signature, m_msg_buf, m_pub_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1237: 127: m_msg_buf.clear(); branch 0 taken 66% (fallthrough) branch 1 taken 34% 1237: 128: return result; call 0 returned 100% -: 129: } 162: 130: catch(...) call 0 returned 100% -: 131: { 162: 132: m_msg_buf.clear(); branch 0 taken 67% (fallthrough) branch 1 taken 33% 162: 133: return false; -: 134: } -: 135: } -: 136: -: 137:} -: 138: <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#cascade.h.gcov -: 0:Source:build/include/botan/cascade.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/block_cascade.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/block_cascade.gcda -: 0:Runs:2960 -: 1:/* -: 2:* Block Cipher Cascade -: 3:* (C) 2010 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_CASCADE_H_ -: 9:#define BOTAN_CASCADE_H_ -: 10: -: 11:#include -: 12: -: 13:BOTAN_FUTURE_INTERNAL_HEADER(cascade.h) -: 14: -: 15:namespace Botan { -: 16: -: 17:/** -: 18:* Block Cipher Cascade -: 19:*/ -: 20:class BOTAN_PUBLIC_API(2,0) Cascade_Cipher final : public BlockCipher -: 21: { -: 22: public: -: 23: void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; -: 24: void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; -: 25: function _ZNK5Botan14Cascade_Cipher10block_sizeEv called 96 returned 100% blocks executed 100% 54: 26: size_t block_size() const override { return m_block; } call 0 returned 100% call 1 returned 100% call 2 returned 100% -: 27: function _ZNK5Botan14Cascade_Cipher8key_specEv called 36 returned 100% blocks executed 100% 36: 28: Key_Length_Specification key_spec() const override -: 29: { 36: 30: return Key_Length_Specification(m_cipher1->maximum_keylength() + call 0 returned 100% 36: 31: m_cipher2->maximum_keylength()); call 0 returned 100% -: 32: } -: 33: -: 34: void clear() override; -: 35: std::string name() const override; -: 36: BlockCipher* clone() const override; -: 37: -: 38: /** -: 39: * Create a cascade of two block ciphers -: 40: * @param cipher1 the first cipher -: 41: * @param cipher2 the second cipher -: 42: */ -: 43: Cascade_Cipher(BlockCipher* cipher1, BlockCipher* cipher2); -: 44: -: 45: Cascade_Cipher(const Cascade_Cipher&) = delete; -: 46: Cascade_Cipher& operator=(const Cascade_Cipher&) = delete; -: 47: private: -: 48: void key_schedule(const uint8_t[], size_t) override; -: 49: -: 50: size_t m_block; -: 51: std::unique_ptr m_cipher1, m_cipher2; -: 52: }; -: 53: -: 54: -: 55:} -: 56: -: 57:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#fuzzer#barrett.cpp.gcov -: 0:Source:src/fuzzer/barrett.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/fuzzer/barrett.gcno -: 0:Data:- -: 0:Runs:0 -: 1:/* -: 2:* (C) 2018,2020 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:#include -: 11: function _Z4fuzzPKhm called 0 returned 0% blocks executed 0% #####: 12:void fuzz(const uint8_t in[], size_t len) -: 13: { #####: 14: static const size_t max_bits = 4096; -: 15: #####: 16: if(len <= 4) branch 0 never executed branch 1 never executed #####: 17: return; -: 18: #####: 19: if(len > 2*(max_bits/8)) branch 0 never executed branch 1 never executed -: 20: return; -: 21: #####: 22: const size_t x_len = 2 * ((len + 2) / 3); -: 23: #####: 24: Botan::BigInt x = Botan::BigInt::decode(in, x_len); call 0 never executed #####: 25: const Botan::BigInt p = Botan::BigInt::decode(in + x_len, len - x_len); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 26: #####: 27: if(p.is_zero()) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 28: return; branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed -: 29: #####: 30: const size_t x_bits = x.bits(); call 0 never executed branch 1 never executed branch 2 never executed #####: 31: if(x_bits % 8 == 0 && x_bits / 8 == x_len) branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed #####: 32: x.flip_sign(); branch 0 never executed branch 1 never executed -: 33: #####: 34: const Botan::BigInt ref = x % p; call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 35: #####: 36: const Botan::Modular_Reducer mod_p(p); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed call 5 never executed #####: 37: const Botan::BigInt z = mod_p.reduce(x); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed -: 38: #####: 39: const Botan::BigInt ct = ct_modulo(x, p); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 40: #####: 41: if(ref != z || ref != ct) 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 -: 42: { #####: 43: FUZZER_WRITE_AND_CRASH("X = " << x << "\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 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 -: 44: << "P = " << p << "\n" -: 45: << "Barrett = " << z << "\n" -: 46: << "Ct = " << ct << "\n" -: 47: << "Ref = " << ref << "\n"); -: 48: } -: 49: } <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#gcm.h.gcov -: 0:Source:build/include/botan/gcm.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/modes_aead.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/modes_aead.gcda -: 0:Runs:2960 -: 1:/* -: 2:* GCM Mode -: 3:* (C) 2013 Jack Lloyd -: 4:* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#ifndef BOTAN_AEAD_GCM_H_ -: 10:#define BOTAN_AEAD_GCM_H_ -: 11: -: 12:#include -: 13:#include -: 14: -: 15:BOTAN_FUTURE_INTERNAL_HEADER(gcm.h) -: 16: -: 17:namespace Botan { -: 18: -: 19:class BlockCipher; -: 20:class StreamCipher; -: 21:class GHASH; -: 22: -: 23:/** -: 24:* GCM Mode -: 25:*/ -: 26:class BOTAN_PUBLIC_API(2,0) GCM_Mode : public AEAD_Mode -: 27: { -: 28: public: -: 29: void set_associated_data(const uint8_t ad[], size_t ad_len) override; -: 30: -: 31: std::string name() const override; -: 32: -: 33: size_t update_granularity() const override; -: 34: -: 35: Key_Length_Specification key_spec() const override; -: 36: -: 37: bool valid_nonce_length(size_t len) const override; -: 38: -: 39: size_t tag_size() const override { return m_tag_size; } -: 40: -: 41: void clear() override; -: 42: -: 43: void reset() override; -: 44: -: 45: std::string provider() const override; -: 46: protected: -: 47: GCM_Mode(BlockCipher* cipher, size_t tag_size); -: 48: -: 49: ~GCM_Mode(); -: 50: -: 51: static const size_t GCM_BS = 16; -: 52: -: 53: const size_t m_tag_size; -: 54: const std::string m_cipher_name; -: 55: -: 56: std::unique_ptr m_ctr; -: 57: std::unique_ptr m_ghash; -: 58: private: -: 59: void start_msg(const uint8_t nonce[], size_t nonce_len) override; -: 60: -: 61: void key_schedule(const uint8_t key[], size_t length) override; -: 62: -: 63: secure_vector m_y0; -: 64: }; -: 65: -: 66:/** -: 67:* GCM Encryption -: 68:*/ -: 69:class BOTAN_PUBLIC_API(2,0) GCM_Encryption final : public GCM_Mode -: 70: { -: 71: public: -: 72: /** -: 73: * @param cipher the 128 bit block cipher to use -: 74: * @param tag_size is how big the auth tag will be -: 75: */ 2886: 76: GCM_Encryption(BlockCipher* cipher, size_t tag_size = 16) : 2886: 77: GCM_Mode(cipher, tag_size) {} call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 78: -: 79: size_t output_length(size_t input_length) const override -: 80: { return input_length + tag_size(); } -: 81: -: 82: size_t minimum_final_size() const override { return 0; } -: 83: -: 84: size_t process(uint8_t buf[], size_t size) override; -: 85: -: 86: void finish(secure_vector& final_block, size_t offset = 0) override; -: 87: }; -: 88: -: 89:/** -: 90:* GCM Decryption -: 91:*/ -: 92:class BOTAN_PUBLIC_API(2,0) GCM_Decryption final : public GCM_Mode -: 93: { -: 94: public: -: 95: /** -: 96: * @param cipher the 128 bit block cipher to use -: 97: * @param tag_size is how big the auth tag will be -: 98: */ 1798: 99: GCM_Decryption(BlockCipher* cipher, size_t tag_size = 16) : 1798: 100: GCM_Mode(cipher, tag_size) {} call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 101: -: 102: size_t output_length(size_t input_length) const override -: 103: { -: 104: BOTAN_ASSERT(input_length >= tag_size(), "Sufficient input"); -: 105: return input_length - tag_size(); -: 106: } -: 107: -: 108: size_t minimum_final_size() const override { return tag_size(); } -: 109: -: 110: size_t process(uint8_t buf[], size_t size) override; -: 111: -: 112: void finish(secure_vector& final_block, size_t offset = 0) override; -: 113: }; -: 114: -: 115:} -: 116: -: 117:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#tls_alert.h.gcov -: 0:Source:build/include/botan/tls_alert.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:/* -: 2:* Alert Message -: 3:* (C) 2004-2006,2011,2012 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#ifndef BOTAN_TLS_ALERT_H_ -: 9:#define BOTAN_TLS_ALERT_H_ -: 10: -: 11:#include -: 12:#include -: 13: -: 14:namespace Botan { -: 15: -: 16:namespace TLS { -: 17: -: 18:/** -: 19:* SSL/TLS Alert Message -: 20:*/ -: 21:class BOTAN_PUBLIC_API(2,0) Alert final -: 22: { -: 23: public: -: 24: /** -: 25: * Type codes for TLS alerts -: 26: */ -: 27: enum Type { -: 28: CLOSE_NOTIFY = 0, -: 29: UNEXPECTED_MESSAGE = 10, -: 30: BAD_RECORD_MAC = 20, -: 31: DECRYPTION_FAILED = 21, -: 32: RECORD_OVERFLOW = 22, -: 33: DECOMPRESSION_FAILURE = 30, -: 34: HANDSHAKE_FAILURE = 40, -: 35: NO_CERTIFICATE = 41, // SSLv3 only -: 36: BAD_CERTIFICATE = 42, -: 37: UNSUPPORTED_CERTIFICATE = 43, -: 38: CERTIFICATE_REVOKED = 44, -: 39: CERTIFICATE_EXPIRED = 45, -: 40: CERTIFICATE_UNKNOWN = 46, -: 41: ILLEGAL_PARAMETER = 47, -: 42: UNKNOWN_CA = 48, -: 43: ACCESS_DENIED = 49, -: 44: DECODE_ERROR = 50, -: 45: DECRYPT_ERROR = 51, -: 46: EXPORT_RESTRICTION = 60, -: 47: PROTOCOL_VERSION = 70, -: 48: INSUFFICIENT_SECURITY = 71, -: 49: INTERNAL_ERROR = 80, -: 50: INAPPROPRIATE_FALLBACK = 86, -: 51: USER_CANCELED = 90, -: 52: NO_RENEGOTIATION = 100, -: 53: UNSUPPORTED_EXTENSION = 110, -: 54: CERTIFICATE_UNOBTAINABLE = 111, -: 55: UNRECOGNIZED_NAME = 112, -: 56: BAD_CERTIFICATE_STATUS_RESPONSE = 113, -: 57: BAD_CERTIFICATE_HASH_VALUE = 114, -: 58: UNKNOWN_PSK_IDENTITY = 115, -: 59: CERTIFICATE_REQUIRED = 116, // RFC 8446 -: 60: -: 61: NO_APPLICATION_PROTOCOL = 120, // RFC 7301 -: 62: -: 63: // pseudo alert values -: 64: NULL_ALERT = 256 -: 65: }; -: 66: -: 67: /** -: 68: * @return true iff this alert is non-empty -: 69: */ -: 70: bool is_valid() const { return (m_type_code != NULL_ALERT); } -: 71: -: 72: /** -: 73: * @return if this alert is a fatal one or not -: 74: */ -: 75: bool is_fatal() const { return m_fatal; } -: 76: -: 77: /** -: 78: * @return type of alert -: 79: */ #####: 80: Type type() const { return m_type_code; } branch 0 never executed branch 1 never executed -: 81: -: 82: /** -: 83: * @return type of alert -: 84: */ -: 85: std::string type_string() const; -: 86: -: 87: /** -: 88: * Serialize an alert -: 89: */ -: 90: std::vector serialize() const; -: 91: -: 92: /** -: 93: * Deserialize an Alert message -: 94: * @param buf the serialized alert -: 95: */ -: 96: explicit Alert(const secure_vector& buf); -: 97: -: 98: /** -: 99: * Create a new Alert -: 100: * @param type_code the type of alert -: 101: * @param fatal specifies if this is a fatal alert -: 102: */ 2*: 103: Alert(Type type_code, bool fatal = false) : 2*: 104: m_fatal(fatal), m_type_code(type_code) {} call 0 never executed call 1 returned 100% -: 105: -: 106: Alert() : m_fatal(false), m_type_code(NULL_ALERT) {} -: 107: private: -: 108: bool m_fatal; -: 109: Type m_type_code; -: 110: }; -: 111: -: 112:} -: 113: -: 114:} -: 115: -: 116:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#prov#pkcs11#p11_ecdh.cpp.gcov -: 0:Source:src/lib/prov/pkcs11/p11_ecdh.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/prov_pkcs11_p11_ecdh.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/prov_pkcs11_p11_ecdh.gcda -: 0:Runs:2960 -: 1:/* -: 2:* PKCS#11 ECDH -: 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: -: 11:#if defined(BOTAN_HAS_ECDH) -: 12: -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17: -: 18:namespace Botan { -: 19: -: 20:namespace PKCS11 { -: 21: function _ZNK5Botan6PKCS1121PKCS11_ECDH_PublicKey10export_keyEv called 1 returned 100% blocks executed 100% 1: 22:ECDH_PublicKey PKCS11_ECDH_PublicKey::export_key() const -: 23: { 1: 24: return ECDH_PublicKey(domain(), public_point()); call 0 returned 100% -: 25: } -: 26: function _ZNK5Botan6PKCS1122PKCS11_ECDH_PrivateKey10export_keyEv called 1 returned 100% blocks executed 63% 1: 27:ECDH_PrivateKey PKCS11_ECDH_PrivateKey::export_key() const -: 28: { 1: 29: auto priv_key = get_attribute_value(AttributeType::Value); call 0 returned 100% -: 30: 1: 31: Null_RNG rng; branch 0 taken 100% (fallthrough) branch 1 taken 0% branch 2 never executed branch 3 never executed 4: 32: return ECDH_PrivateKey(rng, domain(), BigInt::decode(priv_key)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 33: } -: 34: function _ZNK5Botan6PKCS1122PKCS11_ECDH_PrivateKey16private_key_bitsEv called 0 returned 0% blocks executed 0% #####: 35:secure_vector PKCS11_ECDH_PrivateKey::private_key_bits() const -: 36: { #####: 37: return export_key().private_key_bits(); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed call 5 never executed -: 38: } -: 39: -: 40:namespace { -: 41:class PKCS11_ECDH_KA_Operation final : public PK_Ops::Key_Agreement -: 42: { -: 43: public: 2: 44: PKCS11_ECDH_KA_Operation(const PKCS11_EC_PrivateKey& key, const std::string& params) 2: 45: : PK_Ops::Key_Agreement(), m_key(key), m_mechanism(MechanismWrapper::create_ecdh_mechanism(params)) 2: 46: {} -: 47: function _ZNK5Botan6PKCS1112_GLOBAL__N_124PKCS11_ECDH_KA_Operation17agreed_value_sizeEv called 0 returned 0% blocks executed 0% #####: 48: size_t agreed_value_size() const override { return m_key.domain().get_p_bytes(); } call 0 never executed -: 49: -: 50: /// The encoding in V2.20 was not specified and resulted in different implementations choosing different encodings. -: 51: /// Applications relying only on a V2.20 encoding (e.g. the DER variant) other than the one specified now (raw) may not work with all V2.30 compliant tokens. function _ZN5Botan6PKCS1112_GLOBAL__N_124PKCS11_ECDH_KA_Operation5agreeEmPKhmS4_m called 2 returned 100% blocks executed 45% 2: 52: secure_vector agree(size_t key_len, const uint8_t other_key[], size_t other_key_len, const uint8_t salt[], -: 53: size_t salt_len) override -: 54: { 2: 55: std::vector der_encoded_other_key; branch 0 taken 100% (fallthrough) branch 1 taken 0% 2: 56: if(m_key.point_encoding() == PublicPointEncoding::Der) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 57: { 2: 58: DER_Encoder(der_encoded_other_key).encode(other_key, other_key_len, 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) call 6 returned 100% call 7 never executed branch 8 never executed branch 9 never executed 2: 59: m_mechanism.set_ecdh_other_key(der_encoded_other_key.data(), der_encoded_other_key.size()); -: 60: } -: 61: else -: 62: { #####: 63: m_mechanism.set_ecdh_other_key(other_key, other_key_len); -: 64: } -: 65: 2: 66: if(salt != nullptr && salt_len > 0) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 67: { #####: 68: m_mechanism.set_ecdh_salt(salt, salt_len); -: 69: } -: 70: 2: 71: ObjectHandle secret_handle = 0; 4: 72: AttributeContainer attributes; 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 2: 73: attributes.add_bool(AttributeType::Sensitive, false); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 74: attributes.add_bool(AttributeType::Extractable, true); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 75: attributes.add_numeric(AttributeType::Class, static_cast< CK_OBJECT_CLASS >(ObjectClass::SecretKey)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 76: attributes.add_numeric(AttributeType::KeyType, static_cast< CK_KEY_TYPE >(KeyType::GenericSecret)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 77: attributes.add_numeric(AttributeType::ValueLen, static_cast< CK_ULONG >(key_len)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 78: m_key.module()->C_DeriveKey(m_key.session().handle(), m_mechanism.data(), m_key.handle(), attributes.data(), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 79: static_cast(attributes.count()), &secret_handle); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 80: 4: 81: Object secret_object(m_key.session(), secret_handle); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 2: 82: secure_vector secret = secret_object.get_attribute_value(AttributeType::Value); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 83: if(secret.size() < key_len) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 84: { #####: 85: throw PKCS11_Error("ECDH key derivation secret length is too short"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed -: 86: } 2: 87: secret.resize(key_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4: 88: return secret; call 0 returned 100% -: 89: } -: 90: -: 91: private: -: 92: const PKCS11_EC_PrivateKey& m_key; -: 93: MechanismWrapper m_mechanism; -: 94: }; -: 95: -: 96:} -: 97: -: 98:std::unique_ptr function _ZNK5Botan6PKCS1122PKCS11_ECDH_PrivateKey23create_key_agreement_opERNS_21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_ called 2 returned 100% blocks executed 83% 2: 99:PKCS11_ECDH_PrivateKey::create_key_agreement_op(RandomNumberGenerator&, -: 100: const std::string& params, -: 101: const std::string& /*provider*/) const -: 102: { 4: 103: return std::unique_ptr(new PKCS11_ECDH_KA_Operation(*this, params)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 104: } -: 105: function _ZN5Botan6PKCS1121generate_ecdh_keypairERNS0_7SessionERKNS0_32EC_PublicKeyGenerationPropertiesERKNS0_33EC_PrivateKeyGenerationPropertiesE called 3 returned 100% blocks executed 73% 3: 106:PKCS11_ECDH_KeyPair generate_ecdh_keypair(Session& session, const EC_PublicKeyGenerationProperties& pub_props, -: 107: const EC_PrivateKeyGenerationProperties& priv_props) -: 108: { 3: 109: ObjectHandle pub_key_handle = 0; 3: 110: ObjectHandle priv_key_handle = 0; -: 111: 3: 112: Mechanism mechanism = { static_cast< CK_MECHANISM_TYPE >(MechanismType::EcKeyPairGen), nullptr, 0 }; -: 113: 3: 114: session.module()->C_GenerateKeyPair(session.handle(), &mechanism, call 0 returned 100% 3: 115: pub_props.data(), static_cast(pub_props.count()), call 0 returned 100% 3: 116: priv_props.data(), static_cast(priv_props.count()), call 0 returned 100% -: 117: &pub_key_handle, &priv_key_handle); -: 118: 6: 119: return std::make_pair(PKCS11_ECDH_PublicKey(session, pub_key_handle), PKCS11_ECDH_PrivateKey(session, priv_key_handle)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 returned 100% call 6 never executed -: 120: } -: 121: -: 122:} -: 123:} -: 124: -: 125:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#deadline_timer_service.hpp.gcov -: 0:Source:/usr/include/boost/asio/detail/deadline_timer_service.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_tls_stream_integration.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_tls_stream_integration.gcda -: 0:Runs:1 -: 1:// -: 2:// detail/deadline_timer_service.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_DEADLINE_TIMER_SERVICE_HPP -: 12:#define BOOST_ASIO_DETAIL_DEADLINE_TIMER_SERVICE_HPP -: 13: -: 14:#if defined(_MSC_VER) && (_MSC_VER >= 1200) -: 15:# pragma once -: 16:#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -: 17: -: 18:#include -: 19:#include -: 20:#include -: 21:#include -: 22:#include -: 23:#include -: 24:#include -: 25:#include -: 26:#include -: 27:#include -: 28:#include -: 29:#include -: 30:#include -: 31:#include -: 32:#include -: 33: -: 34:#if defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 35:# include -: 36:# include -: 37:#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 38: -: 39:#include -: 40: -: 41:namespace boost { -: 42:namespace asio { -: 43:namespace detail { -: 44: -: 45:template -: 46:class deadline_timer_service -: 47: : public execution_context_service_base > -: 48:{ -: 49:public: -: 50: // The time type. -: 51: typedef typename Time_Traits::time_type time_type; -: 52: -: 53: // The duration type. -: 54: typedef typename Time_Traits::duration_type duration_type; -: 55: -: 56: // The implementation type of the timer. This type is dependent on the -: 57: // underlying implementation of the timer service. 32: 58: struct implementation_type call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 59: : private boost::asio::detail::noncopyable -: 60: { -: 61: time_type expiry; -: 62: bool might_have_pending_waits; -: 63: typename timer_queue::per_timer_data timer_data; -: 64: }; -: 65: -: 66: // Constructor. function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEEC2ERNS0_17execution_contextE called 10 returned 100% blocks executed 67% 10: 67: deadline_timer_service(execution_context& context) -: 68: : execution_context_service_base< -: 69: deadline_timer_service >(context), 10: 70: scheduler_(boost::asio::use_service(context)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 71: { 10: 72: scheduler_.init_task(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 10: 73: scheduler_.add_timer_queue(timer_queue_); call 0 returned 100% 10: 74: } -: 75: -: 76: // Destructor. 20: 77: ~deadline_timer_service() -: 78: { 20: 79: scheduler_.remove_timer_queue(timer_queue_); 20: 80: } ------------------ _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEED0Ev: function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEED0Ev called 10 returned 100% blocks executed 100% 10: 77: ~deadline_timer_service() -: 78: { -: 79: scheduler_.remove_timer_queue(timer_queue_); 10: 80: } call 0 returned 100% call 1 returned 100% ------------------ _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEED2Ev: function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEED2Ev called 10 returned 100% blocks executed 100% 10: 77: ~deadline_timer_service() -: 78: { 20: 79: scheduler_.remove_timer_queue(timer_queue_); 10: 80: } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% ------------------ -: 81: -: 82: // Destroy all user-defined handler objects owned by the service. function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEE8shutdownEv called 10 returned 100% blocks executed 100% 10: 83: void shutdown() -: 84: { 10: 85: } -: 86: -: 87: // Construct a new timer implementation. 16: 88: void construct(implementation_type& impl) -: 89: { 16: 90: impl.expiry = time_type(); 32: 91: impl.might_have_pending_waits = false; -: 92: } -: 93: -: 94: // Destroy a timer implementation. function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEE7destroyERNSA_19implementation_typeE called 16 returned 100% blocks executed 100% 16: 95: void destroy(implementation_type& impl) call 0 returned 100% -: 96: { 16: 97: boost::system::error_code ec; 16: 98: cancel(impl, ec); call 0 returned 100% 16: 99: } -: 100: -: 101: // Move-construct a new serial port implementation. -: 102: void move_construct(implementation_type& impl, -: 103: implementation_type& other_impl) -: 104: { -: 105: scheduler_.move_timer(timer_queue_, impl.timer_data, other_impl.timer_data); -: 106: -: 107: impl.expiry = other_impl.expiry; -: 108: other_impl.expiry = time_type(); -: 109: -: 110: impl.might_have_pending_waits = other_impl.might_have_pending_waits; -: 111: other_impl.might_have_pending_waits = false; -: 112: } -: 113: -: 114: // Move-assign from another serial port implementation. -: 115: void move_assign(implementation_type& impl, -: 116: deadline_timer_service& other_service, -: 117: implementation_type& other_impl) -: 118: { -: 119: if (this != &other_service) -: 120: if (impl.might_have_pending_waits) -: 121: scheduler_.cancel_timer(timer_queue_, impl.timer_data); -: 122: -: 123: other_service.scheduler_.move_timer(other_service.timer_queue_, -: 124: impl.timer_data, other_impl.timer_data); -: 125: -: 126: impl.expiry = other_impl.expiry; -: 127: other_impl.expiry = time_type(); -: 128: -: 129: impl.might_have_pending_waits = other_impl.might_have_pending_waits; -: 130: other_impl.might_have_pending_waits = false; -: 131: } -: 132: -: 133: // Cancel any asynchronous wait operations associated with the timer. function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEE6cancelERNSA_19implementation_typeERNS_6system10error_codeE called 81 returned 100% blocks executed 100% 81: 134: std::size_t cancel(implementation_type& impl, boost::system::error_code& ec) -: 135: { 81: 136: if (!impl.might_have_pending_waits) branch 0 taken 35% (fallthrough) branch 1 taken 65% -: 137: { 28: 138: ec = boost::system::error_code(); 28: 139: return 0; -: 140: } -: 141: -: 142: BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), -: 143: "deadline_timer", &impl, 0, "cancel")); -: 144: 53: 145: std::size_t count = scheduler_.cancel_timer(timer_queue_, impl.timer_data); call 0 returned 100% 53: 146: impl.might_have_pending_waits = false; call 0 returned 100% 53: 147: ec = boost::system::error_code(); 53: 148: return count; -: 149: } -: 150: -: 151: // Cancels one asynchronous wait operation associated with the timer. -: 152: std::size_t cancel_one(implementation_type& impl, -: 153: boost::system::error_code& ec) -: 154: { -: 155: if (!impl.might_have_pending_waits) -: 156: { -: 157: ec = boost::system::error_code(); -: 158: return 0; -: 159: } -: 160: -: 161: BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), -: 162: "deadline_timer", &impl, 0, "cancel_one")); -: 163: -: 164: std::size_t count = scheduler_.cancel_timer( -: 165: timer_queue_, impl.timer_data, 1); -: 166: if (count == 0) -: 167: impl.might_have_pending_waits = false; -: 168: ec = boost::system::error_code(); -: 169: return count; -: 170: } -: 171: -: 172: // Get the expiry time for the timer as an absolute time. -: 173: time_type expiry(const implementation_type& impl) const -: 174: { -: 175: return impl.expiry; -: 176: } -: 177: -: 178: // Get the expiry time for the timer as an absolute time. -: 179: time_type expires_at(const implementation_type& impl) const -: 180: { -: 181: return impl.expiry; -: 182: } -: 183: -: 184: // Get the expiry time for the timer relative to now. -: 185: duration_type expires_from_now(const implementation_type& impl) const -: 186: { -: 187: return Time_Traits::subtract(this->expiry(impl), Time_Traits::now()); -: 188: } -: 189: -: 190: // Set the expiry time for the timer as an absolute time. 53: 191: std::size_t expires_at(implementation_type& impl, -: 192: const time_type& expiry_time, boost::system::error_code& ec) -: 193: { 106: 194: std::size_t count = cancel(impl, ec); 53: 195: impl.expiry = expiry_time; call 0 returned 100% 53: 196: ec = boost::system::error_code(); -: 197: return count; -: 198: } -: 199: -: 200: // Set the expiry time for the timer relative to now. function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEE13expires_afterERNSA_19implementation_typeERKNS4_8durationIlSt5ratioILl1ELl1000000000EEEERNS_6system10error_codeE called 53 returned 100% blocks executed 88% 53: 201: std::size_t expires_after(implementation_type& impl, call 0 returned 100% -: 202: const duration_type& expiry_time, boost::system::error_code& ec) -: 203: { -: 204: return expires_at(impl, 106: 205: Time_Traits::add(Time_Traits::now(), expiry_time), ec); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% -: 206: } -: 207: -: 208: // Set the expiry time for the timer relative to now. -: 209: std::size_t expires_from_now(implementation_type& impl, -: 210: const duration_type& expiry_time, boost::system::error_code& ec) -: 211: { -: 212: return expires_at(impl, -: 213: Time_Traits::add(Time_Traits::now(), expiry_time), ec); -: 214: } -: 215: -: 216: // Perform a blocking wait on the timer. -: 217: void wait(implementation_type& impl, boost::system::error_code& ec) -: 218: { -: 219: time_type now = Time_Traits::now(); -: 220: ec = boost::system::error_code(); -: 221: while (Time_Traits::less_than(now, impl.expiry) && !ec) -: 222: { -: 223: this->do_wait(Time_Traits::to_posix_duration( -: 224: Time_Traits::subtract(impl.expiry, now)), ec); -: 225: now = Time_Traits::now(); -: 226: } -: 227: } -: 228: -: 229: // Start an asynchronous wait on the timer. -: 230: template function _ZN5boost4asio6detail22deadline_timer_serviceINS1_18chrono_time_traitsINSt6chrono3_V212system_clockENS0_11wait_traitsIS6_EEEEE10async_waitIZN12_GLOBAL__N_114Result_Wrapper9set_timerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlRKNS_6system10error_codeEE_NS1_18io_object_executorINS0_8executorEEEEEvRNSA_19implementation_typeERT_RKT0_ called 53 returned 100% blocks executed 89% 53: 231: void async_wait(implementation_type& impl, -: 232: Handler& handler, const IoExecutor& io_ex) -: 233: { -: 234: // Allocate and construct an operation to wrap the handler. -: 235: typedef wait_handler op; 53: 236: typename op::ptr p = { boost::asio::detail::addressof(handler), branch 0 taken 77% (fallthrough) branch 1 taken 23% 53: 237: op::ptr::allocate(handler), 0 }; branch 0 taken 77% (fallthrough) branch 1 taken 23% 53: 238: p.p = new (p.v) op(handler, io_ex); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 239: 53: 240: impl.might_have_pending_waits = true; -: 241: -: 242: BOOST_ASIO_HANDLER_CREATION((scheduler_.context(), -: 243: *p.p, "deadline_timer", &impl, 0, "async_wait")); -: 244: 53: 245: scheduler_.schedule_timer(timer_queue_, impl.expiry, impl.timer_data, p.p); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 53: 246: p.v = p.p = 0; call 0 returned 100% 53: 247: } -: 248: -: 249:private: -: 250: // Helper function to wait given a duration type. The duration type should -: 251: // either be of type boost::posix_time::time_duration, or implement the -: 252: // required subset of its interface. -: 253: template -: 254: void do_wait(const Duration& timeout, boost::system::error_code& ec) -: 255: { -: 256:#if defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 257: std::this_thread::sleep_for( -: 258: std::chrono::seconds(timeout.total_seconds()) -: 259: + std::chrono::microseconds(timeout.total_microseconds())); -: 260: ec = boost::system::error_code(); -: 261:#else // defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 262: ::timeval tv; -: 263: tv.tv_sec = timeout.total_seconds(); -: 264: tv.tv_usec = timeout.total_microseconds() % 1000000; -: 265: socket_ops::select(0, 0, 0, 0, &tv, ec); -: 266:#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME) -: 267: } -: 268: -: 269: // The queue of timers. -: 270: timer_queue timer_queue_; -: 271: -: 272: // The object that schedules and executes timers. Usually a reactor. -: 273: timer_scheduler& scheduler_; -: 274:}; -: 275: -: 276:} // namespace detail -: 277:} // namespace asio -: 278:} // namespace boost -: 279: -: 280:#include -: 281: -: 282:#endif // BOOST_ASIO_DETAIL_DEADLINE_TIMER_SERVICE_HPP <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#kdf#prf_tls#prf_tls.cpp.gcov -: 0:Source:src/lib/kdf/prf_tls/prf_tls.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/kdf_prf_tls.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/kdf_prf_tls.gcda -: 0:Runs:2960 -: 1:/* -: 2:* TLS v1.0 and v1.2 PRFs -: 3:* (C) 2004-2010 Jack Lloyd -: 4:* -: 5:* Botan is released under the Simplified BSD License (see license.txt) -: 6:*/ -: 7: -: 8:#include -: 9:#include -: 10: -: 11:namespace Botan { -: 12: function _ZN5Botan7TLS_PRFC2Ev called 32 returned 100% blocks executed 28% 32: 13:TLS_PRF::TLS_PRF() : 32: 14: TLS_PRF(MessageAuthenticationCode::create_or_throw("HMAC(MD5)"), call 0 returned 100% branch 1 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% 96: 15: MessageAuthenticationCode::create_or_throw("HMAC(SHA-1)")) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 0% (fallthrough) branch 10 taken 100% 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 -: 16: { 32: 17: } -: 18: -: 19:namespace { -: 20: -: 21:/* -: 22:* TLS PRF P_hash function -: 23:*/ function _ZN5Botan12_GLOBAL__N_16P_hashEPhmRNS_25MessageAuthenticationCodeEPKhmS5_m called 16763 returned 100% blocks executed 35% 16763: 24:void P_hash(uint8_t out[], size_t out_len, -: 25: MessageAuthenticationCode& mac, -: 26: const uint8_t secret[], size_t secret_len, -: 27: const uint8_t salt[], size_t salt_len) -: 28: { 16763: 29: try -: 30: { 16763: 31: mac.set_key(secret, secret_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 32: } =====: 33: catch(Invalid_Key_Length&) call 0 never executed call 1 never executed -: 34: { =====: 35: throw Internal_Error("The premaster secret of " + branch 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed =====: 36: std::to_string(secret_len) + call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed branch 6 never executed branch 7 never executed branch 8 never executed branch 9 never executed =====: 37: " bytes is too long for the PRF"); 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 -: 38: } -: 39: 16763: 40: secure_vector A(salt, salt + salt_len); call 0 returned 100% 33526: 41: secure_vector h; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 42: 16763: 43: size_t offset = 0; -: 44: 78611: 45: while(offset != out_len) branch 0 taken 79% (fallthrough) branch 1 taken 21% -: 46: { 123696: 47: A = mac.process(A); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 48: 61848: 49: mac.update(A); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 61848: 50: mac.update(salt, salt_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 61848: 51: mac.final(h); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 52: 61848: 53: const size_t writing = std::min(h.size(), out_len - offset); branch 0 taken 24% (fallthrough) branch 1 taken 76% 61848: 54: xor_buf(&out[offset], h.data(), writing); call 0 returned 100% 61848: 55: offset += writing; -: 56: } 16763: 57: } -: 58: -: 59:} -: 60: function _ZNK5Botan7TLS_PRF3kdfEPhmPKhmS3_mS3_m called 4562 returned 100% blocks executed 77% 4562: 61:size_t TLS_PRF::kdf(uint8_t key[], size_t key_len, -: 62: const uint8_t secret[], size_t secret_len, -: 63: const uint8_t salt[], size_t salt_len, -: 64: const uint8_t label[], size_t label_len) const -: 65: { 4562: 66: const size_t S1_len = (secret_len + 1) / 2, 4562: 67: S2_len = (secret_len + 1) / 2; 4562: 68: const uint8_t* S1 = secret; 4562: 69: const uint8_t* S2 = secret + (secret_len - S2_len); 4562: 70: secure_vector msg; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 71: 4562: 72: msg.reserve(label_len + salt_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4562: 73: msg += std::make_pair(label, label_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4562: 74: msg += std::make_pair(salt, salt_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 75: 4562: 76: P_hash(key, key_len, *m_hmac_md5, S1, S1_len, msg.data(), msg.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 4562: 77: P_hash(key, key_len, *m_hmac_sha1, S2, S2_len, msg.data(), msg.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 9123: 78: return key_len; branch 0 taken 100% (fallthrough) branch 1 taken 1% -: 79: } -: 80: function _ZNK5Botan10TLS_12_PRF3kdfEPhmPKhmS3_mS3_m called 7639 returned 100% blocks executed 75% 7639: 81:size_t TLS_12_PRF::kdf(uint8_t key[], size_t key_len, -: 82: const uint8_t secret[], size_t secret_len, -: 83: const uint8_t salt[], size_t salt_len, -: 84: const uint8_t label[], size_t label_len) const -: 85: { 7639: 86: secure_vector msg; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 87: 7639: 88: msg.reserve(label_len + salt_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 7639: 89: msg += std::make_pair(label, label_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 7639: 90: msg += std::make_pair(salt, salt_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 91: 7639: 92: P_hash(key, key_len, *m_mac, secret, secret_len, msg.data(), msg.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 15278: 93: return key_len; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 94: } -: 95: -: 96:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#p11_ecdh.h.gcov -: 0:Source:build/include/botan/p11_ecdh.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_pkcs11_high_level.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_pkcs11_high_level.gcda -: 0:Runs:1 -: 1:/* -: 2:* PKCS#11 ECDH -: 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:#ifndef BOTAN_P11_ECDH_H_ -: 10:#define BOTAN_P11_ECDH_H_ -: 11: -: 12:#include -: 13: -: 14:#if defined(BOTAN_HAS_ECDH) -: 15: -: 16:#include -: 17:#include -: 18: -: 19:#include -: 20:#include -: 21: -: 22:namespace Botan { -: 23:namespace PKCS11 { -: 24:class Session; -: 25: -: 26:/// Represents a PKCS#11 ECDH public key 4: 27:class BOTAN_PUBLIC_API(2,0) PKCS11_ECDH_PublicKey : public PKCS11_EC_PublicKey call 0 returned 100% call 1 returned 100% call 2 returned 100% call 3 returned 100% call 4 never executed call 5 never executed call 6 returned 100% call 7 returned 100% call 8 never executed call 9 returned 100% branch 10 taken 100% (fallthrough) branch 11 taken 0% call 12 never executed call 13 returned 100% branch 14 taken 100% (fallthrough) branch 15 taken 0% call 16 never executed -: 28: { -: 29: public: -: 30: /** -: 31: * Create a PKCS11_ECDH_PublicKey object from an existing PKCS#11 ECDH public key -: 32: * @param session the session to use -: 33: * @param handle the handle of the ECDH public key -: 34: */ -: 35: PKCS11_ECDH_PublicKey(Session& session, ObjectHandle handle) -: 36: : EC_PublicKey(), PKCS11_EC_PublicKey(session, handle) -: 37: {} -: 38: -: 39: /** -: 40: * Imports a ECDH public key -: 41: * @param session the session to use -: 42: * @param props the attributes of the public key -: 43: */ function _ZN5Botan6PKCS1121PKCS11_ECDH_PublicKeyC1ERNS0_7SessionERKNS0_28EC_PublicKeyImportPropertiesE called 2 returned 100% blocks executed 80% 2: 44: PKCS11_ECDH_PublicKey(Session& session, const EC_PublicKeyImportProperties& props) 2: 45: : EC_PublicKey(), PKCS11_EC_PublicKey(session, props) call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed 2: 46: {} -: 47: function _ZNK5Botan6PKCS1121PKCS11_ECDH_PublicKey9algo_nameB5cxx11Ev called 0 returned 0% blocks executed 0% #####: 48: inline std::string algo_name() const override -: 49: { #####: 50: return "ECDH"; call 0 never executed -: 51: } -: 52: -: 53: /// @return the exported ECDH public key -: 54: ECDH_PublicKey export_key() const; -: 55: }; -: 56: -: 57:/// Represents a PKCS#11 ECDH private key -: 58:class BOTAN_PUBLIC_API(2,0) PKCS11_ECDH_PrivateKey final : public virtual PKCS11_EC_PrivateKey, public virtual PK_Key_Agreement_Key -: 59: { -: 60: public: -: 61: /** -: 62: * Creates a PKCS11_ECDH_PrivateKey object from an existing PKCS#11 ECDH private key -: 63: * @param session the session to use -: 64: * @param handle the handle of the ECDH private key -: 65: */ -: 66: PKCS11_ECDH_PrivateKey(Session& session, ObjectHandle handle) -: 67: : PKCS11_EC_PrivateKey(session, handle) -: 68: {} -: 69: -: 70: /** -: 71: * Imports an ECDH private key -: 72: * @param session the session to use -: 73: * @param props the attributes of the private key -: 74: */ function _ZN5Botan6PKCS1122PKCS11_ECDH_PrivateKeyC1ERNS0_7SessionERKNS0_29EC_PrivateKeyImportPropertiesE called 2 returned 100% blocks executed 100% 2: 75: PKCS11_ECDH_PrivateKey(Session& session, const EC_PrivateKeyImportProperties& props) 2: 76: : PKCS11_EC_PrivateKey(session, props) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2: 77: {} -: 78: -: 79: /** -: 80: * Generates a PKCS#11 ECDH private key -: 81: * @param session the session to use -: 82: * @param ec_params DER-encoding of an ANSI X9.62 Parameters value -: 83: * @param props the attributes of the private key -: 84: * @note no persistent public key object will be created -: 85: */ function _ZN5Botan6PKCS1122PKCS11_ECDH_PrivateKeyC1ERNS0_7SessionERKSt6vectorIhSaIhEERKNS0_33EC_PrivateKeyGenerationPropertiesE called 1 returned 100% blocks executed 100% 1: 86: PKCS11_ECDH_PrivateKey(Session& session, const std::vector& ec_params, -: 87: const EC_PrivateKeyGenerationProperties& props) 1: 88: : PKCS11_EC_PrivateKey(session, ec_params, props) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1: 89: {} -: 90: -: 91: inline std::string algo_name() const override -: 92: { -: 93: return "ECDH"; -: 94: } -: 95: -: 96: inline std::vector public_value() const override -: 97: { -: 98: return public_point().encode(PointGFp::UNCOMPRESSED); -: 99: } -: 100: -: 101: /// @return the exported ECDH private key -: 102: ECDH_PrivateKey export_key() const; -: 103: -: 104: secure_vector private_key_bits() const override; -: 105: -: 106: std::unique_ptr -: 107: create_key_agreement_op(RandomNumberGenerator& rng, -: 108: const std::string& params, -: 109: const std::string& provider) const override; -: 110: }; -: 111: -: 112:using PKCS11_ECDH_KeyPair = std::pair; -: 113: -: 114:/** -: 115:* PKCS#11 ECDH key pair generation -: 116:* @param session the session that should be used for the key generation -: 117:* @param pub_props the properties of the public key -: 118:* @param priv_props the properties of the private key -: 119:*/ -: 120:BOTAN_PUBLIC_API(2,0) PKCS11_ECDH_KeyPair generate_ecdh_keypair(Session& session, const EC_PublicKeyGenerationProperties& pub_props, -: 121: const EC_PrivateKeyGenerationProperties& priv_props); -: 122:} -: 123: -: 124:} -: 125: -: 126:#endif -: 127:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#ecdsa#ecdsa.cpp.gcov -: 0:Source:src/lib/pubkey/ecdsa/ecdsa.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_ecdsa.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_ecdsa.gcda -: 0:Runs:2960 -: 1:/* -: 2:* ECDSA implemenation -: 3:* (C) 2007 Manuel Hartl, FlexSecure GmbH -: 4:* 2007 Falko Strenzke, FlexSecure GmbH -: 5:* 2008-2010,2015,2016,2018 Jack Lloyd -: 6:* 2016 René Korthaus -: 7:* -: 8:* Botan is released under the Simplified BSD License (see license.txt) -: 9:*/ -: 10: -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17: -: 18:#if defined(BOTAN_HAS_RFC6979_GENERATOR) -: 19: #include -: 20:#endif -: 21: -: 22:namespace Botan { -: 23: -: 24:namespace { -: 25: function _ZN5Botan12_GLOBAL__N_124recover_ecdsa_public_keyERKNS_8EC_GroupERKSt6vectorIhSaIhEERKNS_6BigIntESB_h called 20 returned 100% blocks executed 34% 20: 26:PointGFp recover_ecdsa_public_key(const EC_Group& group, -: 27: const std::vector& msg, -: 28: const BigInt& r, -: 29: const BigInt& s, -: 30: uint8_t v) -: 31: { 20: 32: if(group.get_cofactor() != 1) call 0 returned 100% call 1 returned 100% branch 2 taken 0% (fallthrough) branch 3 taken 100% #####: 33: throw Invalid_Argument("ECDSA public key recovery only supported for prime order groups"); 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 -: 34: 20: 35: if(v > 4) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 36: throw Invalid_Argument("Unexpected v param for ECDSA public key recovery"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 37: 20: 38: const uint8_t y_odd = v % 2; 20: 39: const uint8_t add_order = v >> 1; -: 40: 20: 41: const BigInt& group_order = group.get_order(); call 0 returned 100% 20: 42: const size_t p_bytes = group.get_p_bytes(); call 0 returned 100% -: 43: 20: 44: try -: 45: { 20: 46: const BigInt e(msg.data(), msg.size(), group.get_order_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) 40: 47: const BigInt r_inv = group.inverse_mod_order(r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 48: 40: 49: BigInt x = r + add_order*group_order; call 0 returned 100% 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 -: 50: 40: 51: std::vector X(p_bytes + 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 never executed branch 6 never executed -: 52: 20: 53: X[0] = 0x02 | y_odd; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 20: 54: BigInt::encode_1363(&X[1], p_bytes, x); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 55: 40: 56: const PointGFp R = group.OS2ECP(X); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 57: 20: 58: if((R*group_order).is_zero() == false) 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 call 9 never executed #####: 59: throw Decoding_Error("Unable to recover ECDSA public key"); 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 -: 60: -: 61: // Compute r_inv * (s*R - eG) 40: 62: PointGFp_Multi_Point_Precompute RG_mul(R, 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% 40: 63: const BigInt ne = group.mod_order(group_order - e); call 0 returned 100% branch 1 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 40: 64: return r_inv * RG_mul.multi_exp(s, ne); call 0 returned 100% branch 1 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 branch 10 never executed branch 11 never executed -: 65: } =====: 66: catch(...) call 0 never executed call 1 never executed -: 67: { -: 68: // continue on and throw -: 69: } -: 70: =====: 71: throw Decoding_Error("Failed to recover ECDSA public key from signature/msg pair"); call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed call 4 never executed call 5 never executed branch 6 never executed branch 7 never executed call 8 never executed -: 72: } -: 73: -: 74:} -: 75: 8*: 76:ECDSA_PublicKey::ECDSA_PublicKey(const EC_Group& group, -: 77: const std::vector& msg, -: 78: const BigInt& r, -: 79: const BigInt& s, 8: 80: uint8_t v) : 8*: 81: EC_PublicKey(group, recover_ecdsa_public_key(group, msg, r, s, v)) {} ------------------ _ZN5Botan15ECDSA_PublicKeyC1ERKNS_8EC_GroupERKSt6vectorIhSaIhEERKNS_6BigIntESB_h: function _ZN5Botan15ECDSA_PublicKeyC1ERKNS_8EC_GroupERKSt6vectorIhSaIhEERKNS_6BigIntESB_h called 8 returned 100% blocks executed 83% 8: 76:ECDSA_PublicKey::ECDSA_PublicKey(const EC_Group& group, -: 77: const std::vector& msg, -: 78: const BigInt& r, -: 79: const BigInt& s, 8: 80: uint8_t v) : 8: 81: EC_PublicKey(group, recover_ecdsa_public_key(group, msg, r, s, v)) {} call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% call 5 never executed ------------------ _ZN5Botan15ECDSA_PublicKeyC2ERKNS_8EC_GroupERKSt6vectorIhSaIhEERKNS_6BigIntESB_h: function _ZN5Botan15ECDSA_PublicKeyC2ERKNS_8EC_GroupERKSt6vectorIhSaIhEERKNS_6BigIntESB_h called 0 returned 0% blocks executed 0% #####: 76:ECDSA_PublicKey::ECDSA_PublicKey(const EC_Group& group, -: 77: const std::vector& msg, -: 78: const BigInt& r, -: 79: const BigInt& s, -: 80: uint8_t v) : #####: 81: EC_PublicKey(group, recover_ecdsa_public_key(group, msg, r, s, v)) {} ------------------ -: 82: -: 83: function _ZNK5Botan15ECDSA_PublicKey14recovery_paramERKSt6vectorIhSaIhEERKNS_6BigIntES8_ called 8 returned 100% blocks executed 37% 8: 84:uint8_t ECDSA_PublicKey::recovery_param(const std::vector& msg, -: 85: const BigInt& r, -: 86: const BigInt& s) const -: 87: { 12: 88: for(uint8_t v = 0; v != 4; ++v) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 89: { 12: 90: try -: 91: { 16: 92: PointGFp R = recover_ecdsa_public_key(this->domain(), msg, r, s, v); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed -: 93: 12: 94: if(R == this->public_point()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 67% (fallthrough) branch 4 taken 33% -: 95: { 8: 96: return v; call 0 returned 100% -: 97: } -: 98: } =====: 99: catch(Decoding_Error&) call 0 never executed call 1 never executed -: 100: { -: 101: // try the next v -: 102: } -: 103: } -: 104: #####: 105: throw Internal_Error("Could not determine ECDSA recovery parameter"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed call 8 never executed -: 106: } -: 107: function _ZNK5Botan16ECDSA_PrivateKey9check_keyERNS_21RandomNumberGeneratorEb called 8 returned 100% blocks executed 60% 8: 108:bool ECDSA_PrivateKey::check_key(RandomNumberGenerator& rng, -: 109: bool strong) const -: 110: { 8: 111: if(!public_point().on_the_curve()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 112: return false; -: 113: 8: 114: if(!strong) branch 0 taken 88% (fallthrough) branch 1 taken 12% -: 115: return true; -: 116: 7: 117: return KeyPair::signature_consistency_check(rng, *this, "EMSA1(SHA-256)"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% -: 118: } -: 119: -: 120:namespace { -: 121: -: 122:/** -: 123:* ECDSA signature operation -: 124:*/ -: 125:class ECDSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA -: 126: { -: 127: public: -: 128: function _ZN5Botan12_GLOBAL__N_125ECDSA_Signature_OperationC2ERKNS_16ECDSA_PrivateKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_21RandomNumberGeneratorE called 389 returned 100% blocks executed 39% 389: 129: ECDSA_Signature_Operation(const ECDSA_PrivateKey& ecdsa, -: 130: const std::string& emsa, 389: 131: RandomNumberGenerator& rng) : -: 132: PK_Ops::Signature_with_EMSA(emsa), -: 133: m_group(ecdsa.domain()), 389: 134: m_x(ecdsa.private_value()) 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 never executed branch 9 never executed call 10 never executed call 11 never executed call 12 never executed call 13 never executed -: 135: { -: 136:#if defined(BOTAN_HAS_RFC6979_GENERATOR) 778: 137: m_rfc6979.reset(new RFC6979_Nonce_Generator(hash_for_emsa(emsa), m_group.get_order(), m_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) 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 branch 15 never executed branch 16 never executed -: 138:#endif -: 139: 778: 140: m_b = m_group.random_scalar(rng); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 0% (fallthrough) branch 6 taken 100% 778: 141: m_b_inv = m_group.inverse_mod_order(m_b); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 0% (fallthrough) branch 6 taken 100% 389: 142: } -: 143: function _ZNK5Botan12_GLOBAL__N_125ECDSA_Signature_Operation16signature_lengthEv called 110 returned 100% blocks executed 100% 110: 144: size_t signature_length() const override { return 2*m_group.get_order_bytes(); } call 0 returned 100% -: 145: function _ZNK5Botan12_GLOBAL__N_125ECDSA_Signature_Operation14max_input_bitsEv called 399 returned 100% blocks executed 100% 399: 146: size_t max_input_bits() const override { return m_group.get_order_bits(); } call 0 returned 100% -: 147: -: 148: secure_vector raw_sign(const uint8_t msg[], size_t msg_len, -: 149: RandomNumberGenerator& rng) override; -: 150: -: 151: private: -: 152: const EC_Group m_group; -: 153: const BigInt& m_x; -: 154: -: 155:#if defined(BOTAN_HAS_RFC6979_GENERATOR) -: 156: std::unique_ptr m_rfc6979; -: 157:#endif -: 158: -: 159: std::vector m_ws; -: 160: -: 161: BigInt m_b, m_b_inv; -: 162: }; -: 163: -: 164:secure_vector function _ZN5Botan12_GLOBAL__N_125ECDSA_Signature_Operation8raw_signEPKhmRNS_21RandomNumberGeneratorE called 399 returned 100% blocks executed 54% 399: 165:ECDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, -: 166: RandomNumberGenerator& rng) -: 167: { 399: 168: BigInt m(msg, msg_len, m_group.get_order_bits()); call 0 returned 100% call 1 returned 100% -: 169: -: 170:#if defined(BOTAN_HAS_RFC6979_GENERATOR) 798: 171: const BigInt k = m_rfc6979->nonce_for(m); call 0 returned 100% 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% -: 172:#else -: 173: const BigInt k = m_group.random_scalar(rng); -: 174:#endif -: 175: 399: 176: const BigInt r = m_group.mod_order( 798: 177: m_group.blinded_base_point_multiply_x(k, rng, m_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) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 never executed branch 9 never executed -: 178: 798: 179: const BigInt k_inv = m_group.inverse_mod_order(k); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 180: -: 181: /* -: 182: * Blind the input message and compute x*r+m as (x*r*b + m*b)/b -: 183: */ 399: 184: m_b = m_group.square_mod_order(m_b); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 399: 185: m_b_inv = m_group.square_mod_order(m_b_inv); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 186: 798: 187: m = m_group.multiply_mod_order(m_b, m_group.mod_order(m)); call 0 returned 100% 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% 1197: 188: const BigInt xr_m = m_group.mod_order(m_group.multiply_mod_order(m_x, m_b, r) + m); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) call 6 returned 100% branch 7 taken 100% (fallthrough) branch 8 taken 0% (throw) branch 9 taken 100% (fallthrough) branch 10 taken 0% branch 11 taken 100% (fallthrough) branch 12 taken 0% branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed -: 189: 798: 190: const BigInt s = m_group.multiply_mod_order(k_inv, xr_m, m_b_inv); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 191: -: 192: // With overwhelming probability, a bug rather than actual zero r/s 798: 193: if(r.is_zero() || s.is_zero()) branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% branch 4 taken 0% (fallthrough) branch 5 taken 100% #####: 194: throw Internal_Error("During ECDSA signature generated zero r/s"); 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 -: 195: 798: 196: return BigInt::encode_fixed_length_int_pair(r, s, m_group.get_order_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) -: 197: } -: 198: -: 199:/** -: 200:* ECDSA verification operation -: 201:*/ -: 202:class ECDSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA -: 203: { -: 204: public: function _ZN5Botan12_GLOBAL__N_128ECDSA_Verification_OperationC2ERKNS_15ECDSA_PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 5403 returned 100% blocks executed 67% 5403: 205: ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa, 5403: 206: const std::string& emsa) : -: 207: PK_Ops::Verification_with_EMSA(emsa), -: 208: m_group(ecdsa.domain()), 5403: 209: m_gy_mul(m_group.get_base_point(), ecdsa.public_point()) call 0 returned 100% call 1 returned 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 returned 100% branch 6 taken 100% (fallthrough) branch 7 taken 0% (throw) call 8 never executed call 9 never executed -: 210: { 5403: 211: } -: 212: function _ZNK5Botan12_GLOBAL__N_128ECDSA_Verification_Operation14max_input_bitsEv called 5720 returned 100% blocks executed 100% 5720: 213: size_t max_input_bits() const override { return m_group.get_order_bits(); } call 0 returned 100% -: 214: function _ZNK5Botan12_GLOBAL__N_128ECDSA_Verification_Operation13with_recoveryEv called 5720 returned 100% blocks executed 100% 5720: 215: bool with_recovery() const override { return false; } -: 216: -: 217: bool verify(const uint8_t msg[], size_t msg_len, -: 218: const uint8_t sig[], size_t sig_len) override; -: 219: private: -: 220: const EC_Group m_group; -: 221: const PointGFp_Multi_Point_Precompute m_gy_mul; -: 222: }; -: 223: function _ZN5Botan12_GLOBAL__N_128ECDSA_Verification_Operation6verifyEPKhmS3_m called 5720 returned 100% blocks executed 63% 5720: 224:bool ECDSA_Verification_Operation::verify(const uint8_t msg[], size_t msg_len, -: 225: const uint8_t sig[], size_t sig_len) -: 226: { 5720: 227: if(sig_len != m_group.get_order_bytes() * 2) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% -: 228: return false; -: 229: 11438: 230: const BigInt e(msg, msg_len, m_group.get_order_bits()); call 0 returned 100% call 1 returned 100% -: 231: 11436: 232: const BigInt r(sig, sig_len / 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 11436: 233: const BigInt s(sig + sig_len / 2, sig_len / 2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 234: 10844: 235: if(r <= 0 || r >= m_group.get_order() || s <= 0 || s >= m_group.get_order()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 96% (fallthrough) branch 4 taken 4% 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 93% (fallthrough) branch 12 taken 7% branch 13 taken 99% (fallthrough) branch 14 taken 1% 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 3% (fallthrough) branch 22 taken 97% 758: 236: return false; -: 237: 10678: 238: const BigInt w = m_group.inverse_mod_order(s); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 239: 9920: 240: const BigInt u1 = m_group.multiply_mod_order(m_group.mod_order(e), w); call 0 returned 100% 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 9920: 241: const BigInt u2 = m_group.multiply_mod_order(r, w); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 9920: 242: const PointGFp R = m_gy_mul.multi_exp(u1, u2); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 243: 9861: 244: if(R.is_zero()) branch 0 taken 99% (fallthrough) branch 1 taken 1% branch 2 taken 99% (fallthrough) branch 3 taken 1% -: 245: return false; -: 246: 9863: 247: const BigInt v = m_group.mod_order(R.get_affine_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% call 7 never executed 4903: 248: return (v == r); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 249: } -: 250: -: 251:} -: 252: -: 253:std::unique_ptr function _ZNK5Botan15ECDSA_PublicKey22create_verification_opERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ called 17640 returned 31% blocks executed 57% 17640: 254:ECDSA_PublicKey::create_verification_op(const std::string& params, -: 255: const std::string& provider) const -: 256: { 17640: 257: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 77% (fallthrough) branch 2 taken 23% branch 3 taken 10% (fallthrough) branch 4 taken 90% 5403: 258: return std::unique_ptr(new ECDSA_Verification_Operation(*this, params)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 259: 24474: 260: 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 -: 261: } -: 262: -: 263:std::unique_ptr function _ZNK5Botan16ECDSA_PrivateKey19create_signature_opERNS_21RandomNumberGeneratorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_ called 701 returned 55% blocks executed 57% 701: 264:ECDSA_PrivateKey::create_signature_op(RandomNumberGenerator& rng, -: 265: const std::string& params, -: 266: const std::string& provider) const -: 267: { 701: 268: if(provider == "base" || provider.empty()) call 0 returned 100% branch 1 taken 85% (fallthrough) branch 2 taken 15% branch 3 taken 48% (fallthrough) branch 4 taken 52% 389: 269: return std::unique_ptr(new ECDSA_Signature_Operation(*this, params, rng)); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 270: 624: 271: 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 -: 272: } -: 273: -: 274:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#x509#x509_ext.cpp.gcov -: 0:Source:src/lib/x509/x509_ext.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/x509_ext.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/x509_ext.gcda -: 0:Runs:2960 -: 1:/* -: 2:* X.509 Certificate Extensions -: 3:* (C) 1999-2010,2012 Jack Lloyd -: 4:* (C) 2016 René Korthaus, Rohde & Schwarz Cybersecurity -: 5:* (C) 2017 Fabian Weissberg, Rohde & Schwarz Cybersecurity -: 6:* -: 7:* Botan is released under the Simplified BSD License (see license.txt) -: 8:*/ -: 9: -: 10:#include -: 11:#include -: 12:#include -: 13:#include -: 14:#include -: 15:#include -: 16:#include -: 17:#include -: 18:#include -: 19:#include -: 20:#include -: 21: -: 22:namespace Botan { -: 23: -: 24:/* -: 25:* Create a Certificate_Extension object of some kind to handle -: 26:*/ -: 27:std::unique_ptr function _ZN5Botan10Extensions15create_extn_objERKNS_3OIDEbRKSt6vectorIhSaIhEE called 42029 returned 100% blocks executed 59% 42029: 28:Extensions::create_extn_obj(const OID& oid, -: 29: bool critical, -: 30: const std::vector& body) -: 31: { 42029: 32: const std::string oid_str = oid.to_string(); call 0 returned 100% -: 33: 42029: 34: std::unique_ptr extn; -: 35: 84058: 36: if(oid == Cert_Extension::Subject_Key_ID::static_oid()) 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 19% (fallthrough) branch 6 taken 81% -: 37: { 7899: 38: extn.reset(new Cert_Extension::Subject_Key_ID); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 39: } 68260: 40: else if(oid == Cert_Extension::Key_Usage::static_oid()) 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 13% (fallthrough) branch 6 taken 87% -: 41: { 4413: 42: extn.reset(new Cert_Extension::Key_Usage); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 43: } 59434: 44: else if(oid == Cert_Extension::Subject_Alternative_Name::static_oid()) 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 5% (fallthrough) branch 6 taken 95% -: 45: { 1403: 46: extn.reset(new Cert_Extension::Subject_Alternative_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) 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% call 23 returned 100% branch 24 taken 0% (fallthrough) branch 25 taken 100% branch 26 taken 0% (fallthrough) branch 27 taken 100% branch 28 taken 0% (fallthrough) branch 29 taken 100% branch 30 taken 0% (fallthrough) branch 31 taken 100% call 32 never executed call 33 never executed branch 34 never executed branch 35 never executed -: 47: } 56628: 48: else if(oid == Cert_Extension::Issuer_Alternative_Name::static_oid()) 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 1% (fallthrough) branch 6 taken 99% -: 49: { 379: 50: extn.reset(new Cert_Extension::Issuer_Alternative_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) 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% call 23 returned 100% branch 24 taken 0% (fallthrough) branch 25 taken 100% branch 26 taken 0% (fallthrough) branch 27 taken 100% branch 28 taken 0% (fallthrough) branch 29 taken 100% branch 30 taken 0% (fallthrough) branch 31 taken 100% call 32 never executed call 33 never executed branch 34 never executed branch 35 never executed -: 51: } 55870: 52: else if(oid == Cert_Extension::Basic_Constraints::static_oid()) 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 30% (fallthrough) branch 6 taken 70% -: 53: { 8272: 54: extn.reset(new Cert_Extension::Basic_Constraints); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 55: } 39326: 56: else if(oid == Cert_Extension::CRL_Number::static_oid()) 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 4% (fallthrough) branch 6 taken 96% -: 57: { 750: 58: extn.reset(new Cert_Extension::CRL_Number); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 59: } 37826: 60: else if(oid == Cert_Extension::CRL_ReasonCode::static_oid()) 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 5% (fallthrough) branch 6 taken 95% -: 61: { 963: 62: extn.reset(new Cert_Extension::CRL_ReasonCode); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 63: } 35900: 64: else if(oid == Cert_Extension::Authority_Key_ID::static_oid()) 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 41% (fallthrough) branch 6 taken 59% -: 65: { 7336: 66: extn.reset(new Cert_Extension::Authority_Key_ID); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 67: } 21228: 68: else if(oid == Cert_Extension::Name_Constraints::static_oid()) 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 6% (fallthrough) branch 6 taken 94% -: 69: { 686: 70: extn.reset(new Cert_Extension::Name_Constraints); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 71: } 19856: 72: else if(oid == Cert_Extension::CRL_Distribution_Points::static_oid()) 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 13% (fallthrough) branch 6 taken 87% -: 73: { 1319: 74: extn.reset(new Cert_Extension::CRL_Distribution_Points); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 75: } 17218: 76: else if(oid == Cert_Extension::CRL_Issuing_Distribution_Point::static_oid()) 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 1% (fallthrough) branch 6 taken 99% -: 77: { 83: 78: extn.reset(new Cert_Extension::CRL_Issuing_Distribution_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) branch 6 taken 0% (fallthrough) branch 7 taken 100% call 8 never executed -: 79: } 17052: 80: else if(oid == Cert_Extension::Certificate_Policies::static_oid()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 taken 21% (fallthrough) branch 6 taken 79% -: 81: { 1763: 82: extn.reset(new Cert_Extension::Certificate_Policies); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 83: } 13526: 84: else if(oid == Cert_Extension::Extended_Key_Usage::static_oid()) 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 14% (fallthrough) branch 6 taken 86% -: 85: { 948: 86: extn.reset(new Cert_Extension::Extended_Key_Usage); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 87: } 11630: 88: else if(oid == Cert_Extension::Authority_Information_Access::static_oid()) 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 12% (fallthrough) branch 6 taken 88% -: 89: { 675: 90: extn.reset(new Cert_Extension::Authority_Information_Access); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 91: } -: 92: else -: 93: { -: 94: // some other unknown extension type 5140: 95: extn.reset(new Cert_Extension::Unknown_Extension(oid, critical)); call 0 returned 100% branch 1 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 -: 96: } -: 97: 42029: 98: try -: 99: { 42029: 100: extn->decode_inner(body); call 0 returned 100% branch 1 taken 97% (fallthrough) branch 2 taken 3% (throw) -: 101: } 2052: 102: 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 -: 103: { 1026: 104: extn.reset(new Cert_Extension::Unknown_Extension(oid, critical)); call 0 returned 100% 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 1026: 105: extn->decode_inner(body); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 106: } 44793: 107: return extn; branch 0 taken 7% (fallthrough) branch 1 taken 93% -: 108: } -: 109: -: 110:/* -: 111:* Validate the extension (the default implementation is a NOP) -: 112:*/ function _ZN5Botan21Certificate_Extension8validateERKNS_16X509_CertificateES3_RKSt6vectorISt10shared_ptrIS2_ESaIS6_EERS4_ISt3setINS_23Certificate_Status_CodeESt4lessISC_ESaISC_EESaISG_EEm called 14113 returned 100% blocks executed 100% 14113: 113:void Certificate_Extension::validate(const X509_Certificate&, const X509_Certificate&, -: 114: const std::vector>&, -: 115: std::vector>&, -: 116: size_t) -: 117: { 14113: 118: } -: 119: -: 120:/* -: 121:* Add a new cert -: 122:*/ function _ZN5Botan10Extensions3addEPNS_21Certificate_ExtensionEb called 93 returned 99% blocks executed 61% 93: 123:void Extensions::add(Certificate_Extension* extn, bool critical) -: 124: { -: 125: // sanity check: we don't want to have the same extension more than once 279: 126: if(m_extension_info.count(extn->oid_of()) > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 1% (fallthrough) branch 4 taken 99% call 5 never executed -: 127: { 2: 128: const std::string name = extn->oid_name(); call 0 returned 100% call 1 returned 0% 1: 129: delete extn; call 0 returned 100% 2: 130: throw Invalid_Argument("Extension " + name + " already present in Extensions::add"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% branch 8 taken 100% (fallthrough) branch 9 taken 0% (throw) branch 10 taken 0% (fallthrough) branch 11 taken 100% call 12 returned 100% branch 13 never executed branch 14 never executed call 15 never executed -: 131: } -: 132: 92: 133: const OID oid = extn->oid_of(); call 0 returned 100% 184: 134: Extensions_Info info(critical, extn); 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 92: 135: m_extension_oids.push_back(oid); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 92: 136: m_extension_info.emplace(oid, info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 92: 137: } -: 138: function _ZN5Botan10Extensions7add_newEPNS_21Certificate_ExtensionEb called 954 returned 100% blocks executed 70% 954: 139:bool Extensions::add_new(Certificate_Extension* extn, bool critical) -: 140: { 2862: 141: if(m_extension_info.count(extn->oid_of()) > 0) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% branch 3 taken 1% (fallthrough) branch 4 taken 99% call 5 never executed -: 142: { 8: 143: delete extn; 8: 144: return false; // already exists call 0 returned 100% -: 145: } -: 146: 1900: 147: const OID oid = extn->oid_of(); call 0 returned 100% 1892: 148: Extensions_Info info(critical, extn); 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 946: 149: m_extension_oids.push_back(oid); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 946: 150: m_extension_info.emplace(oid, info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 946: 151: return true; call 0 returned 100% -: 152: } -: 153: function _ZN5Botan10Extensions6removeERKNS_3OIDE called 650 returned 100% blocks executed 100% 650: 154:bool Extensions::remove(const OID& oid) -: 155: { 650: 156: const bool erased = m_extension_info.erase(oid) > 0; call 0 returned 100% -: 157: 650: 158: if(erased) branch 0 taken 31% (fallthrough) branch 1 taken 69% -: 159: { 200: 160: m_extension_oids.erase(std::find(m_extension_oids.begin(), m_extension_oids.end(), oid)); call 0 returned 100% call 1 returned 100% -: 161: } -: 162: 650: 163: return erased; -: 164: } -: 165: function _ZN5Botan10Extensions7replaceEPNS_21Certificate_ExtensionEb called 648 returned 100% blocks executed 62% 648: 166:void Extensions::replace(Certificate_Extension* extn, bool critical) -: 167: { -: 168: // Remove it if it existed 648: 169: remove(extn->oid_of()); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) call 4 never executed -: 170: 648: 171: const OID oid = extn->oid_of(); call 0 returned 100% 1296: 172: Extensions_Info info(critical, extn); 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 648: 173: m_extension_oids.push_back(oid); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 648: 174: m_extension_info.emplace(oid, info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% 648: 175: } -: 176: function _ZNK5Botan10Extensions13extension_setERKNS_3OIDE called 24 returned 100% blocks executed 100% 24: 177:bool Extensions::extension_set(const OID& oid) const -: 178: { 24: 179: return (m_extension_info.find(oid) != m_extension_info.end()); call 0 returned 100% -: 180: } -: 181: function _ZNK5Botan10Extensions22critical_extension_setERKNS_3OIDE called 53 returned 100% blocks executed 100% 53: 182:bool Extensions::critical_extension_set(const OID& oid) const -: 183: { 53: 184: auto i = m_extension_info.find(oid); call 0 returned 100% 53: 185: if(i != m_extension_info.end()) branch 0 taken 21% (fallthrough) branch 1 taken 79% 11: 186: return i->second.is_critical(); -: 187: return false; -: 188: } -: 189: function _ZNK5Botan10Extensions18get_extension_bitsERKNS_3OIDE called 4 returned 75% blocks executed 67% 4: 190:std::vector Extensions::get_extension_bits(const OID& oid) const -: 191: { 4: 192: auto i = m_extension_info.find(oid); call 0 returned 100% 4: 193: if(i == m_extension_info.end()) branch 0 taken 25% (fallthrough) branch 1 taken 75% 2: 194: throw Invalid_Argument("Extensions::get_extension_bits no such extension set"); 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 -: 195: 3: 196: return i->second.bits(); call 0 returned 100% -: 197: } -: 198: function _ZNK5Botan10Extensions20get_extension_objectERKNS_3OIDE called 128597 returned 100% blocks executed 80% 128597: 199:const Certificate_Extension* Extensions::get_extension_object(const OID& oid) const -: 200: { 128597: 201: auto extn = m_extension_info.find(oid); call 0 returned 100% 128597: 202: if(extn == m_extension_info.end()) branch 0 taken 25% (fallthrough) branch 1 taken 75% -: 203: return nullptr; -: 204: 32617: 205: return &extn->second.obj(); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 206: } -: 207: function _ZNK5Botan10Extensions3getERKNS_3OIDE called 724 returned 100% blocks executed 100% 724: 208:std::unique_ptr Extensions::get(const OID& oid) const -: 209: { 724: 210: if(const Certificate_Extension* ext = this->get_extension_object(oid)) call 0 returned 100% branch 1 taken 60% (fallthrough) branch 2 taken 40% -: 211: { 431: 212: return std::unique_ptr(ext->copy()); call 0 returned 100% -: 213: } 293: 214: return nullptr; -: 215: } -: 216: function _ZNK5Botan10Extensions10extensionsEv called 8003 returned 100% blocks executed 50% 8003: 217:std::vector, bool>> Extensions::extensions() const -: 218: { 8003: 219: std::vector, bool>> exts; 39747: 220: for(auto&& ext : m_extension_info) branch 0 taken 80% (fallthrough) branch 1 taken 20% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 221: { 31744: 222: exts.push_back( branch 0 taken 0% (fallthrough) branch 1 taken 100% 63488: 223: std::make_pair( call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 63488: 224: std::unique_ptr(ext.second.obj().copy()), branch 0 taken 0% (fallthrough) branch 1 taken 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) 31744: 225: ext.second.is_critical()) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 226: ); -: 227: } 8003: 228: return exts; -: 229: } -: 230: function _ZNK5Botan10Extensions14extensions_rawEv called 0 returned 0% blocks executed 0% #####: 231:std::map, bool>> Extensions::extensions_raw() const -: 232: { #####: 233: std::map, bool>> out; #####: 234: for(auto&& ext : m_extension_info) branch 0 never executed branch 1 never executed call 2 never executed branch 3 never executed branch 4 never executed -: 235: { #####: 236: out.emplace(ext.first, #####: 237: std::make_pair(ext.second.bits(), call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 238: ext.second.is_critical())); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 239: } #####: 240: return out; -: 241: } -: 242: -: 243:/* -: 244:* Encode an Extensions list -: 245:*/ function _ZNK5Botan10Extensions11encode_intoERNS_11DER_EncoderE called 401 returned 100% blocks executed 89% 401: 246:void Extensions::encode_into(DER_Encoder& to_object) const -: 247: { 2101: 248: for(auto ext_info : m_extension_info) branch 0 taken 81% (fallthrough) branch 1 taken 19% call 2 returned 100% call 3 returned 100% call 4 never executed -: 249: { 1700: 250: const OID& oid = ext_info.first; 1700: 251: const bool should_encode = ext_info.second.obj().should_encode(); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 252: 1700: 253: if(should_encode) branch 0 taken 69% (fallthrough) branch 1 taken 31% -: 254: { 1170: 255: const bool is_critical = ext_info.second.is_critical(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1170: 256: const std::vector& ext_value = ext_info.second.bits(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 257: 1170: 258: to_object.start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1170: 259: .encode(oid) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1526: 260: .encode_optional(is_critical, false) branch 0 taken 30% (fallthrough) branch 1 taken 70% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 1170: 261: .encode(ext_value, OCTET_STRING) 1170: 262: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 263: } -: 264: } 401: 265: } -: 266: -: 267:/* -: 268:* Decode a list of Extensions -: 269:*/ function _ZN5Botan10Extensions11decode_fromERNS_11BER_DecoderE called 11227 returned 95% blocks executed 83% 11227: 270:void Extensions::decode_from(BER_Decoder& from_source) -: 271: { 11227: 272: m_extension_oids.clear(); call 0 returned 100% 11227: 273: m_extension_info.clear(); call 0 returned 100% -: 274: 22449: 275: BER_Decoder sequence = from_source.start_cons(SEQUENCE); call 0 returned 100% call 1 returned 100% call 2 returned 100% -: 276: 53200: 277: while(sequence.more_items()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 80% (fallthrough) branch 4 taken 20% -: 278: { 85158: 279: OID oid; call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) 42579: 280: bool critical; 42579: 281: std::vector bits; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 282: 42763: 283: sequence.start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) branch 3 taken 10% (fallthrough) branch 4 taken 90% 42162: 284: .decode(oid) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) 84199: 285: .decode_optional(critical, BOOLEAN, UNIVERSAL, false) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 1% (throw) call 6 returned 100% call 7 returned 100% 42037: 286: .decode(bits, OCTET_STRING) 42037: 287: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 288: 84007: 289: std::unique_ptr obj = create_extn_obj(oid, critical, bits); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 1% 83956: 290: Extensions_Info info(critical, bits, obj.release()); 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 -: 291: 41978: 292: m_extension_oids.push_back(oid); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 41978: 293: m_extension_info.emplace(oid, info); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 294: } 10621: 295: sequence.verify_end(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 10621: 296: } -: 297: -: 298:/* -: 299:* Write the extensions to an info store -: 300:*/ function _ZNK5Botan10Extensions11contents_toERNS_10Data_StoreES2_ called 11392 returned 100% blocks executed 58% 11392: 301:void Extensions::contents_to(Data_Store& subject_info, -: 302: Data_Store& issuer_info) const -: 303: { 44907: 304: for(auto&& m_extn_info : m_extension_info) branch 0 taken 75% (fallthrough) branch 1 taken 25% branch 2 taken 0% (fallthrough) branch 3 taken 100% -: 305: { 33515: 306: m_extn_info.second.obj().contents_to(subject_info, issuer_info); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% 67030: 307: subject_info.add(m_extn_info.second.obj().oid_name() + ".is_critical", 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 33515: 308: m_extn_info.second.is_critical()); branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 309: } 11392: 310: } -: 311: -: 312:namespace Cert_Extension { -: 313: -: 314:/* -: 315:* Checked accessor for the path_limit member -: 316:*/ function _ZNK5Botan14Cert_Extension17Basic_Constraints14get_path_limitEv called 6455 returned 100% blocks executed 19% 6455: 317:size_t Basic_Constraints::get_path_limit() const -: 318: { 6455: 319: if(!m_is_ca) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 320: throw Invalid_State("Basic_Constraints::get_path_limit: Not a CA"); 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 6455: 321: return m_path_limit; -: 322: } -: 323: -: 324:/* -: 325:* Encode the extension -: 326:*/ function _ZNK5Botan14Cert_Extension17Basic_Constraints12encode_innerEv called 332 returned 100% blocks executed 61% 332: 327:std::vector Basic_Constraints::encode_inner() const -: 328: { 332: 329: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 332: 330: DER_Encoder(output) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed 332: 331: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 332: 332: .encode_if(m_is_ca, 664: 333: DER_Encoder() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% call 5 never executed call 6 never executed 332: 334: .encode(m_is_ca) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 332: 335: .encode_optional(m_path_limit, NO_CERT_PATH_LIMIT) 664: 336: ) branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 332: 337: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 332: 338: return output; -: 339: } -: 340: -: 341:/* -: 342:* Decode the extension -: 343:*/ function _ZN5Botan14Cert_Extension17Basic_Constraints12decode_innerERKSt6vectorIhSaIhEE called 8272 returned 100% blocks executed 100% 8272: 344:void Basic_Constraints::decode_inner(const std::vector& in) -: 345: { 8272: 346: BER_Decoder(in) call 0 returned 100% 16538: 347: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% call 4 returned 100% 16526: 348: .decode_optional(m_is_ca, BOOLEAN, UNIVERSAL, false) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% call 4 returned 100% 8260: 349: .decode_optional(m_path_limit, INTEGER, UNIVERSAL, NO_CERT_PATH_LIMIT) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) 8246: 350: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 351: 8236: 352: if(m_is_ca == false) branch 0 taken 20% (fallthrough) branch 1 taken 80% 1678: 353: m_path_limit = 0; 8236: 354: } -: 355: -: 356:/* -: 357:* Return a textual representation -: 358:*/ function _ZNK5Botan14Cert_Extension17Basic_Constraints11contents_toERNS_10Data_StoreES3_ called 7671 returned 100% blocks executed 61% 7671: 359:void Basic_Constraints::contents_to(Data_Store& subject, Data_Store&) const -: 360: { 8859: 361: subject.add("X509v3.BasicConstraints.is_ca", (m_is_ca ? 1 : 0)); branch 0 taken 15% (fallthrough) branch 1 taken 85% 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 never executed 7671: 362: subject.add("X509v3.BasicConstraints.path_constraint", static_cast(m_path_limit)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 7671: 363: } -: 364: -: 365:/* -: 366:* Encode the extension -: 367:*/ function _ZNK5Botan14Cert_Extension9Key_Usage12encode_innerEv called 174 returned 100% blocks executed 41% 174: 368:std::vector Key_Usage::encode_inner() const -: 369: { 174: 370: if(m_constraints == NO_CONSTRAINTS) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 371: throw Encoding_Error("Cannot encode zero usage constraints"); 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 -: 372: 174: 373: const size_t unused_bits = ctz(static_cast(m_constraints)); -: 374: 174: 375: std::vector der; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 174: 376: der.push_back(BIT_STRING); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 348: 377: der.push_back(2 + ((unused_bits < 8) ? 1 : 0)); branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 174: 378: der.push_back(unused_bits % 8); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 174: 379: der.push_back((m_constraints >> 8) & 0xFF); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 174: 380: if(m_constraints & 0xFF) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 381: der.push_back(m_constraints & 0xFF); call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed -: 382: 174: 383: return der; -: 384: } -: 385: -: 386:/* -: 387:* Decode the extension -: 388:*/ function _ZN5Botan14Cert_Extension9Key_Usage12decode_innerERKSt6vectorIhSaIhEE called 4413 returned 100% blocks executed 75% 4413: 389:void Key_Usage::decode_inner(const std::vector& in) -: 390: { 4435: 391: BER_Decoder ber(in); call 0 returned 100% call 1 returned 100% -: 392: 8824: 393: BER_Object obj = ber.get_next_object(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% -: 394: 4422: 395: obj.assert_is_a(BIT_STRING, UNIVERSAL, "usage constraint"); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 1% (throw) -: 396: 4400: 397: if(obj.length() != 2 && obj.length() != 3) branch 0 taken 2% (fallthrough) branch 1 taken 98% branch 2 taken 3% (fallthrough) branch 3 taken 97% 6: 398: throw BER_Decoding_Error("Bad size for BITSTRING in usage constraint"); 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 -: 399: 4397: 400: uint16_t usage = 0; -: 401: 4397: 402: const uint8_t* bits = obj.bits(); branch 0 taken 1% branch 1 taken 100% -: 403: 4397: 404: if(bits[0] >= 8) branch 0 taken 1% branch 1 taken 100% 12: 405: throw BER_Decoding_Error("Invalid unused bits in usage constraint"); 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 -: 406: 4391: 407: const uint8_t mask = static_cast(0xFF << bits[0]); -: 408: 4391: 409: if(obj.length() == 2) branch 0 taken 98% (fallthrough) branch 1 taken 2% -: 410: { 4289: 411: usage = make_uint16(bits[1] & mask, 0); -: 412: } 102: 413: else if(obj.length() == 3) branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 414: { 102: 415: usage = make_uint16(bits[1], bits[2] & mask); -: 416: } -: 417: 4391: 418: m_constraints = Key_Constraints(usage); call 0 returned 100% 4391: 419: } -: 420: -: 421:/* -: 422:* Return a textual representation -: 423:*/ function _ZNK5Botan14Cert_Extension9Key_Usage11contents_toERNS_10Data_StoreES3_ called 4094 returned 100% blocks executed 45% 4094: 424:void Key_Usage::contents_to(Data_Store& subject, Data_Store&) const -: 425: { 4094: 426: subject.add("X509v3.KeyUsage", m_constraints); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 4094: 427: } -: 428: -: 429:/* -: 430:* Encode the extension -: 431:*/ function _ZNK5Botan14Cert_Extension14Subject_Key_ID12encode_innerEv called 218 returned 100% blocks executed 50% 218: 432:std::vector Subject_Key_ID::encode_inner() const -: 433: { 218: 434: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 218: 435: DER_Encoder(output).encode(m_key_id, 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) call 6 returned 100% call 7 never executed branch 8 never executed branch 9 never executed 218: 436: return output; -: 437: } -: 438: -: 439:/* -: 440:* Decode the extension -: 441:*/ function _ZN5Botan14Cert_Extension14Subject_Key_ID12decode_innerERKSt6vectorIhSaIhEE called 7899 returned 100% blocks executed 100% 7899: 442:void Subject_Key_ID::decode_inner(const std::vector& in) -: 443: { 7899: 444: BER_Decoder(in).decode(m_key_id, OCTET_STRING).verify_end(); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 1% (throw) call 7 returned 100% call 8 returned 100% 7865: 445: } -: 446: -: 447:/* -: 448:* Return a textual representation -: 449:*/ function _ZNK5Botan14Cert_Extension14Subject_Key_ID11contents_toERNS_10Data_StoreES3_ called 7628 returned 100% blocks executed 64% 7628: 450:void Subject_Key_ID::contents_to(Data_Store& subject, Data_Store&) const -: 451: { 7628: 452: subject.add("X509v3.SubjectKeyIdentifier", m_key_id); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 7628: 453: } -: 454: -: 455:/* -: 456:* Subject_Key_ID Constructor -: 457:*/ function _ZN5Botan14Cert_Extension14Subject_Key_IDC2ERKSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE called 218 returned 100% blocks executed 52% 218: 458:Subject_Key_ID::Subject_Key_ID(const std::vector& pub_key, const std::string& hash_name) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 never executed branch 4 never executed -: 459: { 218: 460: std::unique_ptr hash(HashFunction::create_or_throw(hash_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) -: 461: 218: 462: m_key_id.resize(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) -: 463: 218: 464: hash->update(pub_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 218: 465: hash->final(m_key_id.data()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 466: -: 467: // Truncate longer hashes, 192 bits here seems plenty 218: 468: const size_t max_skid_len = (192 / 8); 218: 469: if(m_key_id.size() > max_skid_len) branch 0 taken 100% (fallthrough) branch 1 taken 0% 218: 470: m_key_id.resize(max_skid_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 218: 471: } -: 472: -: 473:/* -: 474:* Encode the extension -: 475:*/ function _ZNK5Botan14Cert_Extension16Authority_Key_ID12encode_innerEv called 247 returned 100% blocks executed 58% 247: 476:std::vector Authority_Key_ID::encode_inner() const -: 477: { 247: 478: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 494: 479: DER_Encoder(output) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed branch 5 never executed branch 6 never executed 247: 480: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 247: 481: .encode(m_key_id, OCTET_STRING, ASN1_Tag(0), CONTEXT_SPECIFIC) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 247: 482: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 247: 483: return output; -: 484: } -: 485: -: 486:/* -: 487:* Decode the extension -: 488:*/ function _ZN5Botan14Cert_Extension16Authority_Key_ID12decode_innerERKSt6vectorIhSaIhEE called 7336 returned 99% blocks executed 100% 7336: 489:void Authority_Key_ID::decode_inner(const std::vector& in) -: 490: { 7336: 491: BER_Decoder(in) call 0 returned 100% 14657: 492: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% call 4 returned 100% call 5 returned 100% call 6 returned 100% 7298: 493: .decode_optional_string(m_key_id, OCTET_STRING, 0); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) 7275: 494: } -: 495: -: 496:/* -: 497:* Return a textual representation -: 498:*/ function _ZNK5Botan14Cert_Extension16Authority_Key_ID11contents_toERNS_10Data_StoreES3_ called 6439 returned 100% blocks executed 69% 6439: 499:void Authority_Key_ID::contents_to(Data_Store&, Data_Store& issuer) const -: 500: { 6439: 501: if(m_key_id.size()) branch 0 taken 98% (fallthrough) branch 1 taken 2% 12684: 502: issuer.add("X509v3.AuthorityKeyIdentifier", m_key_id); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 6439: 503: } -: 504: -: 505:/* -: 506:* Encode the extension -: 507:*/ function _ZNK5Botan14Cert_Extension24Subject_Alternative_Name12encode_innerEv called 330 returned 100% blocks executed 50% 330: 508:std::vector Subject_Alternative_Name::encode_inner() const -: 509: { 330: 510: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 330: 511: DER_Encoder(output).encode(m_alt_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% call 7 never executed branch 8 never executed branch 9 never executed 330: 512: return output; -: 513: } -: 514: -: 515:/* -: 516:* Encode the extension -: 517:*/ function _ZNK5Botan14Cert_Extension23Issuer_Alternative_Name12encode_innerEv called 0 returned 0% blocks executed 0% #####: 518:std::vector Issuer_Alternative_Name::encode_inner() const -: 519: { #####: 520: std::vector output; call 0 never executed branch 1 never executed branch 2 never executed #####: 521: DER_Encoder(output).encode(m_alt_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 call 7 never executed branch 8 never executed branch 9 never executed #####: 522: return output; -: 523: } -: 524: -: 525:/* -: 526:* Decode the extension -: 527:*/ function _ZN5Botan14Cert_Extension24Subject_Alternative_Name12decode_innerERKSt6vectorIhSaIhEE called 1403 returned 89% blocks executed 100% 1403: 528:void Subject_Alternative_Name::decode_inner(const std::vector& in) -: 529: { 1403: 530: BER_Decoder(in).decode(m_alt_name); call 0 returned 100% call 1 returned 100% branch 2 taken 89% (fallthrough) branch 3 taken 11% (throw) call 4 returned 100% call 5 returned 100% 1253: 531: } -: 532: -: 533:/* -: 534:* Decode the extension -: 535:*/ function _ZN5Botan14Cert_Extension23Issuer_Alternative_Name12decode_innerERKSt6vectorIhSaIhEE called 379 returned 89% blocks executed 100% 379: 536:void Issuer_Alternative_Name::decode_inner(const std::vector& in) -: 537: { 379: 538: BER_Decoder(in).decode(m_alt_name); call 0 returned 100% call 1 returned 100% branch 2 taken 89% (fallthrough) branch 3 taken 11% (throw) call 4 returned 100% call 5 returned 100% 339: 539: } -: 540: -: 541:/* -: 542:* Return a textual representation -: 543:*/ function _ZNK5Botan14Cert_Extension24Subject_Alternative_Name11contents_toERNS_10Data_StoreES3_ called 815 returned 100% blocks executed 83% 815: 544:void Subject_Alternative_Name::contents_to(Data_Store& subject_info, -: 545: Data_Store&) const -: 546: { 815: 547: subject_info.add(get_alt_name().contents()); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) 815: 548: } -: 549: -: 550:/* -: 551:* Return a textual representation -: 552:*/ function _ZNK5Botan14Cert_Extension23Issuer_Alternative_Name11contents_toERNS_10Data_StoreES3_ called 144 returned 100% blocks executed 83% 144: 553:void Issuer_Alternative_Name::contents_to(Data_Store&, Data_Store& issuer_info) const -: 554: { 144: 555: issuer_info.add(get_alt_name().contents()); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) 144: 556: } -: 557: -: 558:/* -: 559:* Encode the extension -: 560:*/ function _ZNK5Botan14Cert_Extension18Extended_Key_Usage12encode_innerEv called 330 returned 100% blocks executed 67% 330: 561:std::vector Extended_Key_Usage::encode_inner() const -: 562: { 330: 563: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 660: 564: DER_Encoder(output) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 never executed branch 5 never executed branch 6 never executed 330: 565: .start_cons(SEQUENCE) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 344: 566: .encode_list(m_oids) branch 0 taken 4% (fallthrough) branch 1 taken 96% 330: 567: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 330: 568: return output; -: 569: } -: 570: -: 571:/* -: 572:* Decode the extension -: 573:*/ function _ZN5Botan14Cert_Extension18Extended_Key_Usage12decode_innerERKSt6vectorIhSaIhEE called 948 returned 94% blocks executed 100% 948: 574:void Extended_Key_Usage::decode_inner(const std::vector& in) -: 575: { 948: 576: BER_Decoder(in).decode_list(m_oids); call 0 returned 100% call 1 returned 100% branch 2 taken 94% (fallthrough) branch 3 taken 6% (throw) call 4 returned 100% call 5 returned 100% 892: 577: } -: 578: -: 579:/* -: 580:* Return a textual representation -: 581:*/ function _ZNK5Botan14Cert_Extension18Extended_Key_Usage11contents_toERNS_10Data_StoreES3_ called 698 returned 100% blocks executed 64% 698: 582:void Extended_Key_Usage::contents_to(Data_Store& subject, Data_Store&) const -: 583: { 2028: 584: for(size_t i = 0; i != m_oids.size(); ++i) branch 0 taken 66% (fallthrough) branch 1 taken 34% 3904: 585: subject.add("X509v3.ExtendedKeyUsage", m_oids[i].to_string()); 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 94% (fallthrough) branch 8 taken 6% 698: 586: } -: 587: -: 588:/* -: 589:* Encode the extension -: 590:*/ function _ZNK5Botan14Cert_Extension16Name_Constraints12encode_innerEv called 0 returned 0% blocks executed 0% #####: 591:std::vector Name_Constraints::encode_inner() const -: 592: { #####: 593: throw Not_Implemented("Name_Constraints encoding"); 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 -: 594: } -: 595: -: 596: -: 597:/* -: 598:* Decode the extension -: 599:*/ function _ZN5Botan14Cert_Extension16Name_Constraints12decode_innerERKSt6vectorIhSaIhEE called 686 returned 62% blocks executed 77% 686: 600:void Name_Constraints::decode_inner(const std::vector& in) -: 601: { 1636: 602: std::vector permit, exclude; 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% call 6 returned 100% 1372: 603: BER_Decoder ber(in); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% call 4 returned 100% 940: 604: BER_Decoder ext = ber.start_cons(SEQUENCE); call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% 1350: 605: BER_Object per = ext.get_next_object(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% -: 606: 674: 607: ext.push_back(per); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 674: 608: if(per.is_a(0, ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 41% (fallthrough) branch 4 taken 59% -: 609: { 273: 610: ext.decode_list(permit,ASN1_Tag(0),ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC)); call 0 returned 100% branch 1 taken 68% (fallthrough) branch 2 taken 32% (throw) 187: 611: if(permit.empty()) branch 0 taken 2% (fallthrough) branch 1 taken 98% 6: 612: throw Encoding_Error("Empty Name Contraint list"); 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 -: 613: } -: 614: 1168: 615: BER_Object exc = ext.get_next_object(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% 583: 616: ext.push_back(exc); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 583: 617: if(per.is_a(1, ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC))) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 65% (fallthrough) branch 4 taken 35% -: 618: { 381: 619: ext.decode_list(exclude,ASN1_Tag(1),ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC)); call 0 returned 100% branch 1 taken 64% (fallthrough) branch 2 taken 36% (throw) 244: 620: if(exclude.empty()) branch 0 taken 1% (fallthrough) branch 1 taken 99% 4: 621: throw Encoding_Error("Empty Name Contraint list"); 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 -: 622: } -: 623: 444: 624: ext.end_cons(); call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) -: 625: 438: 626: if(permit.empty() && exclude.empty()) branch 0 taken 58% (fallthrough) branch 1 taken 42% branch 2 taken 6% (fallthrough) branch 3 taken 94% 32: 627: throw Encoding_Error("Empty Name Contraint extension"); 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 -: 628: 1266: 629: m_name_constraints = NameConstraints(std::move(permit),std::move(exclude)); 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 59% (fallthrough) branch 6 taken 41% 422: 630: } -: 631: -: 632:/* -: 633:* Return a textual representation -: 634:*/ function _ZNK5Botan14Cert_Extension16Name_Constraints11contents_toERNS_10Data_StoreES3_ called 130 returned 100% blocks executed 52% 130: 635:void Name_Constraints::contents_to(Data_Store& subject, Data_Store&) const -: 636: { 260: 637: std::stringstream ss; call 0 returned 100% call 1 returned 100% -: 638: 519: 639: for(const GeneralSubtree& gs: m_name_constraints.permitted()) branch 0 taken 75% (fallthrough) branch 1 taken 25% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 640: { 389: 641: ss << gs; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 778: 642: subject.add("X509v3.NameConstraints.permitted", ss.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) branch 9 taken 100% (fallthrough) branch 10 taken 0% 389: 643: ss.str(std::string()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 0% (fallthrough) branch 4 taken 100% -: 644: } 218: 645: for(const GeneralSubtree& gs: m_name_constraints.excluded()) branch 0 taken 40% (fallthrough) branch 1 taken 60% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 646: { 88: 647: ss << gs; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 176: 648: subject.add("X509v3.NameConstraints.excluded", ss.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) branch 9 taken 100% (fallthrough) branch 10 taken 0% 88: 649: ss.str(std::string()); 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 -: 650: } 130: 651: } -: 652: function _ZN5Botan14Cert_Extension16Name_Constraints8validateERKNS_16X509_CertificateES4_RKSt6vectorISt10shared_ptrIS3_ESaIS7_EERS5_ISt3setINS_23Certificate_Status_CodeESt4lessISD_ESaISD_EESaISH_EEm called 48 returned 100% blocks executed 75% 48: 653:void Name_Constraints::validate(const X509_Certificate& subject, const X509_Certificate& issuer, -: 654: const std::vector>& cert_path, -: 655: std::vector>& cert_status, -: 656: size_t pos) -: 657: { 48: 658: if(!m_name_constraints.permitted().empty() || !m_name_constraints.excluded().empty()) branch 0 taken 77% (fallthrough) branch 1 taken 23% branch 2 taken 100% (fallthrough) branch 3 taken 0% -: 659: { 48: 660: if(!subject.is_CA_cert()) call 0 returned 100% branch 1 taken 33% (fallthrough) branch 2 taken 67% -: 661: { 16: 662: cert_status.at(pos).insert(Certificate_Status_Code::NAME_CONSTRAINT_ERROR); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% -: 663: } -: 664: 48: 665: const bool issuer_name_constraint_critical = 48: 666: issuer.is_critical("X509v3.NameConstraints"); call 0 returned 100% 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 -: 667: -: 668: // Check that all subordinate certs pass the name constraint 92: 669: for(size_t j = 0; j < pos; ++j) branch 0 taken 48% (fallthrough) branch 1 taken 52% -: 670: { 44: 671: bool permitted = m_name_constraints.permitted().empty(); 44: 672: bool failed = false; -: 673: 148: 674: for(auto c: m_name_constraints.permitted()) branch 0 taken 70% (fallthrough) branch 1 taken 30% call 2 returned 100% call 3 never executed -: 675: { 104: 676: switch(c.base().matches(*cert_path.at(j))) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 15% branch 6 taken 33% branch 7 taken 52% -: 677: { 16: 678: case GeneralName::MatchResult::NotFound: 16: 679: case GeneralName::MatchResult::All: 16: 680: permitted = true; 16: 681: break; 34: 682: case GeneralName::MatchResult::UnknownType: 34: 683: failed = issuer_name_constraint_critical; 34: 684: permitted = true; 34: 685: break; -: 686: default: -: 687: break; -: 688: } -: 689: } -: 690: 67: 691: for(auto c: m_name_constraints.excluded()) branch 0 taken 34% (fallthrough) branch 1 taken 66% call 2 returned 100% -: 692: { 23: 693: switch(c.base().matches(*cert_path.at(j))) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) branch 5 taken 9% branch 6 taken 0% branch 7 taken 91% -: 694: { 2: 695: case GeneralName::MatchResult::All: 2: 696: case GeneralName::MatchResult::Some: 2: 697: failed = true; 2: 698: break; #####: 699: case GeneralName::MatchResult::UnknownType: #####: 700: failed = issuer_name_constraint_critical; #####: 701: break; -: 702: default: -: 703: break; -: 704: } -: 705: } -: 706: 44: 707: if(failed || !permitted) branch 0 taken 18% (fallthrough) branch 1 taken 82% -: 708: { 8: 709: cert_status.at(j).insert(Certificate_Status_Code::NAME_CONSTRAINT_ERROR); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% -: 710: } -: 711: } -: 712: } 48: 713: } -: 714: -: 715:namespace { -: 716: -: 717:/* -: 718:* A policy specifier -: 719:*/ 10643*: 720:class Policy_Information final : public ASN1_Object branch 0 taken 0% (fallthrough) branch 1 taken 100% branch 2 taken 8% (fallthrough) branch 3 taken 92% branch 4 taken 100% (fallthrough) branch 5 taken 0% branch 6 never executed branch 7 never executed -: 721: { -: 722: public: 2441: 723: Policy_Information() = default; call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% (throw) #####: 724: explicit Policy_Information(const OID& oid) : m_oid(oid) {} call 0 never executed branch 1 never executed branch 2 never executed -: 725: 2225: 726: const OID& oid() const { return m_oid; } call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 727: function _ZNK5Botan14Cert_Extension12_GLOBAL__N_118Policy_Information11encode_intoERNS_11DER_EncoderE called 0 returned 0% blocks executed 0% #####: 728: void encode_into(DER_Encoder& codec) const override -: 729: { #####: 730: codec.start_cons(SEQUENCE) call 0 never executed #####: 731: .encode(m_oid) call 0 never executed #####: 732: .end_cons(); call 0 never executed #####: 733: } -: 734: function _ZN5Botan14Cert_Extension12_GLOBAL__N_118Policy_Information11decode_fromERNS_11BER_DecoderE called 2441 returned 98% blocks executed 100% 2441: 735: void decode_from(BER_Decoder& codec) override -: 736: { 4852: 737: codec.start_cons(SEQUENCE) call 0 returned 99% call 1 returned 100% call 2 returned 100% 2411: 738: .decode(m_oid) call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) 2392: 739: .discard_remaining() call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2392: 740: .end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 2392: 741: } -: 742: -: 743: private: -: 744: OID m_oid; -: 745: }; -: 746: -: 747:} -: 748: -: 749:/* -: 750:* Encode the extension -: 751:*/ function _ZNK5Botan14Cert_Extension20Certificate_Policies12encode_innerEv called 0 returned 0% blocks executed 0% #####: 752:std::vector Certificate_Policies::encode_inner() const -: 753: { #####: 754: std::vector policies; -: 755: #####: 756: for(size_t i = 0; i != m_oids.size(); ++i) branch 0 never executed branch 1 never executed #####: 757: policies.push_back(Policy_Information(m_oids[i])); 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 -: 758: #####: 759: std::vector output; call 0 never executed branch 1 never executed branch 2 never executed #####: 760: DER_Encoder(output) 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 #####: 761: .start_cons(SEQUENCE) call 0 never executed branch 1 never executed branch 2 never executed branch 3 never executed branch 4 never executed #####: 762: .encode_list(policies) #####: 763: .end_cons(); call 0 never executed branch 1 never executed branch 2 never executed #####: 764: return output; call 0 never executed -: 765: } -: 766: -: 767:/* -: 768:* Decode the extension -: 769:*/ function _ZN5Botan14Cert_Extension20Certificate_Policies12decode_innerERKSt6vectorIhSaIhEE called 1763 returned 97% blocks executed 100% 1763: 770:void Certificate_Policies::decode_inner(const std::vector& in) -: 771: { 3472: 772: std::vector policies; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 773: 1817: 774: BER_Decoder(in).decode_list(policies); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 97% (fallthrough) branch 5 taken 3% (throw) call 6 returned 100% call 7 returned 100% call 8 returned 100% 1709: 775: m_oids.clear(); call 0 returned 100% 3934: 776: for(size_t i = 0; i != policies.size(); ++i) call 0 returned 100% branch 1 taken 57% (fallthrough) branch 2 taken 43% 2225: 777: m_oids.push_back(policies[i].oid()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1709: 778: } -: 779: -: 780:/* -: 781:* Return a textual representation -: 782:*/ function _ZNK5Botan14Cert_Extension20Certificate_Policies11contents_toERNS_10Data_StoreES3_ called 1539 returned 100% blocks executed 64% 1539: 783:void Certificate_Policies::contents_to(Data_Store& info, Data_Store&) const -: 784: { 3353: 785: for(size_t i = 0; i != m_oids.size(); ++i) branch 0 taken 54% (fallthrough) branch 1 taken 46% 5036: 786: info.add("X509v3.CertificatePolicies", m_oids[i].to_string()); 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 78% (fallthrough) branch 8 taken 22% 1539: 787: } -: 788: function _ZN5Botan14Cert_Extension20Certificate_Policies8validateERKNS_16X509_CertificateES4_RKSt6vectorISt10shared_ptrIS3_ESaIS7_EERS5_ISt3setINS_23Certificate_Status_CodeESt4lessISD_ESaISD_EESaISH_EEm called 569 returned 100% blocks executed 80% 569: 789:void Certificate_Policies::validate( -: 790: const X509_Certificate& /*subject*/, -: 791: const X509_Certificate& /*issuer*/, -: 792: const std::vector>& /*cert_path*/, -: 793: std::vector>& cert_status, -: 794: size_t pos) -: 795: { 569: 796: std::set oid_set(m_oids.begin(), m_oids.end()); call 0 returned 100% 569: 797: if(oid_set.size() != m_oids.size()) branch 0 taken 3% (fallthrough) branch 1 taken 97% -: 798: { 16: 799: cert_status.at(pos).insert(Certificate_Status_Code::DUPLICATE_CERT_POLICY); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) call 5 never executed -: 800: } 569: 801: } -: 802: function _ZNK5Botan14Cert_Extension28Authority_Information_Access12encode_innerEv called 0 returned 0% blocks executed 0% #####: 803:std::vector Authority_Information_Access::encode_inner() const -: 804: { #####: 805: ASN1_String url(m_ocsp_responder, IA5_STRING); call 0 never executed call 1 never executed -: 806: #####: 807: std::vector output; call 0 never executed branch 1 never executed branch 2 never executed #####: 808: DER_Encoder(output) call 0 never executed branch 1 never executed branch 2 never executed call 3 never executed branch 4 never executed branch 5 never executed #####: 809: .start_cons(SEQUENCE) call 0 never executed branch 1 never executed branch 2 never executed #####: 810: .start_cons(SEQUENCE) call 0 never executed branch 1 never executed branch 2 never executed #####: 811: .encode(OID::from_string("PKIX.OCSP")) 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 branch 15 never executed branch 16 never executed #####: 812: .add_object(ASN1_Tag(6), CONTEXT_SPECIFIC, url.value()) call 0 never executed branch 1 never executed branch 2 never executed #####: 813: .end_cons() call 0 never executed branch 1 never executed branch 2 never executed #####: 814: .end_cons(); call 0 never executed branch 1 never executed branch 2 never executed #####: 815: return output; call 0 never executed -: 816: } -: 817: function _ZN5Botan14Cert_Extension28Authority_Information_Access12decode_innerERKSt6vectorIhSaIhEE called 675 returned 95% blocks executed 71% 675: 818:void Authority_Information_Access::decode_inner(const std::vector& in) -: 819: { 2019: 820: BER_Decoder ber = BER_Decoder(in).start_cons(SEQUENCE); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% call 5 returned 100% -: 821: 1782: 822: while(ber.more_items()) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 64% (fallthrough) branch 4 taken 36% -: 823: { 2280: 824: OID oid; call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% (throw) -: 825: 2258: 826: BER_Decoder info = ber.start_cons(SEQUENCE); call 0 returned 100% branch 1 taken 98% (fallthrough) branch 2 taken 2% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 100% -: 827: 1118: 828: info.decode(oid); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 829: 2230: 830: if(oid == OID::from_string("PKIX.OCSP")) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 100% (fallthrough) branch 7 taken 0% branch 8 taken 0% (fallthrough) branch 9 taken 100% branch 10 taken 49% (fallthrough) branch 11 taken 51% -: 831: { 1098: 832: BER_Object name = info.get_next_object(); call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) -: 833: 547: 834: if(name.is_a(6, CONTEXT_SPECIFIC)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 82% (fallthrough) branch 4 taken 18% -: 835: { 464: 836: m_ocsp_responder = ASN1::to_string(name); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 3% (fallthrough) branch 5 taken 97% -: 837: } -: 838: -: 839: } 3333: 840: if(oid == OID::from_string("PKIX.CertificateAuthorityIssuers")) call 0 returned 100% 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 taken 39% (fallthrough) branch 11 taken 61% -: 841: { 869: 842: BER_Object name = info.get_next_object(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) -: 843: 434: 844: if(name.is_a(6, CONTEXT_SPECIFIC)) call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 99% (fallthrough) branch 4 taken 1% -: 845: { 860: 846: m_ca_issuers.push_back(ASN1::to_string(name)); 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 -: 847: } -: 848: } -: 849: } 642: 850: } -: 851: function _ZNK5Botan14Cert_Extension28Authority_Information_Access11contents_toERNS_10Data_StoreES3_ called 441 returned 100% blocks executed 58% 441: 852:void Authority_Information_Access::contents_to(Data_Store& subject, Data_Store&) const -: 853: { 441: 854: if(!m_ocsp_responder.empty()) branch 0 taken 77% (fallthrough) branch 1 taken 23% 680: 855: subject.add("OCSP.responder", m_ocsp_responder); call 0 returned 100% branch 1 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 773: 856: for(const std::string& ca_issuer : m_ca_issuers) branch 0 taken 43% (fallthrough) branch 1 taken 57% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 664: 857: subject.add("PKIX.CertificateAuthorityIssuers", ca_issuer); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 441: 858: } -: 859: -: 860:/* -: 861:* Checked accessor for the crl_number member -: 862:*/ function _ZNK5Botan14Cert_Extension10CRL_Number14get_crl_numberEv called 293 returned 100% blocks executed 19% 293: 863:size_t CRL_Number::get_crl_number() const -: 864: { 293: 865: if(!m_has_value) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 866: throw Invalid_State("CRL_Number::get_crl_number: Not 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 293: 867: return m_crl_number; -: 868: } -: 869: -: 870:/* -: 871:* Copy a CRL_Number extension -: 872:*/ function _ZNK5Botan14Cert_Extension10CRL_Number4copyEv called 849 returned 100% blocks executed 24% 849: 873:CRL_Number* CRL_Number::copy() const -: 874: { 849: 875: if(!m_has_value) branch 0 taken 0% (fallthrough) branch 1 taken 100% #####: 876: throw Invalid_State("CRL_Number::copy: Not 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 849: 877: return new CRL_Number(m_crl_number); call 0 returned 100% -: 878: } -: 879: -: 880:/* -: 881:* Encode the extension -: 882:*/ function _ZNK5Botan14Cert_Extension10CRL_Number12encode_innerEv called 29 returned 100% blocks executed 50% 29: 883:std::vector CRL_Number::encode_inner() const -: 884: { 29: 885: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 29: 886: DER_Encoder(output).encode(m_crl_number); call 0 returned 100% branch 1 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 branch 8 never executed branch 9 never executed 29: 887: return output; -: 888: } -: 889: -: 890:/* -: 891:* Decode the extension -: 892:*/ function _ZN5Botan14Cert_Extension10CRL_Number12decode_innerERKSt6vectorIhSaIhEE called 750 returned 91% blocks executed 100% 750: 893:void CRL_Number::decode_inner(const std::vector& in) -: 894: { 750: 895: BER_Decoder(in).decode(m_crl_number); call 0 returned 100% call 1 returned 100% branch 2 taken 91% (fallthrough) branch 3 taken 9% (throw) call 4 returned 100% call 5 returned 100% 682: 896: m_has_value = true; 682: 897: } -: 898: -: 899:/* -: 900:* Return a textual representation -: 901:*/ function _ZNK5Botan14Cert_Extension10CRL_Number11contents_toERNS_10Data_StoreES3_ called 9 returned 100% blocks executed 64% 9: 902:void CRL_Number::contents_to(Data_Store& info, Data_Store&) const -: 903: { 9: 904: info.add("X509v3.CRLNumber", static_cast(m_crl_number)); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 9: 905: } -: 906: -: 907:/* -: 908:* Encode the extension -: 909:*/ function _ZNK5Botan14Cert_Extension14CRL_ReasonCode12encode_innerEv called 19 returned 100% blocks executed 50% 19: 910:std::vector CRL_ReasonCode::encode_inner() const -: 911: { 19: 912: std::vector output; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 19: 913: DER_Encoder(output).encode(static_cast(m_reason), ENUMERATED, UNIVERSAL); call 0 returned 100% branch 1 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 branch 8 never executed branch 9 never executed 19: 914: return output; -: 915: } -: 916: -: 917:/* -: 918:* Decode the extension -: 919:*/ function _ZN5Botan14Cert_Extension14CRL_ReasonCode12decode_innerERKSt6vectorIhSaIhEE called 963 returned 99% blocks executed 100% 963: 920:void CRL_ReasonCode::decode_inner(const std::vector& in) -: 921: { 963: 922: size_t reason_code = 0; 963: 923: BER_Decoder(in).decode(reason_code, ENUMERATED, UNIVERSAL); call 0 returned 100% call 1 returned 100% branch 2 taken 99% (fallthrough) branch 3 taken 1% (throw) call 4 returned 100% call 5 returned 100% 952: 924: m_reason = static_cast(reason_code); 952: 925: } -: 926: -: 927:/* -: 928:* Return a textual representation -: 929:*/ function _ZNK5Botan14Cert_Extension14CRL_ReasonCode11contents_toERNS_10Data_StoreES3_ called 8 returned 100% blocks executed 64% 8: 930:void CRL_ReasonCode::contents_to(Data_Store& info, Data_Store&) const -: 931: { 8: 932: info.add("X509v3.CRLReasonCode", m_reason); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 8: 933: } -: 934: function _ZNK5Botan14Cert_Extension23CRL_Distribution_Points12encode_innerEv called 0 returned 0% blocks executed 0% #####: 935:std::vector CRL_Distribution_Points::encode_inner() const -: 936: { #####: 937: throw Not_Implemented("CRL_Distribution_Points encoding"); 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 -: 938: } -: 939: function _ZN5Botan14Cert_Extension23CRL_Distribution_Points12decode_innerERKSt6vectorIhSaIhEE called 1319 returned 86% blocks executed 73% 1319: 940:void CRL_Distribution_Points::decode_inner(const std::vector& buf) -: 941: { 2638: 942: BER_Decoder(buf) call 0 returned 100% call 1 returned 100% call 2 returned 100% 1319: 943: .decode_list(m_distribution_points) call 0 returned 100% branch 1 taken 86% (fallthrough) branch 2 taken 14% (throw) 1140: 944: .verify_end(); call 0 returned 100% branch 1 taken 99% (fallthrough) branch 2 taken 1% (throw) -: 945: 1132: 946: std::stringstream ss; call 0 returned 100% -: 947: 2362: 948: for(size_t i = 0; i != m_distribution_points.size(); ++i) branch 0 taken 52% (fallthrough) branch 1 taken 48% -: 949: { 2460: 950: auto contents = m_distribution_points[i].point().contents(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 951: 3600: 952: for(const auto& pair : contents) branch 0 taken 66% (fallthrough) branch 1 taken 34% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) -: 953: { 2370: 954: ss << pair.first << ": " << pair.second << " "; call 0 returned 100% branch 1 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) -: 955: } -: 956: } -: 957: 1132: 958: m_crl_distribution_urls.push_back(ss.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% call 8 returned 100% call 9 never executed 1132: 959: } -: 960: function _ZNK5Botan14Cert_Extension23CRL_Distribution_Points11contents_toERNS_10Data_StoreES3_ called 681 returned 100% blocks executed 71% 681: 961:void CRL_Distribution_Points::contents_to(Data_Store& subject, Data_Store&) const -: 962: { 1362: 963: for(const std::string& crl_url : m_crl_distribution_urls) branch 0 taken 50% (fallthrough) branch 1 taken 50% call 2 returned 100% branch 3 taken 100% (fallthrough) branch 4 taken 0% (throw) 1362: 964: subject.add("CRL.DistributionPoint", crl_url); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) 681: 965: } -: 966: function _ZNK5Botan14Cert_Extension23CRL_Distribution_Points18Distribution_Point11encode_intoERNS_11DER_EncoderE called 0 returned 0% blocks executed 0% #####: 967:void CRL_Distribution_Points::Distribution_Point::encode_into(class DER_Encoder&) const -: 968: { #####: 969: throw Not_Implemented("CRL_Distribution_Points encoding"); 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 -: 970: } -: 971: function _ZN5Botan14Cert_Extension23CRL_Distribution_Points18Distribution_Point11decode_fromERNS_11BER_DecoderE called 1533 returned 85% blocks executed 69% 1533: 972:void CRL_Distribution_Points::Distribution_Point::decode_from(class BER_Decoder& ber) -: 973: { 1533: 974: ber.start_cons(SEQUENCE) call 0 returned 97% 3029: 975: .start_cons(ASN1_Tag(0), CONTEXT_SPECIFIC) call 0 returned 100% branch 1 taken 96% (fallthrough) branch 2 taken 4% (throw) call 3 returned 100% call 4 returned 100% call 5 returned 100% 1424: 976: .decode_optional_implicit(m_point, ASN1_Tag(0), -: 977: ASN1_Tag(CONTEXT_SPECIFIC | CONSTRUCTED), 3229: 978: SEQUENCE, CONSTRUCTED) call 0 returned 100% branch 1 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 93% (fallthrough) branch 17 taken 7% (throw) call 18 returned 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% call 27 returned 100% call 28 returned 100% branch 29 taken 0% (fallthrough) branch 30 taken 100% 1321: 979: .end_cons().end_cons(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 1% (throw) call 3 returned 100% branch 4 taken 99% (fallthrough) branch 5 taken 1% (throw) 1303: 980: } -: 981: function _ZNK5Botan14Cert_Extension30CRL_Issuing_Distribution_Point12encode_innerEv called 0 returned 0% blocks executed 0% #####: 982:std::vector CRL_Issuing_Distribution_Point::encode_inner() const -: 983: { #####: 984: throw Not_Implemented("CRL_Issuing_Distribution_Point encoding"); 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 -: 985: } -: 986: function _ZN5Botan14Cert_Extension30CRL_Issuing_Distribution_Point12decode_innerERKSt6vectorIhSaIhEE called 83 returned 27% blocks executed 100% 83: 987:void CRL_Issuing_Distribution_Point::decode_inner(const std::vector& buf) -: 988: { 83: 989: BER_Decoder(buf).decode(m_distribution_point).verify_end(); call 0 returned 100% call 1 returned 100% branch 2 taken 27% (fallthrough) branch 3 taken 73% (throw) call 4 returned 100% branch 5 taken 100% (fallthrough) branch 6 taken 0% (throw) call 7 returned 100% call 8 returned 100% 22: 990: } -: 991: function _ZNK5Botan14Cert_Extension30CRL_Issuing_Distribution_Point11contents_toERNS_10Data_StoreES3_ called 2 returned 100% blocks executed 44% 2: 992:void CRL_Issuing_Distribution_Point::contents_to(Data_Store& info, Data_Store&) const -: 993: { 2: 994: auto contents = m_distribution_point.point().contents(); call 0 returned 100% 4: 995: std::stringstream ss; call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% -: 996: 2*: 997: for(const auto& pair : contents) branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed branch 3 never executed branch 4 never executed -: 998: { #####: 999: ss << pair.first << ": " << pair.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 call 6 never executed branch 7 never executed branch 8 never executed call 9 never executed branch 10 never executed branch 11 never executed -: 1000: } -: 1001: 4: 1002: info.add("X509v3.CRLIssuingDistributionPoint", ss.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) branch 9 taken 0% (fallthrough) branch 10 taken 100% call 11 returned 100% call 12 never executed 2: 1003: } -: 1004: function _ZNK5Botan14Cert_Extension17Unknown_Extension12encode_innerEv called 0 returned 0% blocks executed 0% #####: 1005:std::vector Unknown_Extension::encode_inner() const -: 1006: { #####: 1007: return m_bytes; call 0 never executed -: 1008: } -: 1009: function _ZN5Botan14Cert_Extension17Unknown_Extension12decode_innerERKSt6vectorIhSaIhEE called 6166 returned 100% blocks executed 100% 6166: 1010:void Unknown_Extension::decode_inner(const std::vector& bytes) -: 1011: { -: 1012: // Just treat as an opaque blob at this level 6166: 1013: m_bytes = bytes; call 0 returned 100% 6166: 1014: } -: 1015: function _ZNK5Botan14Cert_Extension17Unknown_Extension11contents_toERNS_10Data_StoreES3_ called 3216 returned 100% blocks executed 100% 3216: 1016:void Unknown_Extension::contents_to(Data_Store&, Data_Store&) const -: 1017: { -: 1018: // No information store 3216: 1019: } -: 1020: -: 1021:} -: 1022: -: 1023:} <<<<<< EOF # path=/home/runner/work/botan/botan/src#lib#pubkey#dlies#dlies.cpp.gcov -: 0:Source:src/lib/pubkey/dlies/dlies.cpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/lib/pubkey_dlies.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/lib/pubkey_dlies.gcda -: 0:Runs:2960 -: 1:/* -: 2:* DLIES -: 3:* (C) 1999-2007 Jack Lloyd -: 4:* (C) 2016 Daniel Neus, Rohde & Schwarz Cybersecurity -: 5:* -: 6:* Botan is released under the Simplified BSD License (see license.txt) -: 7:*/ -: 8: -: 9:#include -: 10:#include -: 11: -: 12:namespace Botan { -: 13: function _ZN5Botan15DLIES_EncryptorC2ERKNS_13DH_PrivateKeyERNS_21RandomNumberGeneratorEPNS_3KDFEPNS_25MessageAuthenticationCodeEm called 4 returned 100% blocks executed 100% 4: 14:DLIES_Encryptor::DLIES_Encryptor(const DH_PrivateKey& own_priv_key, -: 15: RandomNumberGenerator& rng, -: 16: KDF* kdf, -: 17: MessageAuthenticationCode* mac, 4: 18: size_t mac_key_length) : 4: 19: DLIES_Encryptor(own_priv_key, rng, kdf, nullptr, 0, mac, mac_key_length) call 0 returned 100% -: 20: { 4: 21: } -: 22: function _ZN5Botan15DLIES_EncryptorC2ERKNS_13DH_PrivateKeyERNS_21RandomNumberGeneratorEPNS_3KDFEPNS_11Cipher_ModeEmPNS_25MessageAuthenticationCodeEm called 76 returned 100% blocks executed 21% 76: 23:DLIES_Encryptor::DLIES_Encryptor(const DH_PrivateKey& own_priv_key, -: 24: RandomNumberGenerator& rng, -: 25: KDF* kdf, -: 26: Cipher_Mode* cipher, -: 27: size_t cipher_key_len, -: 28: MessageAuthenticationCode* mac, 76: 29: size_t mac_key_length) : -: 30: m_other_pub_key(), -: 31: m_own_pub_key(own_priv_key.public_value()), -: 32: m_ka(own_priv_key, rng, "Raw"), -: 33: m_kdf(kdf), -: 34: m_cipher(cipher), -: 35: m_cipher_key_len(cipher_key_len), -: 36: m_mac(mac), -: 37: m_mac_keylen(mac_key_length), 152: 38: m_iv() call 0 returned 100% branch 1 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% (throw) call 17 returned 100% branch 18 taken 100% (fallthrough) branch 19 taken 0% (throw) branch 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed call 28 never executed branch 29 never executed branch 30 never executed branch 31 never executed branch 32 never executed -: 39: { 76*: 40: BOTAN_ASSERT_NONNULL(kdf); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 76*: 41: BOTAN_ASSERT_NONNULL(mac); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 76: 42: } -: 43: function _ZNK5Botan15DLIES_Encryptor3encEPKhmRNS_21RandomNumberGeneratorE called 80 returned 95% blocks executed 40% 80: 44:std::vector DLIES_Encryptor::enc(const uint8_t in[], size_t length, -: 45: RandomNumberGenerator&) const -: 46: { 80: 47: if(m_other_pub_key.empty()) branch 0 taken 5% (fallthrough) branch 1 taken 95% -: 48: { 12: 49: throw Invalid_State("DLIES: The other key was never set"); call 0 returned 100% call 1 returned 100% branch 2 taken 100% (fallthrough) branch 3 taken 0% (throw) branch 4 taken 100% (fallthrough) branch 5 taken 0% call 6 returned 0% call 7 never executed -: 50: } -: 51: -: 52: // calculate secret value 76: 53: const SymmetricKey secret_value = m_ka.derive_key(0, m_other_pub_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) call 3 returned 100% branch 4 taken 100% (fallthrough) branch 5 taken 0% (throw) branch 6 taken 0% (fallthrough) branch 7 taken 100% call 8 never executed -: 54: -: 55: // derive secret key from secret value 76: 56: const size_t required_key_length = m_cipher ? m_cipher_key_len + m_mac_keylen : length + m_mac_keylen; branch 0 taken 66% (fallthrough) branch 1 taken 34% 304: 57: const secure_vector secret_keys = m_kdf->derive_key(required_key_length, secret_value.bits_of()); call 0 returned 100% branch 1 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% branch 15 taken 100% (fallthrough) branch 16 taken 0% branch 17 never executed branch 18 never executed -: 58: 76: 59: if(secret_keys.size() != required_key_length) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 60: { #####: 61: throw Encoding_Error("DLIES: KDF did not provide sufficient output"); 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 -: 62: } -: 63: 152: 64: secure_vector ciphertext(in, in + length); 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 76: 65: const size_t cipher_key_len = m_cipher ? m_cipher_key_len : length; branch 0 taken 66% (fallthrough) branch 1 taken 34% -: 66: 76: 67: if(m_cipher) branch 0 taken 66% (fallthrough) branch 1 taken 34% -: 68: { 100: 69: SymmetricKey enc_key(secret_keys.data(), cipher_key_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 50: 70: m_cipher->set_key(enc_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 71: 50*: 72: if(m_iv.size() == 0 && !m_cipher->valid_nonce_length(m_iv.size())) 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 #####: 73: throw Invalid_Argument("DLIES with " + m_cipher->name() + " requires an IV be set"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed branch 8 never executed branch 9 never executed call 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed call 22 never executed 100: 74: m_cipher->start(m_iv.bits_of()); call 0 returned 100% 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 50: 75: m_cipher->finish(ciphertext); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 76: } -: 77: else -: 78: { 26: 79: xor_buf(ciphertext, secret_keys, cipher_key_len); call 0 returned 100% -: 80: } -: 81: -: 82: // calculate MAC 76: 83: m_mac->set_key(secret_keys.data() + cipher_key_len, m_mac_keylen); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 152: 84: secure_vector tag = m_mac->process(ciphertext); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 85: -: 86: // out = (ephemeral) public key + ciphertext + tag 152: 87: secure_vector out(m_own_pub_key.size() + ciphertext.size() + tag.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed 76: 88: buffer_insert(out, 0, m_own_pub_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 76: 89: buffer_insert(out, 0 + m_own_pub_key.size(), ciphertext); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 76: 90: buffer_insert(out, 0 + m_own_pub_key.size() + ciphertext.size(), tag); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 91: 152: 92: return unlock(out); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% -: 93: } -: 94: -: 95:/** -: 96:* Return the max size, in bytes, of a message -: 97:* We assume DLIES is only used for key transport and limit the maximum size -: 98:* to 512 bits -: 99:*/ function _ZNK5Botan15DLIES_Encryptor18maximum_input_sizeEv called 0 returned 0% blocks executed 0% #####: 100:size_t DLIES_Encryptor::maximum_input_size() const -: 101: { #####: 102: return 64; -: 103: } -: 104: function _ZNK5Botan15DLIES_Encryptor17ciphertext_lengthEm called 0 returned 0% blocks executed 0% #####: 105:size_t DLIES_Encryptor::ciphertext_length(size_t ptext_len) const -: 106: { #####: 107: return m_own_pub_key.size() + m_mac->output_length() + m_cipher->output_length(ptext_len); call 0 never executed call 1 never executed -: 108: } -: 109: function _ZN5Botan15DLIES_DecryptorC2ERKNS_13DH_PrivateKeyERNS_21RandomNumberGeneratorEPNS_3KDFEPNS_11Cipher_ModeEmPNS_25MessageAuthenticationCodeEm called 76 returned 100% blocks executed 29% 76: 110:DLIES_Decryptor::DLIES_Decryptor(const DH_PrivateKey& own_priv_key, -: 111: RandomNumberGenerator& rng, -: 112: KDF* kdf, -: 113: Cipher_Mode* cipher, -: 114: size_t cipher_key_len, -: 115: MessageAuthenticationCode* mac, 76: 116: size_t mac_key_length) : 76: 117: m_pub_key_size(own_priv_key.public_value().size()), call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% -: 118: m_ka(own_priv_key, rng, "Raw"), -: 119: m_kdf(kdf), -: 120: m_cipher(cipher), -: 121: m_cipher_key_len(cipher_key_len), -: 122: m_mac(mac), -: 123: m_mac_keylen(mac_key_length), 228: 124: m_iv() 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) 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% (throw) call 17 returned 100% branch 18 taken 100% (fallthrough) branch 19 taken 0% (throw) call 20 never executed branch 21 never executed branch 22 never executed branch 23 never executed branch 24 never executed branch 25 never executed branch 26 never executed branch 27 never executed branch 28 never executed call 29 never executed -: 125: { 76*: 126: BOTAN_ASSERT_NONNULL(kdf); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 76*: 127: BOTAN_ASSERT_NONNULL(mac); branch 0 taken 0% (fallthrough) branch 1 taken 100% call 2 never executed 76: 128: } -: 129: function _ZN5Botan15DLIES_DecryptorC2ERKNS_13DH_PrivateKeyERNS_21RandomNumberGeneratorEPNS_3KDFEPNS_25MessageAuthenticationCodeEm called 4 returned 100% blocks executed 100% 4: 130:DLIES_Decryptor::DLIES_Decryptor(const DH_PrivateKey& own_priv_key, -: 131: RandomNumberGenerator& rng, -: 132: KDF* kdf, -: 133: MessageAuthenticationCode* mac, 4: 134: size_t mac_key_length) : 4: 135: DLIES_Decryptor(own_priv_key, rng, kdf, nullptr, 0, mac, mac_key_length) call 0 returned 100% 4: 136: {} -: 137: function _ZNK5Botan15DLIES_Decryptor16plaintext_lengthEm called 0 returned 0% blocks executed 0% #####: 138:size_t DLIES_Decryptor::plaintext_length(size_t ctext_len) const -: 139: { #####: 140: if(ctext_len < m_pub_key_size + m_mac->output_length()) call 0 never executed branch 1 never executed branch 2 never executed -: 141: return 0; // will throw if attempted -: 142: #####: 143: return ctext_len - (m_pub_key_size + m_mac->output_length()); call 0 never executed -: 144: } -: 145: function _ZNK5Botan15DLIES_Decryptor10do_decryptERhPKhm called 1600 returned 100% blocks executed 39% 1600: 146:secure_vector DLIES_Decryptor::do_decrypt(uint8_t& valid_mask, -: 147: const uint8_t msg[], size_t length) const -: 148: { 1600: 149: if(length < m_pub_key_size + m_mac->output_length()) call 0 returned 100% branch 1 taken 1% (fallthrough) branch 2 taken 100% -: 150: { 8: 151: throw Decoding_Error("DLIES decryption: ciphertext is too short"); 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 -: 152: } -: 153: -: 154: // calculate secret value 3192: 155: std::vector other_pub_key(msg, msg + m_pub_key_size); call 0 returned 100% 4788: 156: const SymmetricKey secret_value = m_ka.derive_key(0, other_pub_key); 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% -: 157: 1596: 158: const size_t ciphertext_len = length - m_pub_key_size - m_mac->output_length(); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 1596: 159: size_t cipher_key_len = m_cipher ? m_cipher_key_len : ciphertext_len; branch 0 taken 66% (fallthrough) branch 1 taken 34% -: 160: -: 161: // derive secret key from secret value 1596: 162: const size_t required_key_length = cipher_key_len + m_mac_keylen; 6384: 163: secure_vector secret_keys = m_kdf->derive_key(required_key_length, secret_value.bits_of()); call 0 returned 100% branch 1 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% branch 15 taken 100% (fallthrough) branch 16 taken 0% branch 17 never executed branch 18 never executed -: 164: 1596: 165: if(secret_keys.size() != required_key_length) branch 0 taken 0% (fallthrough) branch 1 taken 100% -: 166: { #####: 167: throw Encoding_Error("DLIES: KDF did not provide sufficient output"); 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 -: 168: } -: 169: 3192: 170: secure_vector ciphertext(msg + m_pub_key_size, msg + m_pub_key_size + ciphertext_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 100% (fallthrough) branch 4 taken 0% branch 5 never executed branch 6 never executed -: 171: -: 172: // calculate MAC 1596: 173: m_mac->set_key(secret_keys.data() + cipher_key_len, m_mac_keylen); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 3192: 174: secure_vector calculated_tag = m_mac->process(ciphertext); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) branch 3 taken 63% (fallthrough) branch 4 taken 37% -: 175: -: 176: // calculated tag == received tag ? 3192: 177: secure_vector tag(msg + m_pub_key_size + ciphertext_len, 3192: 178: msg + m_pub_key_size + ciphertext_len + m_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) branch 6 taken 100% (fallthrough) branch 7 taken 0% -: 179: 1596: 180: valid_mask = ct_compare_u8(tag.data(), calculated_tag.data(), tag.size()); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 181: -: 182: // decrypt 1596: 183: if(m_cipher) branch 0 taken 66% (fallthrough) branch 1 taken 34% -: 184: { 1050: 185: if(valid_mask) branch 0 taken 5% (fallthrough) branch 1 taken 95% -: 186: { 100: 187: SymmetricKey dec_key(secret_keys.data(), cipher_key_len); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) 50: 188: m_cipher->set_key(dec_key); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 189: 50: 190: try -: 191: { -: 192: // the decryption can fail: -: 193: // e.g. Invalid_Authentication_Tag is thrown if GCM is used and the message does not have a valid tag -: 194: 50*: 195: if(m_iv.size() == 0 && !m_cipher->valid_nonce_length(m_iv.size())) 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 #####: 196: throw Invalid_Argument("DLIES with " + m_cipher->name() + " requires an IV be set"); call 0 never executed call 1 never executed branch 2 never executed branch 3 never executed call 4 never executed branch 5 never executed branch 6 never executed call 7 never executed branch 8 never executed branch 9 never executed call 10 never executed branch 11 never executed branch 12 never executed branch 13 never executed branch 14 never executed branch 15 never executed branch 16 never executed call 17 never executed branch 18 never executed branch 19 never executed branch 20 never executed branch 21 never executed call 22 never executed 100: 197: m_cipher->start(m_iv.bits_of()); call 0 returned 100% 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% 50: 198: m_cipher->finish(ciphertext); call 0 returned 100% branch 1 taken 100% (fallthrough) branch 2 taken 0% (throw) -: 199: } =====: 200: catch(...) call 0 never executed -: 201: { =====: 202: valid_mask = 0; call 0 never executed branch 1 never executed branch 2 never executed -: 203: } -: 204: -: 205: } -: 206: else -: 207: { 1000: 208: return secure_vector(); -: 209: } -: 210: } -: 211: else -: 212: { 546: 213: xor_buf(ciphertext, secret_keys.data(), cipher_key_len); call 0 returned 100% -: 214: } -: 215: 1596: 216: return ciphertext; branch 0 taken 100% (fallthrough) branch 1 taken 0% -: 217: } -: 218: -: 219:} <<<<<< EOF # path=/home/runner/work/botan/botan/build#include#botan#bcrypt_pbkdf.h.gcov -: 0:Source:build/include/botan/bcrypt_pbkdf.h -: 0:Graph:/home/runner/work/botan/botan/build/obj/test/test_pbkdf.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/test/test_pbkdf.gcda -: 0:Runs:1 -: 1:/* -: 2:* (C) 2018,2019 Jack Lloyd -: 3:* -: 4:* Botan is released under the Simplified BSD License (see license.txt) -: 5:*/ -: 6: -: 7:#ifndef BOTAN_PBKDF_BCRYPT_H_ -: 8:#define BOTAN_PBKDF_BCRYPT_H_ -: 9: -: 10:#include -: 11: -: 12:BOTAN_FUTURE_INTERNAL_HEADER(bcrypt_pbkdf.h) -: 13: -: 14:namespace Botan { -: 15: -: 16:/** -: 17:* Bcrypt-PBKDF key derivation function -: 18:*/ -: 19:class BOTAN_PUBLIC_API(2,11) Bcrypt_PBKDF final : public PasswordHash -: 20: { -: 21: public: -: 22: Bcrypt_PBKDF(size_t iterations) : m_iterations(iterations) {} -: 23: -: 24: Bcrypt_PBKDF(const Bcrypt_PBKDF& other) = default; -: 25: Bcrypt_PBKDF& operator=(const Bcrypt_PBKDF&) = default; -: 26: -: 27: /** -: 28: * Derive a new key under the current Bcrypt-PBKDF parameter set -: 29: */ -: 30: void derive_key(uint8_t out[], size_t out_len, -: 31: const char* password, size_t password_len, -: 32: const uint8_t salt[], size_t salt_len) const override; -: 33: -: 34: std::string to_string() const override; -: 35: function _ZNK5Botan12Bcrypt_PBKDF10iterationsEv called 0 returned 0% blocks executed 0% #####: 36: size_t iterations() const override { return m_iterations; } -: 37: function _ZNK5Botan12Bcrypt_PBKDF11parallelismEv called 0 returned 0% blocks executed 0% #####: 38: size_t parallelism() const override { return 0; } -: 39: function _ZNK5Botan12Bcrypt_PBKDF12memory_paramEv called 0 returned 0% blocks executed 0% #####: 40: size_t memory_param() const override { return 0; } -: 41: -: 42: size_t total_memory_usage() const override { return 4096; } -: 43: -: 44: private: -: 45: size_t m_iterations; -: 46: }; -: 47: -: 48:class BOTAN_PUBLIC_API(2,11) Bcrypt_PBKDF_Family final : public PasswordHashFamily -: 49: { -: 50: public: -: 51: Bcrypt_PBKDF_Family() {} -: 52: -: 53: std::string name() const override; -: 54: -: 55: std::unique_ptr tune(size_t output_length, -: 56: std::chrono::milliseconds msec, -: 57: size_t max_memory) const override; -: 58: -: 59: std::unique_ptr default_params() const override; -: 60: -: 61: std::unique_ptr from_iterations(size_t iter) const override; -: 62: -: 63: std::unique_ptr from_params( -: 64: size_t i, size_t, size_t) const override; -: 65: }; -: 66: -: 67:/** -: 68:* Bcrypt PBKDF compatible with OpenBSD bcrypt_pbkdf -: 69:*/ -: 70:void BOTAN_UNSTABLE_API bcrypt_pbkdf(uint8_t output[], size_t output_len, -: 71: const char* pass, size_t pass_len, -: 72: const uint8_t salt[], size_t salt_len, -: 73: size_t rounds); -: 74: -: 75:} -: 76: -: 77:#endif <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#impl#handler_alloc_hook.ipp.gcov -: 0:Source:/usr/include/boost/asio/impl/handler_alloc_hook.ipp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:// -: 2:// impl/handler_alloc_hook.ipp -: 3:// ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -: 4:// -: 5:// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) -: 6:// -: 7:// Distributed under the Boost Software License, Version 1.0. (See accompanying -: 8:// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -: 9:// -: 10: -: 11:#ifndef BOOST_ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP -: 12:#define BOOST_ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP -: 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: 64*: 28:void* asio_handler_allocate(std::size_t size, ...) -: 29:{ -: 30:#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 127*: 31: return detail::thread_info_base::allocate( branch 0 taken 100% (fallthrough) branch 1 taken 0% call 2 returned 100% call 3 returned 100% branch 4 never executed branch 5 never executed call 6 never executed call 7 never executed branch 8 taken 100% (fallthrough) branch 9 taken 0% call 10 returned 100% call 11 returned 100% branch 12 never executed branch 13 never executed call 14 never executed call 15 never executed branch 16 taken 100% (fallthrough) branch 17 taken 0% call 18 returned 100% call 19 returned 100% branch 20 taken 100% (fallthrough) branch 21 taken 0% call 22 returned 100% call 23 returned 100% branch 24 taken 50% (fallthrough) branch 25 taken 50% call 26 returned 100% call 27 returned 100% branch 28 taken 100% (fallthrough) branch 29 taken 0% call 30 returned 100% call 31 returned 100% -: 32: detail::thread_context::thread_call_stack::top(), size); -: 33:#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) -: 34: return ::operator new(size); -: 35:#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) -: 36:} -: 37: -: 38:void asio_handler_deallocate(void* pointer, std::size_t size, ...) -: 39:{ -: 40:#if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) -: 41: detail::thread_info_base::deallocate( -: 42: detail::thread_context::thread_call_stack::top(), pointer, size); -: 43:#else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) -: 44: (void)size; -: 45: ::operator delete(pointer); -: 46:#endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) -: 47:} -: 48: -: 49:} // namespace asio -: 50:} // namespace boost -: 51: -: 52:#include -: 53: -: 54:#endif // BOOST_ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP <<<<<< EOF # path=/home/runner/work/botan/botan/#usr#include#boost#asio#detail#reactive_socket_service.hpp.gcov -: 0:Source:/usr/include/boost/asio/detail/reactive_socket_service.hpp -: 0:Graph:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcno -: 0:Data:/home/runner/work/botan/botan/build/obj/cli/tls_proxy.gcda -: 0:Runs:723 -: 1:// -: 2:// detail/reactive_socket_service.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_REACTIVE_SOCKET_SERVICE_HPP -: 12:#define BOOST_ASIO_DETAIL_REACTIVE_SOCKET_SERVICE_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_IOCP) -: 21: -: 22:#include -: 23:#include -: 24:#include -: 25:#include -: 26:#include -: 27:#include -: 28:#include -: 29:#include -: 30:#include -: 31:#include -: 32:#include -: 33:#include -: 34:#include -: 35:#include -: 36:#include -: 37:#include -: 38:#include -: 39:#include -: 40: -: 41:#include -: 42: -: 43:namespace boost { -: 44:namespace asio { -: 45:namespace detail { -: 46: -: 47:template -: 48:class reactive_socket_service : -: 49: public execution_context_service_base >, -: 50: public reactive_socket_service_base -: 51:{ -: 52:public: -: 53: // The protocol type. -: 54: typedef Protocol protocol_type; -: 55: -: 56: // The endpoint type. -: 57: typedef typename Protocol::endpoint endpoint_type; -: 58: -: 59: // The native type of a socket. -: 60: typedef socket_type native_handle_type; -: 61: -: 62: // The implementation type of the socket. -: 63: struct implementation_type : -: 64: reactive_socket_service_base::base_implementation_type -: 65: { -: 66: // Default constructor. 6: 67: implementation_type() call 0 returned 100% 6: 68: : protocol_(endpoint_type().protocol()) call 0 returned 100% -: 69: { -: 70: } -: 71: -: 72: // The protocol associated with the socket. -: 73: protocol_type protocol_; -: 74: }; -: 75: -: 76: // Constructor. #####: 77: reactive_socket_service(execution_context& context) -: 78: : execution_context_service_base< -: 79: reactive_socket_service >(context), #####: 80: reactive_socket_service_base(context) call 0 never executed branch 1 never executed branch 2 never executed -: 81: { -: 82: } -: 83: -: 84: // Destroy all user-defined handler objects owned by the service. function _ZN5boost4asio6detail23reactive_socket_serviceINS0_2ip3tcpEE8shutdownEv called 0 returned 0% blocks executed 0% #####: 85: void shutdown() -: 86: { #####: 87: this->base_shutdown(); #####: 88: } -: 89: -: 90: // Move-construct a new socket implementation. -: 91: void move_construct(implementation_type& impl, -: 92: implementation_type& other_impl) -: 93: { -: 94: this->base_move_construct(impl, other_impl); -: 95: -: 96: impl.protocol_ = other_impl.protocol_; -: 97: other_impl.protocol_ = endpoint_type().protocol(); -: 98: } -: 99: -: 100: // Move-assign from another socket implementation. -: 101: void move_assign(implementation_type& impl, -: 102: reactive_socket_service_base& other_service, -: 103: implementation_type& other_impl) -: 104: { -: 105: this->base_move_assign(impl, other_service, other_impl); -: 106: -: 107: impl.protocol_ = other_impl.protocol_; -: 108: other_impl.protocol_ = endpoint_type().protocol(); -: 109: } -: 110: