Copy disabled (too large)
Download .txt
Showing preview only (15,193K chars total). Download the full file to get everything.
Repository: apple/swift-nio-ssl
Branch: main
Commit: 3f337058ccd7
Files: 769
Total size: 14.3 MB
Directory structure:
gitextract_pqg_y_t3/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── release.yml
│ └── workflows/
│ ├── main.yml
│ ├── pull_request.yml
│ └── pull_request_label.yml
├── .gitignore
├── .licenseignore
├── .spi.yml
├── .swift-format
├── .unacceptablelanguageignore
├── Benchmarks/
│ ├── Benchmarks/
│ │ └── NIOSSLBenchmarks/
│ │ ├── Benchmarks.swift
│ │ ├── ManyWrites.swift
│ │ ├── Shared.swift
│ │ └── SimpleHandshake.swift
│ ├── Package.swift
│ └── Thresholds/
│ ├── 6.1/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ ├── 6.2/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ ├── 6.3/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ ├── nightly-main/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ └── nightly-next/
│ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.txt
├── IntegrationTests/
│ ├── plugin_echo.sh
│ ├── plugin_junit_xml.sh
│ ├── run-single-test.sh
│ ├── run-tests.sh
│ ├── test_functions.sh
│ └── tests_01_general/
│ ├── defines.sh
│ ├── test_01_renegotiation.sh
│ └── test_02_execstack.sh
├── LICENSE.txt
├── NOTICE.txt
├── Package.swift
├── README.md
├── SECURITY.md
├── Sources/
│ ├── CNIOBoringSSL/
│ │ ├── crypto/
│ │ │ ├── asn1/
│ │ │ │ ├── a_bitstr.cc
│ │ │ │ ├── a_bool.cc
│ │ │ │ ├── a_d2i_fp.cc
│ │ │ │ ├── a_dup.cc
│ │ │ │ ├── a_gentm.cc
│ │ │ │ ├── a_i2d_fp.cc
│ │ │ │ ├── a_int.cc
│ │ │ │ ├── a_mbstr.cc
│ │ │ │ ├── a_object.cc
│ │ │ │ ├── a_octet.cc
│ │ │ │ ├── a_strex.cc
│ │ │ │ ├── a_strnid.cc
│ │ │ │ ├── a_time.cc
│ │ │ │ ├── a_type.cc
│ │ │ │ ├── a_utctm.cc
│ │ │ │ ├── asn1_lib.cc
│ │ │ │ ├── asn1_par.cc
│ │ │ │ ├── asn_pack.cc
│ │ │ │ ├── f_int.cc
│ │ │ │ ├── f_string.cc
│ │ │ │ ├── internal.h
│ │ │ │ ├── posix_time.cc
│ │ │ │ ├── tasn_dec.cc
│ │ │ │ ├── tasn_enc.cc
│ │ │ │ ├── tasn_fre.cc
│ │ │ │ ├── tasn_new.cc
│ │ │ │ ├── tasn_typ.cc
│ │ │ │ └── tasn_utl.cc
│ │ │ ├── base64/
│ │ │ │ └── base64.cc
│ │ │ ├── bcm_support.h
│ │ │ ├── bio/
│ │ │ │ ├── bio.cc
│ │ │ │ ├── bio_mem.cc
│ │ │ │ ├── connect.cc
│ │ │ │ ├── errno.cc
│ │ │ │ ├── fd.cc
│ │ │ │ ├── file.cc
│ │ │ │ ├── hexdump.cc
│ │ │ │ ├── internal.h
│ │ │ │ ├── pair.cc
│ │ │ │ ├── printf.cc
│ │ │ │ ├── socket.cc
│ │ │ │ └── socket_helper.cc
│ │ │ ├── blake2/
│ │ │ │ └── blake2.cc
│ │ │ ├── bn/
│ │ │ │ ├── bn_asn1.cc
│ │ │ │ └── convert.cc
│ │ │ ├── buf/
│ │ │ │ └── buf.cc
│ │ │ ├── bytestring/
│ │ │ │ ├── asn1_compat.cc
│ │ │ │ ├── ber.cc
│ │ │ │ ├── cbb.cc
│ │ │ │ ├── cbs.cc
│ │ │ │ ├── internal.h
│ │ │ │ └── unicode.cc
│ │ │ ├── chacha/
│ │ │ │ ├── chacha.cc
│ │ │ │ └── internal.h
│ │ │ ├── cipher/
│ │ │ │ ├── derive_key.cc
│ │ │ │ ├── e_aesctrhmac.cc
│ │ │ │ ├── e_aesgcmsiv.cc
│ │ │ │ ├── e_chacha20poly1305.cc
│ │ │ │ ├── e_des.cc
│ │ │ │ ├── e_null.cc
│ │ │ │ ├── e_rc2.cc
│ │ │ │ ├── e_rc4.cc
│ │ │ │ ├── e_tls.cc
│ │ │ │ ├── get_cipher.cc
│ │ │ │ ├── internal.h
│ │ │ │ └── tls_cbc.cc
│ │ │ ├── conf/
│ │ │ │ ├── conf.cc
│ │ │ │ └── internal.h
│ │ │ ├── cpu_aarch64_apple.cc
│ │ │ ├── cpu_aarch64_fuchsia.cc
│ │ │ ├── cpu_aarch64_linux.cc
│ │ │ ├── cpu_aarch64_openbsd.cc
│ │ │ ├── cpu_aarch64_sysreg.cc
│ │ │ ├── cpu_aarch64_win.cc
│ │ │ ├── cpu_arm_freebsd.cc
│ │ │ ├── cpu_arm_linux.cc
│ │ │ ├── cpu_arm_linux.h
│ │ │ ├── cpu_intel.cc
│ │ │ ├── crypto.cc
│ │ │ ├── curve25519/
│ │ │ │ ├── asm/
│ │ │ │ │ └── x25519-asm-arm.S
│ │ │ │ ├── curve25519.cc
│ │ │ │ ├── curve25519_64_adx.cc
│ │ │ │ ├── curve25519_tables.h
│ │ │ │ ├── internal.h
│ │ │ │ └── spake25519.cc
│ │ │ ├── des/
│ │ │ │ ├── des.cc
│ │ │ │ └── internal.h
│ │ │ ├── dh/
│ │ │ │ ├── dh_asn1.cc
│ │ │ │ └── params.cc
│ │ │ ├── digest/
│ │ │ │ └── digest_extra.cc
│ │ │ ├── dsa/
│ │ │ │ ├── dsa.cc
│ │ │ │ ├── dsa_asn1.cc
│ │ │ │ └── internal.h
│ │ │ ├── ec/
│ │ │ │ ├── ec_asn1.cc
│ │ │ │ ├── ec_derive.cc
│ │ │ │ ├── hash_to_curve.cc
│ │ │ │ └── internal.h
│ │ │ ├── ecdh/
│ │ │ │ └── ecdh.cc
│ │ │ ├── ecdsa/
│ │ │ │ └── ecdsa_asn1.cc
│ │ │ ├── engine/
│ │ │ │ └── engine.cc
│ │ │ ├── err/
│ │ │ │ ├── err.cc
│ │ │ │ └── internal.h
│ │ │ ├── evp/
│ │ │ │ ├── evp.cc
│ │ │ │ ├── evp_asn1.cc
│ │ │ │ ├── evp_ctx.cc
│ │ │ │ ├── internal.h
│ │ │ │ ├── p_dh.cc
│ │ │ │ ├── p_dh_asn1.cc
│ │ │ │ ├── p_dsa_asn1.cc
│ │ │ │ ├── p_ec.cc
│ │ │ │ ├── p_ec_asn1.cc
│ │ │ │ ├── p_ed25519.cc
│ │ │ │ ├── p_ed25519_asn1.cc
│ │ │ │ ├── p_hkdf.cc
│ │ │ │ ├── p_rsa.cc
│ │ │ │ ├── p_rsa_asn1.cc
│ │ │ │ ├── p_x25519.cc
│ │ │ │ ├── p_x25519_asn1.cc
│ │ │ │ ├── pbkdf.cc
│ │ │ │ ├── print.cc
│ │ │ │ ├── scrypt.cc
│ │ │ │ └── sign.cc
│ │ │ ├── ex_data.cc
│ │ │ ├── fipsmodule/
│ │ │ │ ├── aes/
│ │ │ │ │ ├── aes.cc.inc
│ │ │ │ │ ├── aes_nohw.cc.inc
│ │ │ │ │ ├── cbc.cc.inc
│ │ │ │ │ ├── cfb.cc.inc
│ │ │ │ │ ├── ctr.cc.inc
│ │ │ │ │ ├── gcm.cc.inc
│ │ │ │ │ ├── gcm_nohw.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── key_wrap.cc.inc
│ │ │ │ │ ├── mode_wrappers.cc.inc
│ │ │ │ │ ├── ofb.cc.inc
│ │ │ │ │ └── polyval.cc.inc
│ │ │ │ ├── bcm.cc
│ │ │ │ ├── bcm_interface.h
│ │ │ │ ├── bn/
│ │ │ │ │ ├── add.cc.inc
│ │ │ │ │ ├── asm/
│ │ │ │ │ │ └── x86_64-gcc.cc.inc
│ │ │ │ │ ├── bn.cc.inc
│ │ │ │ │ ├── bytes.cc.inc
│ │ │ │ │ ├── cmp.cc.inc
│ │ │ │ │ ├── ctx.cc.inc
│ │ │ │ │ ├── div.cc.inc
│ │ │ │ │ ├── div_extra.cc.inc
│ │ │ │ │ ├── exponentiation.cc.inc
│ │ │ │ │ ├── gcd.cc.inc
│ │ │ │ │ ├── gcd_extra.cc.inc
│ │ │ │ │ ├── generic.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── jacobi.cc.inc
│ │ │ │ │ ├── montgomery.cc.inc
│ │ │ │ │ ├── montgomery_inv.cc.inc
│ │ │ │ │ ├── mul.cc.inc
│ │ │ │ │ ├── prime.cc.inc
│ │ │ │ │ ├── random.cc.inc
│ │ │ │ │ ├── rsaz_exp.cc.inc
│ │ │ │ │ ├── rsaz_exp.h
│ │ │ │ │ ├── shift.cc.inc
│ │ │ │ │ └── sqrt.cc.inc
│ │ │ │ ├── cipher/
│ │ │ │ │ ├── aead.cc.inc
│ │ │ │ │ ├── cipher.cc.inc
│ │ │ │ │ ├── e_aes.cc.inc
│ │ │ │ │ ├── e_aesccm.cc.inc
│ │ │ │ │ └── internal.h
│ │ │ │ ├── cmac/
│ │ │ │ │ └── cmac.cc.inc
│ │ │ │ ├── delocate.h
│ │ │ │ ├── dh/
│ │ │ │ │ ├── check.cc.inc
│ │ │ │ │ ├── dh.cc.inc
│ │ │ │ │ └── internal.h
│ │ │ │ ├── digest/
│ │ │ │ │ ├── digest.cc.inc
│ │ │ │ │ ├── digests.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── md32_common.h
│ │ │ │ ├── digestsign/
│ │ │ │ │ └── digestsign.cc.inc
│ │ │ │ ├── ec/
│ │ │ │ │ ├── builtin_curves.h
│ │ │ │ │ ├── ec.cc.inc
│ │ │ │ │ ├── ec_key.cc.inc
│ │ │ │ │ ├── ec_montgomery.cc.inc
│ │ │ │ │ ├── felem.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── oct.cc.inc
│ │ │ │ │ ├── p224-64.cc.inc
│ │ │ │ │ ├── p256-nistz-table.h
│ │ │ │ │ ├── p256-nistz.cc.inc
│ │ │ │ │ ├── p256-nistz.h
│ │ │ │ │ ├── p256.cc.inc
│ │ │ │ │ ├── p256_table.h
│ │ │ │ │ ├── scalar.cc.inc
│ │ │ │ │ ├── simple.cc.inc
│ │ │ │ │ ├── simple_mul.cc.inc
│ │ │ │ │ ├── util.cc.inc
│ │ │ │ │ └── wnaf.cc.inc
│ │ │ │ ├── ecdh/
│ │ │ │ │ └── ecdh.cc.inc
│ │ │ │ ├── ecdsa/
│ │ │ │ │ ├── ecdsa.cc.inc
│ │ │ │ │ └── internal.h
│ │ │ │ ├── fips_shared_support.cc
│ │ │ │ ├── hkdf/
│ │ │ │ │ └── hkdf.cc.inc
│ │ │ │ ├── hmac/
│ │ │ │ │ └── hmac.cc.inc
│ │ │ │ ├── keccak/
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── keccak.cc.inc
│ │ │ │ ├── mldsa/
│ │ │ │ │ └── mldsa.cc.inc
│ │ │ │ ├── mlkem/
│ │ │ │ │ └── mlkem.cc.inc
│ │ │ │ ├── rand/
│ │ │ │ │ ├── ctrdrbg.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── rand.cc.inc
│ │ │ │ ├── rsa/
│ │ │ │ │ ├── blinding.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── padding.cc.inc
│ │ │ │ │ ├── rsa.cc.inc
│ │ │ │ │ └── rsa_impl.cc.inc
│ │ │ │ ├── self_check/
│ │ │ │ │ ├── fips.cc.inc
│ │ │ │ │ └── self_check.cc.inc
│ │ │ │ ├── service_indicator/
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── service_indicator.cc.inc
│ │ │ │ ├── sha/
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── sha1.cc.inc
│ │ │ │ │ ├── sha256.cc.inc
│ │ │ │ │ └── sha512.cc.inc
│ │ │ │ ├── slhdsa/
│ │ │ │ │ ├── address.h
│ │ │ │ │ ├── fors.cc.inc
│ │ │ │ │ ├── fors.h
│ │ │ │ │ ├── merkle.cc.inc
│ │ │ │ │ ├── merkle.h
│ │ │ │ │ ├── params.h
│ │ │ │ │ ├── slhdsa.cc.inc
│ │ │ │ │ ├── thash.cc.inc
│ │ │ │ │ ├── thash.h
│ │ │ │ │ ├── wots.cc.inc
│ │ │ │ │ └── wots.h
│ │ │ │ └── tls/
│ │ │ │ ├── internal.h
│ │ │ │ └── kdf.cc.inc
│ │ │ ├── hpke/
│ │ │ │ └── hpke.cc
│ │ │ ├── hrss/
│ │ │ │ ├── asm/
│ │ │ │ │ └── poly_rq_mul.S
│ │ │ │ ├── hrss.cc
│ │ │ │ └── internal.h
│ │ │ ├── internal.h
│ │ │ ├── kyber/
│ │ │ │ ├── internal.h
│ │ │ │ └── kyber.cc
│ │ │ ├── lhash/
│ │ │ │ ├── internal.h
│ │ │ │ └── lhash.cc
│ │ │ ├── md4/
│ │ │ │ └── md4.cc
│ │ │ ├── md5/
│ │ │ │ ├── internal.h
│ │ │ │ └── md5.cc
│ │ │ ├── mem.cc
│ │ │ ├── mldsa/
│ │ │ │ └── mldsa.cc
│ │ │ ├── mlkem/
│ │ │ │ └── mlkem.cc
│ │ │ ├── obj/
│ │ │ │ ├── obj.cc
│ │ │ │ ├── obj_dat.h
│ │ │ │ └── obj_xref.cc
│ │ │ ├── pem/
│ │ │ │ ├── internal.h
│ │ │ │ ├── pem_all.cc
│ │ │ │ ├── pem_info.cc
│ │ │ │ ├── pem_lib.cc
│ │ │ │ ├── pem_oth.cc
│ │ │ │ ├── pem_pk8.cc
│ │ │ │ ├── pem_pkey.cc
│ │ │ │ ├── pem_x509.cc
│ │ │ │ └── pem_xaux.cc
│ │ │ ├── pkcs7/
│ │ │ │ ├── internal.h
│ │ │ │ ├── pkcs7.cc
│ │ │ │ └── pkcs7_x509.cc
│ │ │ ├── pkcs8/
│ │ │ │ ├── internal.h
│ │ │ │ ├── p5_pbev2.cc
│ │ │ │ ├── pkcs8.cc
│ │ │ │ └── pkcs8_x509.cc
│ │ │ ├── poly1305/
│ │ │ │ ├── internal.h
│ │ │ │ ├── poly1305.cc
│ │ │ │ ├── poly1305_arm.cc
│ │ │ │ ├── poly1305_arm_asm.S
│ │ │ │ └── poly1305_vec.cc
│ │ │ ├── pool/
│ │ │ │ ├── internal.h
│ │ │ │ └── pool.cc
│ │ │ ├── rand/
│ │ │ │ ├── deterministic.cc
│ │ │ │ ├── fork_detect.cc
│ │ │ │ ├── forkunsafe.cc
│ │ │ │ ├── getentropy.cc
│ │ │ │ ├── getrandom_fillin.h
│ │ │ │ ├── ios.cc
│ │ │ │ ├── passive.cc
│ │ │ │ ├── rand.cc
│ │ │ │ ├── sysrand_internal.h
│ │ │ │ ├── trusty.cc
│ │ │ │ ├── urandom.cc
│ │ │ │ └── windows.cc
│ │ │ ├── rc4/
│ │ │ │ └── rc4.cc
│ │ │ ├── refcount.cc
│ │ │ ├── rsa/
│ │ │ │ ├── internal.h
│ │ │ │ ├── rsa_asn1.cc
│ │ │ │ ├── rsa_crypt.cc
│ │ │ │ ├── rsa_extra.cc
│ │ │ │ └── rsa_print.cc
│ │ │ ├── sha/
│ │ │ │ ├── sha1.cc
│ │ │ │ ├── sha256.cc
│ │ │ │ └── sha512.cc
│ │ │ ├── siphash/
│ │ │ │ └── siphash.cc
│ │ │ ├── slhdsa/
│ │ │ │ └── slhdsa.cc
│ │ │ ├── spake2plus/
│ │ │ │ ├── internal.h
│ │ │ │ └── spake2plus.cc
│ │ │ ├── stack/
│ │ │ │ └── stack.cc
│ │ │ ├── thread.cc
│ │ │ ├── thread_none.cc
│ │ │ ├── thread_pthread.cc
│ │ │ ├── thread_win.cc
│ │ │ ├── trust_token/
│ │ │ │ ├── internal.h
│ │ │ │ ├── pmbtoken.cc
│ │ │ │ ├── trust_token.cc
│ │ │ │ └── voprf.cc
│ │ │ └── x509/
│ │ │ ├── a_digest.cc
│ │ │ ├── a_sign.cc
│ │ │ ├── a_verify.cc
│ │ │ ├── algorithm.cc
│ │ │ ├── asn1_gen.cc
│ │ │ ├── by_dir.cc
│ │ │ ├── by_file.cc
│ │ │ ├── ext_dat.h
│ │ │ ├── i2d_pr.cc
│ │ │ ├── internal.h
│ │ │ ├── name_print.cc
│ │ │ ├── policy.cc
│ │ │ ├── rsa_pss.cc
│ │ │ ├── t_crl.cc
│ │ │ ├── t_req.cc
│ │ │ ├── t_x509.cc
│ │ │ ├── t_x509a.cc
│ │ │ ├── v3_akey.cc
│ │ │ ├── v3_akeya.cc
│ │ │ ├── v3_alt.cc
│ │ │ ├── v3_bcons.cc
│ │ │ ├── v3_bitst.cc
│ │ │ ├── v3_conf.cc
│ │ │ ├── v3_cpols.cc
│ │ │ ├── v3_crld.cc
│ │ │ ├── v3_enum.cc
│ │ │ ├── v3_extku.cc
│ │ │ ├── v3_genn.cc
│ │ │ ├── v3_ia5.cc
│ │ │ ├── v3_info.cc
│ │ │ ├── v3_int.cc
│ │ │ ├── v3_lib.cc
│ │ │ ├── v3_ncons.cc
│ │ │ ├── v3_ocsp.cc
│ │ │ ├── v3_pcons.cc
│ │ │ ├── v3_pmaps.cc
│ │ │ ├── v3_prn.cc
│ │ │ ├── v3_purp.cc
│ │ │ ├── v3_skey.cc
│ │ │ ├── v3_utl.cc
│ │ │ ├── x509.cc
│ │ │ ├── x509_att.cc
│ │ │ ├── x509_cmp.cc
│ │ │ ├── x509_d2.cc
│ │ │ ├── x509_def.cc
│ │ │ ├── x509_ext.cc
│ │ │ ├── x509_lu.cc
│ │ │ ├── x509_obj.cc
│ │ │ ├── x509_req.cc
│ │ │ ├── x509_set.cc
│ │ │ ├── x509_trs.cc
│ │ │ ├── x509_txt.cc
│ │ │ ├── x509_v3.cc
│ │ │ ├── x509_vfy.cc
│ │ │ ├── x509_vpm.cc
│ │ │ ├── x509cset.cc
│ │ │ ├── x509name.cc
│ │ │ ├── x509rset.cc
│ │ │ ├── x509spki.cc
│ │ │ ├── x_algor.cc
│ │ │ ├── x_all.cc
│ │ │ ├── x_attrib.cc
│ │ │ ├── x_crl.cc
│ │ │ ├── x_exten.cc
│ │ │ ├── x_name.cc
│ │ │ ├── x_pubkey.cc
│ │ │ ├── x_req.cc
│ │ │ ├── x_sig.cc
│ │ │ ├── x_spki.cc
│ │ │ ├── x_val.cc
│ │ │ ├── x_x509.cc
│ │ │ └── x_x509a.cc
│ │ ├── gen/
│ │ │ ├── bcm/
│ │ │ │ ├── aes-gcm-avx10-x86_64-apple.S
│ │ │ │ ├── aes-gcm-avx10-x86_64-linux.S
│ │ │ │ ├── aes-gcm-avx2-x86_64-apple.S
│ │ │ │ ├── aes-gcm-avx2-x86_64-linux.S
│ │ │ │ ├── aesni-gcm-x86_64-apple.S
│ │ │ │ ├── aesni-gcm-x86_64-linux.S
│ │ │ │ ├── aesni-x86-apple.S
│ │ │ │ ├── aesni-x86-linux.S
│ │ │ │ ├── aesni-x86_64-apple.S
│ │ │ │ ├── aesni-x86_64-linux.S
│ │ │ │ ├── aesv8-armv7-linux.S
│ │ │ │ ├── aesv8-armv8-apple.S
│ │ │ │ ├── aesv8-armv8-linux.S
│ │ │ │ ├── aesv8-armv8-win.S
│ │ │ │ ├── aesv8-gcm-armv8-apple.S
│ │ │ │ ├── aesv8-gcm-armv8-linux.S
│ │ │ │ ├── aesv8-gcm-armv8-win.S
│ │ │ │ ├── armv4-mont-linux.S
│ │ │ │ ├── armv8-mont-apple.S
│ │ │ │ ├── armv8-mont-linux.S
│ │ │ │ ├── armv8-mont-win.S
│ │ │ │ ├── bn-586-apple.S
│ │ │ │ ├── bn-586-linux.S
│ │ │ │ ├── bn-armv8-apple.S
│ │ │ │ ├── bn-armv8-linux.S
│ │ │ │ ├── bn-armv8-win.S
│ │ │ │ ├── bsaes-armv7-linux.S
│ │ │ │ ├── co-586-apple.S
│ │ │ │ ├── co-586-linux.S
│ │ │ │ ├── ghash-armv4-linux.S
│ │ │ │ ├── ghash-neon-armv8-apple.S
│ │ │ │ ├── ghash-neon-armv8-linux.S
│ │ │ │ ├── ghash-neon-armv8-win.S
│ │ │ │ ├── ghash-ssse3-x86-apple.S
│ │ │ │ ├── ghash-ssse3-x86-linux.S
│ │ │ │ ├── ghash-ssse3-x86_64-apple.S
│ │ │ │ ├── ghash-ssse3-x86_64-linux.S
│ │ │ │ ├── ghash-x86-apple.S
│ │ │ │ ├── ghash-x86-linux.S
│ │ │ │ ├── ghash-x86_64-apple.S
│ │ │ │ ├── ghash-x86_64-linux.S
│ │ │ │ ├── ghashv8-armv7-linux.S
│ │ │ │ ├── ghashv8-armv8-apple.S
│ │ │ │ ├── ghashv8-armv8-linux.S
│ │ │ │ ├── ghashv8-armv8-win.S
│ │ │ │ ├── p256-armv8-asm-apple.S
│ │ │ │ ├── p256-armv8-asm-linux.S
│ │ │ │ ├── p256-armv8-asm-win.S
│ │ │ │ ├── p256-x86_64-asm-apple.S
│ │ │ │ ├── p256-x86_64-asm-linux.S
│ │ │ │ ├── p256_beeu-armv8-asm-apple.S
│ │ │ │ ├── p256_beeu-armv8-asm-linux.S
│ │ │ │ ├── p256_beeu-armv8-asm-win.S
│ │ │ │ ├── p256_beeu-x86_64-asm-apple.S
│ │ │ │ ├── p256_beeu-x86_64-asm-linux.S
│ │ │ │ ├── rdrand-x86_64-apple.S
│ │ │ │ ├── rdrand-x86_64-linux.S
│ │ │ │ ├── rsaz-avx2-apple.S
│ │ │ │ ├── rsaz-avx2-linux.S
│ │ │ │ ├── sha1-586-apple.S
│ │ │ │ ├── sha1-586-linux.S
│ │ │ │ ├── sha1-armv4-large-linux.S
│ │ │ │ ├── sha1-armv8-apple.S
│ │ │ │ ├── sha1-armv8-linux.S
│ │ │ │ ├── sha1-armv8-win.S
│ │ │ │ ├── sha1-x86_64-apple.S
│ │ │ │ ├── sha1-x86_64-linux.S
│ │ │ │ ├── sha256-586-apple.S
│ │ │ │ ├── sha256-586-linux.S
│ │ │ │ ├── sha256-armv4-linux.S
│ │ │ │ ├── sha256-armv8-apple.S
│ │ │ │ ├── sha256-armv8-linux.S
│ │ │ │ ├── sha256-armv8-win.S
│ │ │ │ ├── sha256-x86_64-apple.S
│ │ │ │ ├── sha256-x86_64-linux.S
│ │ │ │ ├── sha512-586-apple.S
│ │ │ │ ├── sha512-586-linux.S
│ │ │ │ ├── sha512-armv4-linux.S
│ │ │ │ ├── sha512-armv8-apple.S
│ │ │ │ ├── sha512-armv8-linux.S
│ │ │ │ ├── sha512-armv8-win.S
│ │ │ │ ├── sha512-x86_64-apple.S
│ │ │ │ ├── sha512-x86_64-linux.S
│ │ │ │ ├── vpaes-armv7-linux.S
│ │ │ │ ├── vpaes-armv8-apple.S
│ │ │ │ ├── vpaes-armv8-linux.S
│ │ │ │ ├── vpaes-armv8-win.S
│ │ │ │ ├── vpaes-x86-apple.S
│ │ │ │ ├── vpaes-x86-linux.S
│ │ │ │ ├── vpaes-x86_64-apple.S
│ │ │ │ ├── vpaes-x86_64-linux.S
│ │ │ │ ├── x86-mont-apple.S
│ │ │ │ ├── x86-mont-linux.S
│ │ │ │ ├── x86_64-mont-apple.S
│ │ │ │ ├── x86_64-mont-linux.S
│ │ │ │ ├── x86_64-mont5-apple.S
│ │ │ │ └── x86_64-mont5-linux.S
│ │ │ └── crypto/
│ │ │ ├── aes128gcmsiv-x86_64-apple.S
│ │ │ ├── aes128gcmsiv-x86_64-linux.S
│ │ │ ├── chacha-armv4-linux.S
│ │ │ ├── chacha-armv8-apple.S
│ │ │ ├── chacha-armv8-linux.S
│ │ │ ├── chacha-armv8-win.S
│ │ │ ├── chacha-x86-apple.S
│ │ │ ├── chacha-x86-linux.S
│ │ │ ├── chacha-x86_64-apple.S
│ │ │ ├── chacha-x86_64-linux.S
│ │ │ ├── chacha20_poly1305_armv8-apple.S
│ │ │ ├── chacha20_poly1305_armv8-linux.S
│ │ │ ├── chacha20_poly1305_armv8-win.S
│ │ │ ├── chacha20_poly1305_x86_64-apple.S
│ │ │ ├── chacha20_poly1305_x86_64-linux.S
│ │ │ ├── err_data.cc
│ │ │ ├── md5-586-apple.S
│ │ │ ├── md5-586-linux.S
│ │ │ ├── md5-x86_64-apple.S
│ │ │ └── md5-x86_64-linux.S
│ │ ├── hash.txt
│ │ ├── include/
│ │ │ ├── CNIOBoringSSL.h
│ │ │ ├── CNIOBoringSSL_aead.h
│ │ │ ├── CNIOBoringSSL_aes.h
│ │ │ ├── CNIOBoringSSL_arm_arch.h
│ │ │ ├── CNIOBoringSSL_asm_base.h
│ │ │ ├── CNIOBoringSSL_asn1.h
│ │ │ ├── CNIOBoringSSL_asn1_mac.h
│ │ │ ├── CNIOBoringSSL_asn1t.h
│ │ │ ├── CNIOBoringSSL_base.h
│ │ │ ├── CNIOBoringSSL_base64.h
│ │ │ ├── CNIOBoringSSL_bcm_public.h
│ │ │ ├── CNIOBoringSSL_bio.h
│ │ │ ├── CNIOBoringSSL_blake2.h
│ │ │ ├── CNIOBoringSSL_blowfish.h
│ │ │ ├── CNIOBoringSSL_bn.h
│ │ │ ├── CNIOBoringSSL_boringssl_prefix_symbols.h
│ │ │ ├── CNIOBoringSSL_boringssl_prefix_symbols_asm.h
│ │ │ ├── CNIOBoringSSL_buf.h
│ │ │ ├── CNIOBoringSSL_buffer.h
│ │ │ ├── CNIOBoringSSL_bytestring.h
│ │ │ ├── CNIOBoringSSL_cast.h
│ │ │ ├── CNIOBoringSSL_chacha.h
│ │ │ ├── CNIOBoringSSL_cipher.h
│ │ │ ├── CNIOBoringSSL_cmac.h
│ │ │ ├── CNIOBoringSSL_conf.h
│ │ │ ├── CNIOBoringSSL_cpu.h
│ │ │ ├── CNIOBoringSSL_crypto.h
│ │ │ ├── CNIOBoringSSL_ctrdrbg.h
│ │ │ ├── CNIOBoringSSL_curve25519.h
│ │ │ ├── CNIOBoringSSL_des.h
│ │ │ ├── CNIOBoringSSL_dh.h
│ │ │ ├── CNIOBoringSSL_digest.h
│ │ │ ├── CNIOBoringSSL_dsa.h
│ │ │ ├── CNIOBoringSSL_dtls1.h
│ │ │ ├── CNIOBoringSSL_e_os2.h
│ │ │ ├── CNIOBoringSSL_ec.h
│ │ │ ├── CNIOBoringSSL_ec_key.h
│ │ │ ├── CNIOBoringSSL_ecdh.h
│ │ │ ├── CNIOBoringSSL_ecdsa.h
│ │ │ ├── CNIOBoringSSL_engine.h
│ │ │ ├── CNIOBoringSSL_err.h
│ │ │ ├── CNIOBoringSSL_evp.h
│ │ │ ├── CNIOBoringSSL_evp_errors.h
│ │ │ ├── CNIOBoringSSL_ex_data.h
│ │ │ ├── CNIOBoringSSL_hkdf.h
│ │ │ ├── CNIOBoringSSL_hmac.h
│ │ │ ├── CNIOBoringSSL_hpke.h
│ │ │ ├── CNIOBoringSSL_hrss.h
│ │ │ ├── CNIOBoringSSL_is_boringssl.h
│ │ │ ├── CNIOBoringSSL_kdf.h
│ │ │ ├── CNIOBoringSSL_lhash.h
│ │ │ ├── CNIOBoringSSL_md4.h
│ │ │ ├── CNIOBoringSSL_md5.h
│ │ │ ├── CNIOBoringSSL_mem.h
│ │ │ ├── CNIOBoringSSL_mldsa.h
│ │ │ ├── CNIOBoringSSL_mlkem.h
│ │ │ ├── CNIOBoringSSL_nid.h
│ │ │ ├── CNIOBoringSSL_obj.h
│ │ │ ├── CNIOBoringSSL_obj_mac.h
│ │ │ ├── CNIOBoringSSL_objects.h
│ │ │ ├── CNIOBoringSSL_opensslconf.h
│ │ │ ├── CNIOBoringSSL_opensslv.h
│ │ │ ├── CNIOBoringSSL_ossl_typ.h
│ │ │ ├── CNIOBoringSSL_pem.h
│ │ │ ├── CNIOBoringSSL_pkcs12.h
│ │ │ ├── CNIOBoringSSL_pkcs7.h
│ │ │ ├── CNIOBoringSSL_pkcs8.h
│ │ │ ├── CNIOBoringSSL_poly1305.h
│ │ │ ├── CNIOBoringSSL_pool.h
│ │ │ ├── CNIOBoringSSL_posix_time.h
│ │ │ ├── CNIOBoringSSL_rand.h
│ │ │ ├── CNIOBoringSSL_rc4.h
│ │ │ ├── CNIOBoringSSL_ripemd.h
│ │ │ ├── CNIOBoringSSL_rsa.h
│ │ │ ├── CNIOBoringSSL_safestack.h
│ │ │ ├── CNIOBoringSSL_service_indicator.h
│ │ │ ├── CNIOBoringSSL_sha.h
│ │ │ ├── CNIOBoringSSL_siphash.h
│ │ │ ├── CNIOBoringSSL_slhdsa.h
│ │ │ ├── CNIOBoringSSL_span.h
│ │ │ ├── CNIOBoringSSL_srtp.h
│ │ │ ├── CNIOBoringSSL_ssl.h
│ │ │ ├── CNIOBoringSSL_ssl3.h
│ │ │ ├── CNIOBoringSSL_stack.h
│ │ │ ├── CNIOBoringSSL_target.h
│ │ │ ├── CNIOBoringSSL_thread.h
│ │ │ ├── CNIOBoringSSL_time.h
│ │ │ ├── CNIOBoringSSL_tls1.h
│ │ │ ├── CNIOBoringSSL_trust_token.h
│ │ │ ├── CNIOBoringSSL_type_check.h
│ │ │ ├── CNIOBoringSSL_x509.h
│ │ │ ├── CNIOBoringSSL_x509_vfy.h
│ │ │ ├── CNIOBoringSSL_x509v3.h
│ │ │ ├── CNIOBoringSSL_x509v3_errors.h
│ │ │ ├── boringssl_prefix_symbols_nasm.inc
│ │ │ ├── experimental/
│ │ │ │ └── CNIOBoringSSL_kyber.h
│ │ │ └── module.modulemap
│ │ ├── ssl/
│ │ │ ├── bio_ssl.cc
│ │ │ ├── d1_both.cc
│ │ │ ├── d1_lib.cc
│ │ │ ├── d1_pkt.cc
│ │ │ ├── d1_srtp.cc
│ │ │ ├── dtls_method.cc
│ │ │ ├── dtls_record.cc
│ │ │ ├── encrypted_client_hello.cc
│ │ │ ├── extensions.cc
│ │ │ ├── handoff.cc
│ │ │ ├── handshake.cc
│ │ │ ├── handshake_client.cc
│ │ │ ├── handshake_server.cc
│ │ │ ├── internal.h
│ │ │ ├── s3_both.cc
│ │ │ ├── s3_lib.cc
│ │ │ ├── s3_pkt.cc
│ │ │ ├── ssl_aead_ctx.cc
│ │ │ ├── ssl_asn1.cc
│ │ │ ├── ssl_buffer.cc
│ │ │ ├── ssl_cert.cc
│ │ │ ├── ssl_cipher.cc
│ │ │ ├── ssl_credential.cc
│ │ │ ├── ssl_file.cc
│ │ │ ├── ssl_key_share.cc
│ │ │ ├── ssl_lib.cc
│ │ │ ├── ssl_privkey.cc
│ │ │ ├── ssl_session.cc
│ │ │ ├── ssl_stat.cc
│ │ │ ├── ssl_transcript.cc
│ │ │ ├── ssl_versions.cc
│ │ │ ├── ssl_x509.cc
│ │ │ ├── t1_enc.cc
│ │ │ ├── tls13_both.cc
│ │ │ ├── tls13_client.cc
│ │ │ ├── tls13_enc.cc
│ │ │ ├── tls13_server.cc
│ │ │ ├── tls_method.cc
│ │ │ └── tls_record.cc
│ │ └── third_party/
│ │ └── fiat/
│ │ ├── asm/
│ │ │ ├── fiat_curve25519_adx_mul.S
│ │ │ ├── fiat_curve25519_adx_square.S
│ │ │ ├── fiat_p256_adx_mul.S
│ │ │ └── fiat_p256_adx_sqr.S
│ │ ├── curve25519_32.h
│ │ ├── curve25519_64.h
│ │ ├── curve25519_64_adx.h
│ │ ├── curve25519_64_msvc.h
│ │ ├── p256_32.h
│ │ ├── p256_64.h
│ │ └── p256_64_msvc.h
│ ├── CNIOBoringSSLShims/
│ │ ├── include/
│ │ │ └── CNIOBoringSSLShims.h
│ │ └── shims.c
│ ├── NIOSSL/
│ │ ├── AndroidCABundle.swift
│ │ ├── ByteBufferBIO.swift
│ │ ├── CustomPrivateKey.swift
│ │ ├── Docs.docc/
│ │ │ ├── TLSConfiguration.md
│ │ │ ├── index.md
│ │ │ ├── quantum-secure-tls.md
│ │ │ └── trust-roots-behavior.md
│ │ ├── IdentityVerification.swift
│ │ ├── LinuxCABundle.swift
│ │ ├── NIOSSLClientHandler.swift
│ │ ├── NIOSSLHandler+Configuration.swift
│ │ ├── NIOSSLHandler.swift
│ │ ├── NIOSSLServerHandler.swift
│ │ ├── ObjectIdentifier.swift
│ │ ├── PosixPort.swift
│ │ ├── PrivacyInfo.xcprivacy
│ │ ├── SSLCallbacks.swift
│ │ ├── SSLCertificate.swift
│ │ ├── SSLCertificateExtensions.swift
│ │ ├── SSLCertificateName.swift
│ │ ├── SSLConnection.swift
│ │ ├── SSLContext.swift
│ │ ├── SSLErrors.swift
│ │ ├── SSLInit.swift
│ │ ├── SSLPKCS12Bundle.swift
│ │ ├── SSLPrivateKey.swift
│ │ ├── SSLPublicKey.swift
│ │ ├── SecurityFrameworkCertificateVerification.swift
│ │ ├── String+unsafeUninitializedCapacity.swift
│ │ ├── SubjectAlternativeName.swift
│ │ ├── SwiftCrypto/
│ │ │ ├── NIOSSLSecureBytes.swift
│ │ │ ├── RNG.swift
│ │ │ ├── SafeCompare.swift
│ │ │ └── Zeroization.swift
│ │ ├── TLSConfiguration.swift
│ │ ├── UniversalBootstrapSupport.swift
│ │ └── UnsafeKeyAndChainTarget.swift
│ ├── NIOSSLHTTP1Client/
│ │ ├── README.md
│ │ └── main.swift
│ ├── NIOSSLPerformanceTester/
│ │ ├── BenchManyWrites.swift
│ │ ├── BenchRepeatedHandshakes.swift
│ │ ├── Benchmark.swift
│ │ ├── main.swift
│ │ └── shared.swift
│ └── NIOTLSServer/
│ ├── README.md
│ └── main.swift
├── Tests/
│ └── NIOSSLTests/
│ ├── ByteBufferBIOTest.swift
│ ├── CertificateVerificationTests.swift
│ ├── ClientSNITests.swift
│ ├── CustomPrivateKeyTests.swift
│ ├── IdentityVerificationTest.swift
│ ├── NIOSSLALPNTest.swift
│ ├── NIOSSLIntegrationTest.swift
│ ├── NIOSSLSecureBytesTests.swift
│ ├── NIOSSLTestHelpers.swift
│ ├── ObjectIdentifierTests.swift
│ ├── SSLCertificateExtensionsTests.swift
│ ├── SSLCertificateTest.swift
│ ├── SSLContextTests.swift
│ ├── SSLPKCS12BundleTest.swift
│ ├── SSLPrivateKeyTests.swift
│ ├── SecurityFrameworkVerificationTests.swift
│ ├── TLS13RecordObserver.swift
│ ├── TLSConfigurationTest.swift
│ ├── UnsafeTransfer.swift
│ └── UnwrappingTests.swift
├── dev/
│ └── git.commit.template
├── docker/
│ ├── Dockerfile
│ ├── docker-compose.2204.510.yaml
│ ├── docker-compose.2204.58.yaml
│ ├── docker-compose.2204.59.yaml
│ ├── docker-compose.2204.main.yaml
│ └── docker-compose.yaml
└── scripts/
├── analyze_performance_results.rb
├── build-asm.py
├── integration_tests.sh
├── patch-1-inttypes.patch
├── patch-2-inttypes.patch
├── patch-3-more-inttypes.patch
└── vendor-boringssl.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
================================================
FILE: .gitattributes
================================================
Sources/CNIOBoringSSL/* linguist-vendored
================================================
FILE: .github/release.yml
================================================
changelog:
categories:
- title: SemVer Major
labels:
- ⚠️ semver/major
- title: SemVer Minor
labels:
- 🆕 semver/minor
- title: SemVer Patch
labels:
- 🔨 semver/patch
- title: Other Changes
labels:
- semver/none
================================================
FILE: .github/workflows/main.yml
================================================
name: Main
permissions:
contents: read
on:
push:
branches: [main]
schedule:
- cron: "0 8,20 * * *"
jobs:
unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_3_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
construct-integration-test-matrix:
name: Construct integration matrix
runs-on: ubuntu-latest
outputs:
integration-test-matrix: '${{ steps.generate-matrix.outputs.integration-test-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- id: generate-matrix
run: echo "integration-test-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
env:
MATRIX_LINUX_SETUP_COMMAND: apt-get update -y && apt-get install -yq execstack lsof dnsutils netcat-openbsd net-tools expect curl jq
MATRIX_LINUX_COMMAND: ./scripts/integration_tests.sh -f test_01_renegotiation
integration-test:
name: Integration test
needs: construct-integration-test-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Integration test"
matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}'
benchmarks:
name: Benchmarks
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
with:
benchmark_package_path: "Benchmarks"
macos-tests:
name: macOS tests
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
with:
runner_pool: nightly
build_scheme: swift-nio-ssl-Package
xcode_16_2_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
xcode_16_3_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
static-sdk:
name: Static SDK
uses: apple/swift-nio/.github/workflows/static_sdk.yml@main
release-builds:
name: Release builds
uses: apple/swift-nio/.github/workflows/release_builds.yml@main
================================================
FILE: .github/workflows/pull_request.yml
================================================
name: PR
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.7
with:
license_header_check_project_name: "SwiftNIO"
unit-tests:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
# We can't set warnings-as-errors for 6.1 because we can't suppress the ImplementationOnly import warning.
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -Wwarning -Xswiftc ImplementationOnlyDeprecated --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_3_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -Wwarning -Xswiftc ImplementationOnlyDeprecated --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_next_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -Wwarning -Xswiftc ImplementationOnlyDeprecated --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_main_arguments_override: "-Xswiftc -warnings-as-errors -Xswiftc -Wwarning -Xswiftc ImplementationOnlyDeprecated --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
construct-integration-test-matrix:
name: Construct integration matrix
runs-on: ubuntu-latest
outputs:
integration-test-matrix: '${{ steps.generate-matrix.outputs.integration-test-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- id: generate-matrix
run: echo "integration-test-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
env:
MATRIX_LINUX_SETUP_COMMAND: apt-get update -y && apt-get install -yq execstack lsof dnsutils netcat-openbsd net-tools expect curl jq
MATRIX_LINUX_COMMAND: ./scripts/integration_tests.sh -f test_01_renegotiation
integration-test:
name: Integration test
needs: construct-integration-test-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Integration test"
matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}'
benchmarks:
name: Benchmarks
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
with:
benchmark_package_path: "Benchmarks"
cxx-interop:
name: Cxx interop
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
macos-tests:
name: macOS tests
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
with:
runner_pool: general
build_scheme: swift-nio-ssl-Package
xcode_16_2_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
xcode_16_3_build_arguments_override: "-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable"
static-sdk:
name: Static SDK
uses: apple/swift-nio/.github/workflows/static_sdk.yml@main
release-builds:
name: Release builds
uses: apple/swift-nio/.github/workflows/release_builds.yml@main
================================================
FILE: .github/workflows/pull_request_label.yml
================================================
name: PR label
permissions:
contents: read
on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]
jobs:
semver-label-check:
name: Semantic version label check
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Check for Semantic Version label
uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main
================================================
FILE: .gitignore
================================================
.DS_Store
/.build
/Packages
/*.xcodeproj
Package.pins
Package.resolved
*.pem
/docs
DerivedData
/.idea
.swiftpm
================================================
FILE: .licenseignore
================================================
.gitignore
**/.gitignore
.licenseignore
.gitattributes
.git-blame-ignore-revs
.mailfilter
.mailmap
.spi.yml
.swift-format
.editorconfig
.github/*
*.md
*.txt
*.yml
*.yaml
*.json
Package.swift
**/Package.swift
Package@-*.swift
**/Package@-*.swift
Package.resolved
**/Package.resolved
Makefile
*.modulemap
**/*.modulemap
**/*.docc/*
*.xcprivacy
**/*.xcprivacy
*.symlink
**/*.symlink
Dockerfile
**/Dockerfile
Snippets/*
Sources/CNIOBoringSSL/*
dev/alloc-limits-from-test-output
dev/boxed-existentials.d
dev/git.commit.template
dev/lldb-smoker
dev/make-single-file-spm
dev/malloc-aggregation.d
dev/update-alloc-limits-to-last-completed-ci-build
scripts/patch-1-inttypes.patch
scripts/patch-2-inttypes.patch
scripts/patch-3-more-inttypes.patch
.unacceptablelanguageignore
================================================
FILE: .spi.yml
================================================
version: 1
builder:
configs:
- documentation_targets: [NIOSSL]
================================================
FILE: .swift-format
================================================
{
"version" : 1,
"indentation" : {
"spaces" : 4
},
"tabWidth" : 4,
"fileScopedDeclarationPrivacy" : {
"accessLevel" : "private"
},
"spacesAroundRangeFormationOperators" : false,
"indentConditionalCompilationBlocks" : false,
"indentSwitchCaseLabels" : false,
"lineBreakAroundMultilineExpressionChainComponents" : false,
"lineBreakBeforeControlFlowKeywords" : false,
"lineBreakBeforeEachArgument" : true,
"lineBreakBeforeEachGenericRequirement" : true,
"lineLength" : 120,
"maximumBlankLines" : 1,
"respectsExistingLineBreaks" : true,
"prioritizeKeepingFunctionOutputTogether" : true,
"rules" : {
"AllPublicDeclarationsHaveDocumentation" : false,
"AlwaysUseLiteralForEmptyCollectionInit" : false,
"AlwaysUseLowerCamelCase" : false,
"AmbiguousTrailingClosureOverload" : true,
"BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true,
"FileScopedDeclarationPrivacy" : true,
"FullyIndirectEnum" : true,
"GroupNumericLiterals" : true,
"IdentifiersMustBeASCII" : true,
"NeverForceUnwrap" : false,
"NeverUseForceTry" : false,
"NeverUseImplicitlyUnwrappedOptionals" : false,
"NoAccessLevelOnExtensionDeclaration" : true,
"NoAssignmentInExpressions" : true,
"NoBlockComments" : true,
"NoCasesWithOnlyFallthrough" : true,
"NoEmptyTrailingClosureParentheses" : true,
"NoLabelsInCasePatterns" : true,
"NoLeadingUnderscores" : false,
"NoParensAroundConditions" : true,
"NoVoidReturnOnFunctionSignature" : true,
"OmitExplicitReturns" : true,
"OneCasePerLine" : true,
"OneVariableDeclarationPerLine" : true,
"OnlyOneTrailingClosureArgument" : true,
"OrderedImports" : true,
"ReplaceForEachWithForLoop" : true,
"ReturnVoidInsteadOfEmptyTuple" : true,
"UseEarlyExits" : false,
"UseExplicitNilCheckInConditions" : false,
"UseLetInEveryBoundCaseVariable" : false,
"UseShorthandTypeNames" : true,
"UseSingleLinePropertyGetter" : false,
"UseSynthesizedInitializer" : false,
"UseTripleSlashForDocumentationComments" : true,
"UseWhereClausesInForLoops" : false,
"ValidateDocumentationComments" : false
}
}
================================================
FILE: .unacceptablelanguageignore
================================================
Sources/CNIOBoringSSL/*
NOTICE.txt
================================================
FILE: Benchmarks/Benchmarks/NIOSSLBenchmarks/Benchmarks.swift
================================================
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2024 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import Benchmark
import NIOCore
import NIOEmbedded
import NIOSSL
let benchmarks: @Sendable () -> Void = {
let defaultMetrics: [BenchmarkMetric] = [
.mallocCountTotal
]
Benchmark(
"SimpleHandshake",
configuration: .init(
metrics: defaultMetrics,
scalingFactor: .kilo,
maxDuration: .seconds(10_000_000),
maxIterations: 10,
thresholds: [.mallocCountTotal: .init(absolute: [.p90: 50])]
)
) { benchmark in
try runSimpleHandshake(
handshakeCount: benchmark.scaledIterations.upperBound
)
}
Benchmark(
"ManyWrites",
configuration: .init(
metrics: defaultMetrics,
scalingFactor: .kilo,
maxDuration: .seconds(10_000_000),
maxIterations: 10,
thresholds: [.mallocCountTotal: .init(absolute: [.p90: 50])]
)
) { benchmark in
try runManyWrites(
writeCount: benchmark.scaledIterations.upperBound
)
}
}
================================================
FILE: Benchmarks/Benchmarks/NIOSSLBenchmarks/ManyWrites.swift
================================================
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIOEmbedded
import NIOSSL
func runManyWrites(writeCount: Int) throws {
let serverContext = try NIOSSLContext(
configuration: .makeServerConfiguration(
certificateChain: [.certificate(.forTesting())],
privateKey: .privateKey(.forTesting())
)
)
var clientConfig = TLSConfiguration.makeClientConfiguration()
clientConfig.trustRoots = try .certificates([.forTesting()])
let clientContext = try NIOSSLContext(configuration: clientConfig)
let dummyAddress = try SocketAddress(ipAddress: "1.2.3.4", port: 5678)
let backToBack = BackToBackEmbeddedChannel()
let serverHandler = NIOSSLServerHandler(context: serverContext)
let clientHandler = try NIOSSLClientHandler(context: clientContext, serverHostname: "localhost")
try backToBack.client.pipeline.addHandler(clientHandler).wait()
try backToBack.server.pipeline.addHandler(serverHandler).wait()
// To trigger activation of both channels we use connect().
try backToBack.client.connect(to: dummyAddress).wait()
try backToBack.server.connect(to: dummyAddress).wait()
try backToBack.interactInMemory()
// Let's try 512 bytes.
var buffer = backToBack.client.allocator.buffer(capacity: 512)
buffer.writeBytes(repeatElement(0, count: 512))
for _ in 0..<writeCount {
// A vector of 100 writes.
for _ in 0..<100 {
backToBack.client.write(buffer, promise: nil)
}
backToBack.client.flush()
try backToBack.interactInMemory()
// Pull any data out of the server to avoid ballooning in memory.
while let _ = try backToBack.server.readInbound(as: ByteBuffer.self) {}
}
}
================================================
FILE: Benchmarks/Benchmarks/NIOSSLBenchmarks/Shared.swift
================================================
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import Foundation
import NIOCore
import NIOEmbedded
import NIOSSL
class BackToBackEmbeddedChannel {
private(set) var client: EmbeddedChannel
private(set) var server: EmbeddedChannel
private var loop: EmbeddedEventLoop
init() {
self.loop = EmbeddedEventLoop()
self.client = EmbeddedChannel(loop: self.loop)
self.server = EmbeddedChannel(loop: self.loop)
}
func run() {
self.loop.run()
}
func interactInMemory() throws {
var workToDo = true
while workToDo {
workToDo = false
self.loop.run()
let clientDatum = try self.client.readOutbound(as: IOData.self)
let serverDatum = try self.server.readOutbound(as: IOData.self)
if let clientMsg = clientDatum {
try self.server.writeInbound(clientMsg)
workToDo = true
}
if let serverMsg = serverDatum {
try self.client.writeInbound(serverMsg)
workToDo = true
}
}
}
}
extension BackToBackEmbeddedChannel {
enum Error: Swift.Error {
case nonCleanExit
}
}
extension NIOSSLCertificate {
static func forTesting() throws -> NIOSSLCertificate {
try .init(bytes: certificatePemBytes, format: .pem)
}
}
extension NIOSSLPrivateKey {
static func forTesting() throws -> NIOSSLPrivateKey {
try .init(bytes: keyPemBytes, format: .pem)
}
}
private let certificatePemBytes = Array(
"""
-----BEGIN CERTIFICATE-----
MIIBTzCB9qADAgECAhQkvv72Je/v+B/cgJ53f84O82z6WTAKBggqhkjOPQQDAjAU
MRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcNMTkxMTI3MTAxMjMwWhcNMjkxMTI0MTAx
MjMwWjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwWTATBgcqhkjOPQIBBggqhkjOPQMB
BwNCAAShtZ9TRt7I+7Y0o99XUkrgSYmUmpr4K8CB0IkTCX6b1tXp3Xqs1V5BckTd
qrls+zsm3AfeiNBb9EDdxiX9DdzuoyYwJDAUBgNVHREEDTALgglsb2NhbGhvc3Qw
DAYDVR0TAQH/BAIwADAKBggqhkjOPQQDAgNIADBFAiAKxYON+YTnIHNR0R6SLP8R
R7hjsjV5NDs18XLoeRnA1gIhANwyggmE6NQW/r9l59fexj/ZrjaS3jYOTNCfC1Lo
5NgJ
-----END CERTIFICATE-----
""".utf8
)
private let keyPemBytes = Array(
"""
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgCn182hBmYVMAiNPO
+7w05F40SlAqqxgBEYJZOeK47aihRANCAAShtZ9TRt7I+7Y0o99XUkrgSYmUmpr4
K8CB0IkTCX6b1tXp3Xqs1V5BckTdqrls+zsm3AfeiNBb9EDdxiX9Ddzu
-----END PRIVATE KEY-----
""".utf8
)
================================================
FILE: Benchmarks/Benchmarks/NIOSSLBenchmarks/SimpleHandshake.swift
================================================
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIOEmbedded
import NIOSSL
func runSimpleHandshake(handshakeCount: Int) throws {
let serverContext = try NIOSSLContext(
configuration: .makeServerConfiguration(
certificateChain: [.certificate(.forTesting())],
privateKey: .privateKey(.forTesting())
)
)
var clientConfig = TLSConfiguration.makeClientConfiguration()
clientConfig.trustRoots = try .certificates([.forTesting()])
let clientContext = try NIOSSLContext(configuration: clientConfig)
let dummyAddress = try SocketAddress(ipAddress: "1.2.3.4", port: 5678)
for _ in 0..<handshakeCount {
let backToBack = BackToBackEmbeddedChannel()
let serverHandler = NIOSSLServerHandler(context: serverContext)
let clientHandler = try NIOSSLClientHandler(context: clientContext, serverHostname: "localhost")
try backToBack.client.pipeline.addHandler(clientHandler).wait()
try backToBack.server.pipeline.addHandler(serverHandler).wait()
// To trigger activation of both channels we use connect().
try backToBack.client.connect(to: dummyAddress).wait()
try backToBack.server.connect(to: dummyAddress).wait()
try backToBack.interactInMemory()
// Ok, now do shutdown.
backToBack.client.close(promise: nil)
try backToBack.interactInMemory()
try backToBack.client.closeFuture.wait()
try backToBack.server.closeFuture.wait()
}
}
================================================
FILE: Benchmarks/Package.swift
================================================
// swift-tools-version:6.1
import PackageDescription
let package = Package(
name: "benchmarks",
platforms: [
.macOS("14")
],
dependencies: [
.package(path: "../"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.54.0"),
.package(url: "https://github.com/ordo-one/package-benchmark.git", from: "1.22.0"),
],
targets: [
.executableTarget(
name: "NIOSSLBenchmarks",
dependencies: [
.product(name: "Benchmark", package: "package-benchmark"),
.product(name: "NIOSSL", package: "swift-nio-ssl"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOEmbedded", package: "swift-nio"),
],
path: "Benchmarks/NIOSSLBenchmarks",
plugins: [
.plugin(name: "BenchmarkPlugin", package: "package-benchmark")
]
)
]
)
================================================
FILE: Benchmarks/Thresholds/6.1/NIOSSLBenchmarks.ManyWrites.p90.json
================================================
{
"mallocCountTotal": 201941
}
================================================
FILE: Benchmarks/Thresholds/6.1/NIOSSLBenchmarks.SimpleHandshake.p90.json
================================================
{
"mallocCountTotal": 631864
}
================================================
FILE: Benchmarks/Thresholds/6.2/NIOSSLBenchmarks.ManyWrites.p90.json
================================================
{
"mallocCountTotal": 201942
}
================================================
FILE: Benchmarks/Thresholds/6.2/NIOSSLBenchmarks.SimpleHandshake.p90.json
================================================
{
"mallocCountTotal": 632870
}
================================================
FILE: Benchmarks/Thresholds/6.3/NIOSSLBenchmarks.ManyWrites.p90.json
================================================
{
"mallocCountTotal": 201942
}
================================================
FILE: Benchmarks/Thresholds/6.3/NIOSSLBenchmarks.SimpleHandshake.p90.json
================================================
{
"mallocCountTotal": 631892
}
================================================
FILE: Benchmarks/Thresholds/nightly-main/NIOSSLBenchmarks.ManyWrites.p90.json
================================================
{
"mallocCountTotal": 201942
}
================================================
FILE: Benchmarks/Thresholds/nightly-main/NIOSSLBenchmarks.SimpleHandshake.p90.json
================================================
{
"mallocCountTotal": 631873
}
================================================
FILE: Benchmarks/Thresholds/nightly-next/NIOSSLBenchmarks.ManyWrites.p90.json
================================================
{
"mallocCountTotal": 201942
}
================================================
FILE: Benchmarks/Thresholds/nightly-next/NIOSSLBenchmarks.SimpleHandshake.p90.json
================================================
{
"mallocCountTotal": 631864
}
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct
The code of conduct for this project can be found at https://swift.org/code-of-conduct.
<!-- Copyright (c) 2023 Apple Inc and the Swift Project authors. All Rights Reserved. -->
================================================
FILE: CONTRIBUTING.md
================================================
## Legal
By submitting a pull request, you represent that you have the right to license
your contribution to Apple and the community, and agree by submitting the patch
that your contributions are licensed under the Apache 2.0 license (see
`LICENSE.txt`).
## How to submit a bug report
Please ensure to specify the following:
* SwiftNIO commit hash
* Contextual information (e.g. what you were trying to achieve with SwiftNIO)
* Simplest possible steps to reproduce
* More complex the steps are, lower the priority will be.
* A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description.
* Anything that might be relevant in your opinion, such as:
* Swift version or the output of `swift --version`
* OS version and the output of `uname -a`
* Network configuration
### Example
```
SwiftNIO commit hash: 22ec043dc9d24bb011b47ece4f9ee97ee5be2757
Context:
While load testing my HTTP web server written with SwiftNIO, I noticed
that one file descriptor is leaked per request.
Steps to reproduce:
1. ...
2. ...
3. ...
4. ...
$ swift --version
Swift version 4.0.2 (swift-4.0.2-RELEASE)
Target: x86_64-unknown-linux-gnu
Operating system: Ubuntu Linux 16.04 64-bit
$ uname -a
Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
My system has IPv6 disabled.
```
## Writing a Patch
A good SwiftNIO patch is:
1. Concise, and contains as few changes as needed to achieve the end result.
2. Tested, ensuring that any tests provided failed before the patch and pass after it.
3. Documented, adding API documentation as needed to cover new functions and properties.
4. Accompanied by a great commit message, using our commit message template.
### Commit Message Template
We require that your commit messages match our template. The easiest way to do that is to get git to help you by explicitly using the template. To do that, `cd` to the root of our repository and run:
git config commit.template dev/git.commit.template
### Run CI checks locally
You can run the Github Actions workflows locally using [act](https://github.com/nektos/act). For detailed steps on how to do this please see [https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally](https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally).
## How to contribute your work
Please open a pull request at https://github.com/apple/swift-nio. Make sure the CI passes, and then wait for code review.
================================================
FILE: CONTRIBUTORS.txt
================================================
For the purpose of tracking copyright, this is the list of individuals and
organizations who have contributed source code to SwiftNIO.
For employees of an organization/company where the copyright of work done
by employees of that company is held by the company itself, only the company
needs to be listed here.
## COPYRIGHT HOLDERS
- Apple Inc. (all contributors with '@apple.com')
### Contributors
- Cory Benfield <cbenfield@apple.com>
- Johannes Weiß <johannesweiss@apple.com>
- Norman Maurer <norman_maurer@apple.com>
- Tom Doron <tomerd@apple.com>
================================================
FILE: IntegrationTests/plugin_echo.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
function plugin_echo_test_suite_begin() {
echo "Running test suite '$1'"
}
function plugin_echo_test_suite_end() {
true
}
# test_name
function plugin_echo_test_begin() {
echo -n "Running test '$1'... "
}
function plugin_echo_test_skip() {
echo "Skipping test '$1'"
}
function plugin_echo_test_ok() {
echo "OK (${1}s)"
}
function plugin_echo_test_fail() {
echo "FAILURE ($1)"
echo "--- OUTPUT BEGIN ---"
cat "$2"
echo "--- OUTPUT END ---"
}
function plugin_echo_test_end() {
true
}
function plugin_echo_summary_ok() {
echo "OK (ran $1 tests successfully)"
}
function plugin_echo_summary_fail() {
echo "FAILURE (oks: $1, failures: $2)"
}
function plugin_echo_init() {
true
}
================================================
FILE: IntegrationTests/plugin_junit_xml.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
junit_testsuite_time=0
function junit_output_write() {
extra_flags=""
if [[ "$1" == "-n" ]]; then
extra_flags="-n"
shift
fi
test -n "$junit_xml_output"
echo $extra_flags "$*" >> "$junit_xml_output"
}
function junit_output_cat() {
cat "$@" >> "$junit_xml_output"
}
# search, replace
function junit_output_replace() {
test -n "$junit_xml_output"
case "$(uname -s)" in
Linux)
sed -i "s/$1/$2/g" "$junit_xml_output"
;;
*)
sed -i "" "s/$1/$2/g" "$junit_xml_output"
;;
esac
}
function plugin_junit_xml_test_suite_begin() {
junit_testsuite_time=0
junit_output_write "<testsuite name='$1' hostname='$(hostname)' " \
"timestamp='$(date -u +"%Y-%m-%dT%H:%M:%S")' tests='XXX-TESTS-XXX' " \
"failures='XXX-FAILURES-XXX' time='XXX-TIME-XXX' errors='0' id='$(date +%s)'" \
" package='NIOIntegrationTests.$1'>"
}
function plugin_junit_xml_test_suite_end() {
junit_repl_success_and_fail "$1" "$2"
junit_output_write "</testsuite>"
}
# test_name
function plugin_junit_xml_test_begin() {
junit_output_write -n " <testcase classname='NIOIntegrationTests.$2' name='$1'"
}
function plugin_junit_xml_test_skip() {
true
}
function plugin_junit_xml_test_ok() {
time_ms=$1
junit_output_write " time='$time_ms'>"
junit_testsuite_time=$((junit_testsuite_time + time_ms))
}
function plugin_junit_xml_test_fail() {
time_ms=$1
junit_output_write " time='$time_ms'>"
junit_output_write " <failure type='test_fail'>"
junit_output_write " <system-out>"
junit_output_write ' <![CDATA['
junit_output_cat "$2"
junit_output_write ' ]]>'
junit_output_write " </system-out>"
junit_output_write " </failure>"
}
function plugin_junit_xml_test_end() {
junit_output_write " </testcase>"
}
function junit_repl_success_and_fail() {
junit_output_replace XXX-TESTS-XXX "$(($1 + $2))"
junit_output_replace XXX-FAILURES-XXX "$2"
junit_output_replace XXX-TIME-XXX "$junit_testsuite_time"
}
function plugin_junit_xml_summary_ok() {
junit_output_write "</testsuites>"
}
function plugin_junit_xml_summary_fail() {
junit_output_write "</testsuites>"
}
function plugin_junit_xml_init() {
junit_xml_output=""
for f in "$@"; do
if [[ "$junit_xml_output" = "PLACEHOLDER" ]]; then
junit_xml_output="$f"
fi
if [[ "$f" == "--junit-xml" && -z "$junit_xml_output" ]]; then
junit_xml_output="PLACEHOLDER"
fi
done
if [[ -z "$junit_xml_output" || "$junit_xml_output" = "PLACEHOLDER" ]]; then
echo >&2 "ERROR: you need to specify the output after the --junit-xml argument"
false
fi
echo "<testsuites>" > "$junit_xml_output"
}
================================================
FILE: IntegrationTests/run-single-test.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
(
# this sub-shell is where the actual test is run
set -eu
set -x
set -o pipefail
test="$1"
# shellcheck disable=SC2034 # Used by whatever we source transpile in
tmp="$2"
# shellcheck disable=SC2034 # Used by whatever we source transpile in
root="$3"
# shellcheck disable=SC2034 # Used by whatever we source transpile in
g_show_info="$4"
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=IntegrationTests/test_functions.sh
source "$here/test_functions.sh"
# shellcheck source=/dev/null
source "$test"
wait
)
exit_code=$?
exit $exit_code
================================================
FILE: IntegrationTests/run-tests.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
set -eu
shopt -s nullglob
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
tmp=$(mktemp -d /tmp/.swift-nio-http1-server-sh-tests_XXXXXX)
# start_time
function time_diff_to_now() {
echo "$(( $(date +%s) - $1 ))"
}
function plugins_do() {
local method
method="$1"
shift
for plugin in $plugins; do
cd "$orig_cwd"
"plugin_${plugin}_${method}" "$@"
cd - > /dev/null
done
}
# shellcheck source=IntegrationTests/plugin_echo.sh
source "$here/plugin_echo.sh"
# shellcheck source=/dev/null
source "$here/plugin_junit_xml.sh"
plugins="echo"
plugin_opts_ind=0
if [[ "${1-default}" == "--junit-xml" ]]; then
plugins="echo junit_xml"
plugin_opts_ind=2
fi
function usage() {
echo >&2 "Usage: $0 [OPTIONS]"
echo >&2
echo >&2 "OPTIONS:"
echo >&2 " -f FILTER: Only run tests matching FILTER (regex)"
}
orig_cwd=$(pwd)
cd "$here"
plugins_do init "$@"
shift $plugin_opts_ind
filter="."
verbose=false
show_info=false
debug=false
while getopts "f:vid" opt; do
case $opt in
f)
filter="$OPTARG"
;;
v)
verbose=true
;;
i)
show_info=true
;;
d)
debug=true
;;
\?)
usage
exit 1
;;
esac
done
function run_test() {
if $verbose; then
"$@" 2>&1 | tee -a "$out"
# we need to return the return value of the first command
return "${PIPESTATUS[0]}"
else
"$@" >> "$out" 2>&1
fi
}
exec 3>&1 4>&2 # copy stdout/err to fd 3/4 to we can output control messages
cnt_ok=0
cnt_fail=0
for f in tests_*; do
suite_ok=0
suite_fail=0
plugins_do test_suite_begin "$f"
start_suite=$(date +%s)
cd "$f"
for t in test_*.sh; do
if [[ ! "$f/$t" =~ $filter ]]; then
plugins_do test_skip "$t"
continue
fi
out=$(mktemp "$tmp/test.out_XXXXXX")
test_tmp=$(mktemp -d "$tmp/test.tmp_XXXXXX")
plugins_do test_begin "$t" "$f"
start=$(date +%s)
if run_test "$here/run-single-test.sh" "$here/$f/$t" "$test_tmp" "$here/.." "$show_info"; then
plugins_do test_ok "$(time_diff_to_now "$start")"
suite_ok=$((suite_ok+1))
if $verbose; then
cat "$out"
fi
else
plugins_do test_fail "$(time_diff_to_now "$start")" "$out"
suite_fail=$((suite_fail+1))
fi
if ! $debug; then
rm "$out"
rm -rf "$test_tmp"
fi
plugins_do test_end
done
cnt_ok=$((cnt_ok + suite_ok))
cnt_fail=$((cnt_fail + suite_fail))
cd ..
plugins_do test_suite_end "$(time_diff_to_now "$start_suite")" "$suite_ok" "$suite_fail"
done
if ! $debug; then
rm -rf "$tmp"
else
echo >&2 "debug mode, not deleting '$tmp'"
fi
# report
if [[ $cnt_fail -gt 0 ]]; then
# terminate leftovers (the whole process group)
trap '' TERM
kill 0 # ignore-unacceptable-language
plugins_do summary_fail "$cnt_ok" "$cnt_fail"
else
plugins_do summary_ok "$cnt_ok" "$cnt_fail"
fi
if [[ $cnt_fail -gt 0 ]]; then
exit 1
else
exit 0
fi
================================================
FILE: IntegrationTests/test_functions.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
function fail() {
echo >&2 "FAILURE: $*"
false
}
function assert_equal() {
if [[ "$1" != "$2" ]]; then
fail "expected '$1', got '$2' ${3-}"
fi
}
function assert_equal_files() {
if ! cmp -s "$1" "$2"; then
diff -u "$1" "$2" || true
echo
echo "--- SNIP ($1, size=$(wc "$1"), SHA=$(shasum "$1")) ---"
cat "$1"
echo "--- SNAP ($1)---"
echo "--- SNIP ($2, size=$(wc "$2"), SHA=$(shasum "$2")) ---"
cat "$2"
echo "--- SNAP ($2) ---"
fail "file '$1' not equal to '$2'"
fi
}
function assert_less_than() {
if [[ ! "$1" -lt "$2" ]]; then
fail "assertion '$1' < '$2' failed"
fi
}
function assert_less_than_or_equal() {
if [[ ! "$1" -le "$2" ]]; then
fail "assertion '$1' <= '$2' failed"
fi
}
function assert_greater_than() {
if [[ ! "$1" -gt "$2" ]]; then
fail "assertion '$1' > '$2' failed"
fi
}
function assert_greater_than_or_equal() {
if [[ ! "$1" -ge "$2" ]]; then
fail "assertion '$1' >= '$2' failed"
fi
}
g_has_previously_infoed=false
function info() {
# shellcheck disable=SC2154 # Defined by an include our by being source transpiled in
if $g_show_info; then
if ! $g_has_previously_infoed; then
echo >&3 || true # echo an extra newline so it looks better
g_has_previously_infoed=true
fi
echo >&3 "info: $*" || true
fi
}
function warn() {
echo >&4 "warning: $*"
}
================================================
FILE: IntegrationTests/tests_01_general/defines.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2017-2019 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
function client_path() {
echo "$(swift build --show-bin-path)/NIOSSLHTTP1Client"
}
================================================
FILE: IntegrationTests/tests_01_general/test_01_renegotiation.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
# shellcheck source=IntegrationTests/tests_01_general/defines.sh
source defines.sh
swift build
# Generate a self-signed certificate.
# shellcheck disable=SC2154 # Provided by framework
cat << EOF > "$tmp/openssl.cnf"
[ req ]
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
[ subject ]
countryName = Country Name (2 letter code)
countryName_default = US
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = NY
localityName = Locality Name (eg, city)
localityName_default = New York
organizationName = Organization Name (eg, company)
organizationName_default = Example, LLC
[ req_ext ]
basicConstraints = CA:FALSE
[ x509_ext ]
subjectKeyIdentifier = hash
subjectAltName = @alternate_names
[ alternate_names ]
DNS.1 = localhost
EOF
openssl req -new -newkey rsa:4096 -days 365 -nodes -config "$tmp/openssl.cnf" -x509 \
-subj "/C=US/ST=NJ/L=Wall/O=NIO/CN=localhost" \
-keyout "$tmp/key.pem" -out "$tmp/cert.pem"
expect -c "
spawn openssl s_server -no_tls1_3 -cert \"$tmp/cert.pem\" -key \"$tmp/key.pem\"
set serverspawn \$spawn_id
expect {
\"ACCEPT\" {
}
timeout {
exit 1
}
}
spawn $(client_path) http://localhost:4433/get \"$tmp/cert.pem\" \"$tmp/key.pem\" \"$tmp/cert.pem\"
set spawn_id \$serverspawn
expect {
\"close\\r\\r\" {
}
timeout {
exit 2
}
}
send \"R\r\"
expect {
\"Read BLOCK\\r\" {
}
timeout {
exit 3
}
}
"
================================================
FILE: IntegrationTests/tests_01_general/test_02_execstack.sh
================================================
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
# shellcheck source=IntegrationTests/tests_01_general/defines.sh
source defines.sh
if [[ "$(uname -s)" == "Darwin" ]]; then
echo "No need to run execstack on Darwin"
exit 0
fi
swift build -c debug
swift build -c release
DEBUG_SERVER_PATH="$(swift build --show-bin-path)/NIOTLSServer"
RELEASE_SERVER_PATH="$(swift build --show-bin-path -c release)/NIOTLSServer"
results=$(execstack "$DEBUG_SERVER_PATH" "$RELEASE_SERVER_PATH")
count=$(echo "$results" | grep -c '^X' || true)
if [ "$count" -ne 0 ]; then
exit 1
else
exit 0
fi
================================================
FILE: LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: NOTICE.txt
================================================
The SwiftNIO Project
====================
Please visit the SwiftNIO web site for more information:
* https://github.com/apple/swift-nio
Copyright 2017, 2018 The SwiftNIO Project
The SwiftNIO Project licenses this file to you under the Apache License,
version 2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at:
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
Also, please refer to each LICENSE.<component>.txt file, which is located in
the 'license' directory of the distribution file, for the license terms of the
components that this product depends on.
-------------------------------------------------------------------------------
This product is heavily influenced by Netty.
* LICENSE (Apache License 2.0):
* https://github.com/netty/netty/blob/4.1/LICENSE.txt
* HOMEPAGE:
* https://netty.io
---
This product contains a derivation of the Tony Stone's 'process_test_files.rb'.
* LICENSE (Apache License 2.0):
* https://www.apache.org/licenses/LICENSE-2.0
* HOMEPAGE:
* https://codegists.com/snippet/ruby/generate_xctest_linux_runnerrb_tonystone_ruby
---
This product contains code derived from grpc-swift.
* LICENSE (Apache License 2.0):
* https://github.com/grpc/grpc-swift/blob/0.7.0/LICENSE
* HOMEPAGE:
* https://github.com/grpc/grpc-swift
---
This product contains code from boringssl.
* LICENSE (Combination ISC and OpenSSL license)
* https://boringssl.googlesource.com/boringssl/+/refs/heads/master/LICENSE
* HOMEPAGE:
* https://boringssl.googlesource.com/boringssl/
================================================
FILE: Package.swift
================================================
// swift-tools-version:6.1
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import PackageDescription
// This package contains a vendored copy of BoringSSL. For ease of tracking
// down problems with the copy of BoringSSL in use, we include a copy of the
// commit hash of the revision of BoringSSL included in the given release.
// This is also reproduced in a file called hash.txt in the
// Sources/CNIOBoringSSL directory. The source repository is at
// https://boringssl.googlesource.com/boringssl.
//
// BoringSSL Commit: 817ab07ebb53da35afea409ab9328f578492832d
/// This function generates the dependencies we want to express.
///
/// Importantly, it tolerates the possibility that we are being used as part
/// of the Swift toolchain, and so need to use local checkouts of our
/// dependencies.
func generateDependencies() -> [Package.Dependency] {
if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
return [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.80.0")
]
} else {
return [
.package(path: "../swift-nio")
]
}
}
// This doesn't work when cross-compiling: the privacy manifest will be included in the Bundle and
// Foundation will be linked. This is, however, strictly better than unconditionally adding the
// resource.
#if canImport(Darwin)
let includePrivacyManifest = true
#else
let includePrivacyManifest = false
#endif
let strictConcurrencyDevelopment = false
let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
// get tripped up on -require-explicit-sendable.
initialSettings.append(.unsafeFlags(["-Xfrontend", "-require-explicit-sendable", "-warnings-as-errors"]))
}
return initialSettings
}()
// swift-format-ignore: NoBlockComments
let package = Package(
name: "swift-nio-ssl",
products: [
.library(name: "NIOSSL", targets: ["NIOSSL"]),
.executable(name: "NIOTLSServer", targets: ["NIOTLSServer"]),
.executable(name: "NIOSSLHTTP1Client", targets: ["NIOSSLHTTP1Client"]),
/* This target is used only for symbol mangling. It's added and removed automatically because it emits build warnings. MANGLE_START
.library(name: "CNIOBoringSSL", type: .static, targets: ["CNIOBoringSSL"]),
MANGLE_END */
],
dependencies: generateDependencies(),
targets: [
.target(
name: "CNIOBoringSSL",
cSettings: [
.define("_GNU_SOURCE"),
.define("_POSIX_C_SOURCE", to: "200112L"),
.define("_DARWIN_C_SOURCE"),
]
),
.target(
name: "CNIOBoringSSLShims",
dependencies: [
"CNIOBoringSSL"
],
cSettings: [
.define("_GNU_SOURCE")
]
),
.target(
name: "NIOSSL",
dependencies: [
"CNIOBoringSSL",
"CNIOBoringSSLShims",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
.product(name: "NIOTLS", package: "swift-nio"),
],
exclude: includePrivacyManifest ? [] : ["PrivacyInfo.xcprivacy"],
resources: includePrivacyManifest ? [.copy("PrivacyInfo.xcprivacy")] : [],
swiftSettings: strictConcurrencySettings
),
.executableTarget(
name: "NIOTLSServer",
dependencies: [
"NIOSSL",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
],
exclude: [
"README.md"
],
swiftSettings: strictConcurrencySettings
),
.executableTarget(
name: "NIOSSLHTTP1Client",
dependencies: [
"NIOSSL",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
],
exclude: [
"README.md"
],
swiftSettings: strictConcurrencySettings
),
.executableTarget(
name: "NIOSSLPerformanceTester",
dependencies: [
"NIOSSL",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOEmbedded", package: "swift-nio"),
.product(name: "NIOTLS", package: "swift-nio"),
],
swiftSettings: strictConcurrencySettings
),
.testTarget(
name: "NIOSSLTests",
dependencies: [
"NIOSSL",
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOEmbedded", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
.product(name: "NIOTLS", package: "swift-nio"),
],
swiftSettings: strictConcurrencySettings
),
],
cxxLanguageStandard: .cxx17
)
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
for target in package.targets {
switch target.type {
case .regular, .test, .executable:
var settings = target.swiftSettings ?? []
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
target.swiftSettings = settings
case .macro, .plugin, .system, .binary:
() // not applicable
@unknown default:
() // we don't know what to do here, do nothing
}
}
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
================================================
FILE: README.md
================================================
# SwiftNIO SSL
SwiftNIO SSL is a Swift package that contains an implementation of TLS based on BoringSSL. This package allows users of [SwiftNIO](https://github.com/apple/swift-nio) to write protocol clients and servers that use TLS to secure data in flight.
The name is inspired primarily by the names of the library this package uses (BoringSSL), and not because we don't know the name of the protocol. We know the protocol is TLS!
To get started, check out the [API docs](https://swiftpackageindex.com/apple/swift-nio-ssl/main/documentation/niossl).
## Using SwiftNIO SSL
SwiftNIO SSL provides two `ChannelHandler`s to use to secure a data stream: the `NIOSSLClientHandler` and the `NIOSSLServerHandler`. Each of these can be added to a `Channel` to secure the communications on that channel.
Additionally, we provide a number of low-level primitives for configuring your TLS connections. These will be shown below.
To secure a server connection, you will need a X.509 certificate chain in a file (either PEM or DER, but PEM is far easier), and the associated private key for the leaf certificate. These objects can then be wrapped up in a `TLSConfiguration` object that is used to initialize the `ChannelHandler`.
For example:
```swift
let configuration = TLSConfiguration.makeServerConfiguration(
certificateChain: try NIOSSLCertificate.fromPEMFile("cert.pem").map { .certificate($0) },
privateKey: try .privateKey(.init(file: "key.pem", format: .pem))
)
let sslContext = try NIOSSLContext(configuration: configuration)
let server = ServerBootstrap(group: group)
.childChannelInitializer { channel in
// important: The handler must be initialized _inside_ the `childChannelInitializer`
let handler = NIOSSLServerHandler(context: sslContext)
[...]
channel.pipeline.syncOperations.addHandler(handler)
[...]
}
```
For clients, it is a bit simpler as there is no need to have a certificate chain or private key (though clients *may* have these things). Setup for clients may be done like this:
```swift
let configuration = TLSConfiguration.makeClientConfiguration()
let sslContext = try NIOSSLContext(configuration: configuration)
let client = ClientBootstrap(group: group)
.channelInitializer { channel in
// important: The handler must be initialized _inside_ the `channelInitializer`
let handler = try NIOSSLClientHandler(context: sslContext)
[...]
channel.pipeline.syncOperations.addHandler(handler)
[...]
}
```
The most recent versions of SwiftNIO SSL support Swift 5.7 and newer. The minimum Swift version supported by SwiftNIO SSL releases are detailed below:
SwiftNIO SSL | Minimum Swift Version
--------------------|----------------------
`2.0.0 ..< 2.14.0` | 5.0
`2.14.0 ..< 2.19.0` | 5.2
`2.19.0 ..< 2.23.0` | 5.4
`2.23.0 ..< 2.23.2` | 5.5.2
`2.23.2 ..< 2.26.0` | 5.6
`2.26.0 ..< 2.27.0` | 5.7
`2.27.0 ..< 2.29.3` | 5.8
`2.29.3 ..< 2.31.0` | 5.9
`2.31.0 ..< 2.35.0` | 5.10
`2.35.0 ..< 2.37.0` | 6.0
`2.37.0 ..<` | 6.1
================================================
FILE: SECURITY.md
================================================
# Security
Please refer to the security guidelines set out in the
[apple/swift-nio](https://github.com/apple/swift-nio) repository:
<https://github.com/apple/swift-nio/blob/main/SECURITY.md>
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_bitstr.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <limits.h>
#include <string.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include "../internal.h"
#include "internal.h"
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, const unsigned char *d,
ossl_ssize_t len) {
return ASN1_STRING_set(x, d, len);
}
int asn1_bit_string_length(const ASN1_BIT_STRING *str,
uint8_t *out_padding_bits) {
int len = str->length;
if (str->flags & ASN1_STRING_FLAG_BITS_LEFT) {
// If the string is already empty, it cannot have padding bits.
*out_padding_bits = len == 0 ? 0 : str->flags & 0x07;
return len;
}
// TODO(https://crbug.com/boringssl/447): If we move this logic to
// |ASN1_BIT_STRING_set_bit|, can we remove this representation?
while (len > 0 && str->data[len - 1] == 0) {
len--;
}
uint8_t padding_bits = 0;
if (len > 0) {
uint8_t last = str->data[len - 1];
assert(last != 0);
for (; padding_bits < 7; padding_bits++) {
if (last & (1 << padding_bits)) {
break;
}
}
}
*out_padding_bits = padding_bits;
return len;
}
int ASN1_BIT_STRING_num_bytes(const ASN1_BIT_STRING *str, size_t *out) {
uint8_t padding_bits;
int len = asn1_bit_string_length(str, &padding_bits);
if (padding_bits != 0) {
return 0;
}
*out = len;
return 1;
}
int i2c_ASN1_BIT_STRING(const ASN1_BIT_STRING *a, unsigned char **pp) {
if (a == NULL) {
return 0;
}
uint8_t bits;
int len = asn1_bit_string_length(a, &bits);
if (len > INT_MAX - 1) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_OVERFLOW);
return 0;
}
int ret = 1 + len;
if (pp == NULL) {
return ret;
}
uint8_t *p = *pp;
*(p++) = bits;
OPENSSL_memcpy(p, a->data, len);
if (len > 0) {
p[len - 1] &= (0xff << bits);
}
p += len;
*pp = p;
return ret;
}
ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
const unsigned char **pp, long len) {
ASN1_BIT_STRING *ret = NULL;
const unsigned char *p;
unsigned char *s;
int padding;
uint8_t padding_mask;
if (len < 1) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_STRING_TOO_SHORT);
goto err;
}
if (len > INT_MAX) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_STRING_TOO_LONG);
goto err;
}
if ((a == NULL) || ((*a) == NULL)) {
if ((ret = ASN1_BIT_STRING_new()) == NULL) {
return NULL;
}
} else {
ret = (*a);
}
p = *pp;
padding = *(p++);
len--;
if (padding > 7) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_BIT_STRING_BITS_LEFT);
goto err;
}
// Unused bits in a BIT STRING must be zero.
padding_mask = (1 << padding) - 1;
if (padding != 0 && (len < 1 || (p[len - 1] & padding_mask) != 0)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_BIT_STRING_PADDING);
goto err;
}
// We do this to preserve the settings. If we modify the settings, via
// the _set_bit function, we will recalculate on output
ret->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); // clear
ret->flags |= (ASN1_STRING_FLAG_BITS_LEFT | padding); // set
if (len > 0) {
s = reinterpret_cast<uint8_t *>(OPENSSL_memdup(p, len));
if (s == NULL) {
goto err;
}
p += len;
} else {
s = NULL;
}
ret->length = (int)len;
OPENSSL_free(ret->data);
ret->data = s;
ret->type = V_ASN1_BIT_STRING;
if (a != NULL) {
(*a) = ret;
}
*pp = p;
return ret;
err:
if ((ret != NULL) && ((a == NULL) || (*a != ret))) {
ASN1_BIT_STRING_free(ret);
}
return NULL;
}
// These next 2 functions from Goetz Babin-Ebell <babinebell@trustcenter.de>
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) {
int w, v, iv;
unsigned char *c;
w = n / 8;
v = 1 << (7 - (n & 0x07));
iv = ~v;
if (!value) {
v = 0;
}
if (a == NULL) {
return 0;
}
a->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); // clear, set on write
if ((a->length < (w + 1)) || (a->data == NULL)) {
if (!value) {
return 1; // Don't need to set
}
if (a->data == NULL) {
c = (unsigned char *)OPENSSL_malloc(w + 1);
} else {
c = (unsigned char *)OPENSSL_realloc(a->data, w + 1);
}
if (c == NULL) {
return 0;
}
if (w + 1 - a->length > 0) {
OPENSSL_memset(c + a->length, 0, w + 1 - a->length);
}
a->data = c;
a->length = w + 1;
}
a->data[w] = ((a->data[w]) & iv) | v;
while ((a->length > 0) && (a->data[a->length - 1] == 0)) {
a->length--;
}
return 1;
}
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) {
int w, v;
w = n / 8;
v = 1 << (7 - (n & 0x07));
if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL)) {
return 0;
}
return ((a->data[w] & v) != 0);
}
// Checks if the given bit string contains only bits specified by
// the flags vector. Returns 0 if there is at least one bit set in 'a'
// which is not specified in 'flags', 1 otherwise.
// 'len' is the length of 'flags'.
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a, const unsigned char *flags,
int flags_len) {
int i, ok;
// Check if there is one bit set at all.
if (!a || !a->data) {
return 1;
}
// Check each byte of the internal representation of the bit string.
ok = 1;
for (i = 0; i < a->length && ok; ++i) {
unsigned char mask = i < flags_len ? ~flags[i] : 0xff;
// We are done if there is an unneeded bit set.
ok = (a->data[i] & mask) == 0;
}
return ok;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_bool.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include "../bytestring/internal.h"
int i2d_ASN1_BOOLEAN(ASN1_BOOLEAN a, unsigned char **outp) {
CBB cbb;
if (!CBB_init(&cbb, 3) || //
!CBB_add_asn1_bool(&cbb, a != ASN1_BOOLEAN_FALSE)) {
CBB_cleanup(&cbb);
return -1;
}
return CBB_finish_i2d(&cbb, outp);
}
ASN1_BOOLEAN d2i_ASN1_BOOLEAN(ASN1_BOOLEAN *out, const unsigned char **inp,
long len) {
if (len < 0) {
return ASN1_BOOLEAN_NONE;
}
CBS cbs;
CBS_init(&cbs, *inp, (size_t)len);
int val;
if (!CBS_get_asn1_bool(&cbs, &val)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_DECODE_ERROR);
return ASN1_BOOLEAN_NONE;
}
ASN1_BOOLEAN ret = val ? ASN1_BOOLEAN_TRUE : ASN1_BOOLEAN_FALSE;
if (out != NULL) {
*out = ret;
}
*inp = CBS_data(&cbs);
return ret;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_d2i_fp.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <limits.h>
#include <CNIOBoringSSL_bio.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x) {
uint8_t *data;
size_t len;
// Historically, this function did not impose a limit in OpenSSL and is used
// to read CRLs, so we leave this without an external bound.
if (!BIO_read_asn1(in, &data, &len, INT_MAX)) {
return NULL;
}
const uint8_t *ptr = data;
void *ret = ASN1_item_d2i(reinterpret_cast<ASN1_VALUE **>(x), &ptr, len, it);
OPENSSL_free(data);
return ret;
}
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x) {
BIO *b = BIO_new_fp(in, BIO_NOCLOSE);
if (b == NULL) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_BUF_LIB);
return NULL;
}
void *ret = ASN1_item_d2i_bio(it, b, x);
BIO_free(b);
return ret;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_dup.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
// ASN1_ITEM version of dup: this follows the model above except we don't
// need to allocate the buffer. At some point this could be rewritten to
// directly dup the underlying structure instead of doing and encode and
// decode.
void *ASN1_item_dup(const ASN1_ITEM *it, void *x) {
unsigned char *b = NULL;
const unsigned char *p;
long i;
void *ret;
if (x == NULL) {
return NULL;
}
i = ASN1_item_i2d(reinterpret_cast<ASN1_VALUE *>(x), &b, it);
if (b == NULL) {
return NULL;
}
p = b;
ret = ASN1_item_d2i(NULL, &p, i, it);
OPENSSL_free(b);
return ret;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_gentm.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include <CNIOBoringSSL_posix_time.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "internal.h"
int asn1_generalizedtime_to_tm(struct tm *tm, const ASN1_GENERALIZEDTIME *d) {
if (d->type != V_ASN1_GENERALIZEDTIME) {
return 0;
}
CBS cbs;
CBS_init(&cbs, d->data, (size_t)d->length);
if (!CBS_parse_generalized_time(&cbs, tm, /*allow_timezone_offset=*/0)) {
return 0;
}
return 1;
}
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d) {
return asn1_generalizedtime_to_tm(NULL, d);
}
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str) {
size_t len = strlen(str);
CBS cbs;
CBS_init(&cbs, (const uint8_t *)str, len);
if (!CBS_parse_generalized_time(&cbs, /*out_tm=*/NULL,
/*allow_timezone_offset=*/0)) {
return 0;
}
if (s != NULL) {
if (!ASN1_STRING_set(s, str, len)) {
return 0;
}
s->type = V_ASN1_GENERALIZEDTIME;
}
return 1;
}
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
int64_t posix_time) {
return ASN1_GENERALIZEDTIME_adj(s, posix_time, 0, 0);
}
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
int64_t posix_time,
int offset_day,
long offset_sec) {
struct tm data;
if (!OPENSSL_posix_to_tm(posix_time, &data)) {
return NULL;
}
if (offset_day || offset_sec) {
if (!OPENSSL_gmtime_adj(&data, offset_day, offset_sec)) {
return NULL;
}
}
if (data.tm_year < 0 - 1900 || data.tm_year > 9999 - 1900) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_TIME_VALUE);
return NULL;
}
char buf[16];
int ret = snprintf(buf, sizeof(buf), "%04d%02d%02d%02d%02d%02dZ",
data.tm_year + 1900, data.tm_mon + 1, data.tm_mday,
data.tm_hour, data.tm_min, data.tm_sec);
// |snprintf| must write exactly 15 bytes (plus the NUL) to the buffer.
BSSL_CHECK(ret == static_cast<int>(sizeof(buf) - 1));
int free_s = 0;
if (s == NULL) {
free_s = 1;
s = ASN1_UTCTIME_new();
if (s == NULL) {
return NULL;
}
}
if (!ASN1_STRING_set(s, buf, strlen(buf))) {
if (free_s) {
ASN1_UTCTIME_free(s);
}
return NULL;
}
s->type = V_ASN1_GENERALIZEDTIME;
return s;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_i2d_fp.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_bio.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x) {
BIO *b = BIO_new_fp(out, BIO_NOCLOSE);
if (b == NULL) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_BUF_LIB);
return 0;
}
int ret = ASN1_item_i2d_bio(it, b, x);
BIO_free(b);
return ret;
}
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x) {
unsigned char *b = NULL;
int n = ASN1_item_i2d(reinterpret_cast<ASN1_VALUE *>(x), &b, it);
if (b == NULL) {
return 0;
}
int ret = BIO_write_all(out, b, n);
OPENSSL_free(b);
return ret;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_int.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include "../internal.h"
ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x) {
return ASN1_STRING_dup(x);
}
int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y) {
// Compare signs.
int neg = x->type & V_ASN1_NEG;
if (neg != (y->type & V_ASN1_NEG)) {
return neg ? -1 : 1;
}
int ret = ASN1_STRING_cmp(x, y);
if (neg) {
// This could be |-ret|, but |ASN1_STRING_cmp| is not forbidden from
// returning |INT_MIN|.
if (ret < 0) {
return 1;
} else if (ret > 0) {
return -1;
} else {
return 0;
}
}
return ret;
}
// negate_twos_complement negates |len| bytes from |buf| in-place, interpreted
// as a signed, big-endian two's complement value.
static void negate_twos_complement(uint8_t *buf, size_t len) {
uint8_t borrow = 0;
for (size_t i = len - 1; i < len; i--) {
uint8_t t = buf[i];
buf[i] = 0u - borrow - t;
borrow |= t != 0;
}
}
static int is_all_zeros(const uint8_t *in, size_t len) {
for (size_t i = 0; i < len; i++) {
if (in[i] != 0) {
return 0;
}
}
return 1;
}
int i2c_ASN1_INTEGER(const ASN1_INTEGER *in, unsigned char **outp) {
if (in == NULL) {
return 0;
}
// |ASN1_INTEGER|s should be represented minimally, but it is possible to
// construct invalid ones. Skip leading zeros so this does not produce an
// invalid encoding or break invariants.
CBS cbs;
CBS_init(&cbs, in->data, in->length);
while (CBS_len(&cbs) > 0 && CBS_data(&cbs)[0] == 0) {
CBS_skip(&cbs, 1);
}
int is_negative = (in->type & V_ASN1_NEG) != 0;
size_t pad;
CBS copy = cbs;
uint8_t msb;
if (!CBS_get_u8(©, &msb)) {
// Zero is represented as a single byte.
is_negative = 0;
pad = 1;
} else if (is_negative) {
// 0x80...01 through 0xff...ff have a two's complement of 0x7f...ff
// through 0x00...01 and need an extra byte to be negative.
// 0x01...00 through 0x80...00 have a two's complement of 0xfe...ff
// through 0x80...00 and can be negated as-is.
pad = msb > 0x80 ||
(msb == 0x80 && !is_all_zeros(CBS_data(©), CBS_len(©)));
} else {
// If the high bit is set, the signed representation needs an extra
// byte to be positive.
pad = (msb & 0x80) != 0;
}
if (CBS_len(&cbs) > INT_MAX - pad) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_OVERFLOW);
return 0;
}
int len = (int)(pad + CBS_len(&cbs));
assert(len > 0);
if (outp == NULL) {
return len;
}
if (pad) {
(*outp)[0] = 0;
}
OPENSSL_memcpy(*outp + pad, CBS_data(&cbs), CBS_len(&cbs));
if (is_negative) {
negate_twos_complement(*outp, len);
assert((*outp)[0] >= 0x80);
} else {
assert((*outp)[0] < 0x80);
}
*outp += len;
return len;
}
ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **out, const unsigned char **inp,
long len) {
// This function can handle lengths up to INT_MAX - 1, but the rest of the
// legacy ASN.1 code mixes integer types, so avoid exposing it to
// ASN1_INTEGERS with larger lengths.
if (len < 0 || len > INT_MAX / 2) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_TOO_LONG);
return NULL;
}
CBS cbs;
CBS_init(&cbs, *inp, (size_t)len);
int is_negative;
if (!CBS_is_valid_asn1_integer(&cbs, &is_negative)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_INTEGER);
return NULL;
}
ASN1_INTEGER *ret = NULL;
if (out == NULL || *out == NULL) {
ret = ASN1_INTEGER_new();
if (ret == NULL) {
return NULL;
}
} else {
ret = *out;
}
// Convert to |ASN1_INTEGER|'s sign-and-magnitude representation. First,
// determine the size needed for a minimal result.
if (is_negative) {
// 0xff00...01 through 0xff7f..ff have a two's complement of 0x00ff...ff
// through 0x000100...001 and need one leading zero removed. 0x8000...00
// through 0xff00...00 have a two's complement of 0x8000...00 through
// 0x0100...00 and will be minimally-encoded as-is.
if (CBS_len(&cbs) > 0 && CBS_data(&cbs)[0] == 0xff &&
!is_all_zeros(CBS_data(&cbs) + 1, CBS_len(&cbs) - 1)) {
CBS_skip(&cbs, 1);
}
} else {
// Remove the leading zero byte, if any.
if (CBS_len(&cbs) > 0 && CBS_data(&cbs)[0] == 0x00) {
CBS_skip(&cbs, 1);
}
}
if (!ASN1_STRING_set(ret, CBS_data(&cbs), CBS_len(&cbs))) {
goto err;
}
if (is_negative) {
ret->type = V_ASN1_NEG_INTEGER;
negate_twos_complement(ret->data, ret->length);
} else {
ret->type = V_ASN1_INTEGER;
}
// The value should be minimally-encoded.
assert(ret->length == 0 || ret->data[0] != 0);
// Zero is not negative.
assert(!is_negative || ret->length > 0);
*inp += len;
if (out != NULL) {
*out = ret;
}
return ret;
err:
if (ret != NULL && (out == NULL || *out != ret)) {
ASN1_INTEGER_free(ret);
}
return NULL;
}
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t v) {
if (v >= 0) {
return ASN1_INTEGER_set_uint64(a, (uint64_t)v);
}
if (!ASN1_INTEGER_set_uint64(a, 0 - (uint64_t)v)) {
return 0;
}
a->type = V_ASN1_NEG_INTEGER;
return 1;
}
int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t v) {
if (v >= 0) {
return ASN1_ENUMERATED_set_uint64(a, (uint64_t)v);
}
if (!ASN1_ENUMERATED_set_uint64(a, 0 - (uint64_t)v)) {
return 0;
}
a->type = V_ASN1_NEG_ENUMERATED;
return 1;
}
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v) {
static_assert(sizeof(long) <= sizeof(int64_t), "long fits in int64_t");
return ASN1_INTEGER_set_int64(a, v);
}
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) {
static_assert(sizeof(long) <= sizeof(int64_t), "long fits in int64_t");
return ASN1_ENUMERATED_set_int64(a, v);
}
static int asn1_string_set_uint64(ASN1_STRING *out, uint64_t v, int type) {
uint8_t buf[sizeof(uint64_t)];
CRYPTO_store_u64_be(buf, v);
size_t leading_zeros;
for (leading_zeros = 0; leading_zeros < sizeof(buf); leading_zeros++) {
if (buf[leading_zeros] != 0) {
break;
}
}
if (!ASN1_STRING_set(out, buf + leading_zeros, sizeof(buf) - leading_zeros)) {
return 0;
}
out->type = type;
return 1;
}
int ASN1_INTEGER_set_uint64(ASN1_INTEGER *out, uint64_t v) {
return asn1_string_set_uint64(out, v, V_ASN1_INTEGER);
}
int ASN1_ENUMERATED_set_uint64(ASN1_ENUMERATED *out, uint64_t v) {
return asn1_string_set_uint64(out, v, V_ASN1_ENUMERATED);
}
static int asn1_string_get_abs_uint64(uint64_t *out, const ASN1_STRING *a,
int type) {
if ((a->type & ~V_ASN1_NEG) != type) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_WRONG_INTEGER_TYPE);
return 0;
}
uint8_t buf[sizeof(uint64_t)] = {0};
if (a->length > (int)sizeof(buf)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_INTEGER);
return 0;
}
OPENSSL_memcpy(buf + sizeof(buf) - a->length, a->data, a->length);
*out = CRYPTO_load_u64_be(buf);
return 1;
}
static int asn1_string_get_uint64(uint64_t *out, const ASN1_STRING *a,
int type) {
if (!asn1_string_get_abs_uint64(out, a, type)) {
return 0;
}
if (a->type & V_ASN1_NEG) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_INTEGER);
return 0;
}
return 1;
}
int ASN1_INTEGER_get_uint64(uint64_t *out, const ASN1_INTEGER *a) {
return asn1_string_get_uint64(out, a, V_ASN1_INTEGER);
}
int ASN1_ENUMERATED_get_uint64(uint64_t *out, const ASN1_ENUMERATED *a) {
return asn1_string_get_uint64(out, a, V_ASN1_ENUMERATED);
}
static int asn1_string_get_int64(int64_t *out, const ASN1_STRING *a, int type) {
uint64_t v;
if (!asn1_string_get_abs_uint64(&v, a, type)) {
return 0;
}
int64_t i64;
int fits_in_i64;
// Check |v != 0| to handle manually-constructed negative zeros.
if ((a->type & V_ASN1_NEG) && v != 0) {
i64 = (int64_t)(0u - v);
fits_in_i64 = i64 < 0;
} else {
i64 = (int64_t)v;
fits_in_i64 = i64 >= 0;
}
if (!fits_in_i64) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_INTEGER);
return 0;
}
*out = i64;
return 1;
}
int ASN1_INTEGER_get_int64(int64_t *out, const ASN1_INTEGER *a) {
return asn1_string_get_int64(out, a, V_ASN1_INTEGER);
}
int ASN1_ENUMERATED_get_int64(int64_t *out, const ASN1_ENUMERATED *a) {
return asn1_string_get_int64(out, a, V_ASN1_ENUMERATED);
}
static long asn1_string_get_long(const ASN1_STRING *a, int type) {
if (a == NULL) {
return 0;
}
int64_t v;
if (!asn1_string_get_int64(&v, a, type) || //
v < LONG_MIN || v > LONG_MAX) {
// This function's return value does not distinguish overflow from -1.
ERR_clear_error();
return -1;
}
return (long)v;
}
long ASN1_INTEGER_get(const ASN1_INTEGER *a) {
return asn1_string_get_long(a, V_ASN1_INTEGER);
}
long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a) {
return asn1_string_get_long(a, V_ASN1_ENUMERATED);
}
static ASN1_STRING *bn_to_asn1_string(const BIGNUM *bn, ASN1_STRING *ai,
int type) {
ASN1_INTEGER *ret;
if (ai == NULL) {
ret = ASN1_STRING_type_new(type);
} else {
ret = ai;
}
int len;
if (ret == NULL) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
}
if (BN_is_negative(bn) && !BN_is_zero(bn)) {
ret->type = type | V_ASN1_NEG;
} else {
ret->type = type;
}
len = BN_num_bytes(bn);
if (!ASN1_STRING_set(ret, NULL, len) ||
!BN_bn2bin_padded(ret->data, len, bn)) {
goto err;
}
return ret;
err:
if (ret != ai) {
ASN1_STRING_free(ret);
}
return NULL;
}
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) {
return bn_to_asn1_string(bn, ai, V_ASN1_INTEGER);
}
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai) {
return bn_to_asn1_string(bn, ai, V_ASN1_ENUMERATED);
}
static BIGNUM *asn1_string_to_bn(const ASN1_STRING *ai, BIGNUM *bn, int type) {
if ((ai->type & ~V_ASN1_NEG) != type) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_WRONG_INTEGER_TYPE);
return NULL;
}
BIGNUM *ret;
if ((ret = BN_bin2bn(ai->data, ai->length, bn)) == NULL) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_BN_LIB);
} else if (ai->type & V_ASN1_NEG) {
BN_set_negative(ret, 1);
}
return ret;
}
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) {
return asn1_string_to_bn(ai, bn, V_ASN1_INTEGER);
}
BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn) {
return asn1_string_to_bn(ai, bn, V_ASN1_ENUMERATED);
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_mbstr.cc
================================================
/*
* Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <limits.h>
#include <string.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include "../bytestring/internal.h"
#include "internal.h"
// These functions take a string in UTF8, ASCII or multibyte form and a mask
// of permissible ASN1 string types. It then works out the minimal type
// (using the order Printable < IA5 < T61 < BMP < Universal < UTF8) and
// creates a string of the correct type with the supplied data. Yes this is
// horrible: it has to be :-( The 'ncopy' form checks minimum and maximum
// size limits too.
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in,
ossl_ssize_t len, int inform, unsigned long mask) {
return ASN1_mbstring_ncopy(out, in, len, inform, mask, /*minsize=*/0,
/*maxsize=*/0);
}
OPENSSL_DECLARE_ERROR_REASON(ASN1, INVALID_BMPSTRING)
OPENSSL_DECLARE_ERROR_REASON(ASN1, INVALID_UNIVERSALSTRING)
OPENSSL_DECLARE_ERROR_REASON(ASN1, INVALID_UTF8STRING)
int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in,
ossl_ssize_t len, int inform, unsigned long mask,
ossl_ssize_t minsize, ossl_ssize_t maxsize) {
if (len == -1) {
len = strlen((const char *)in);
}
if (!mask) {
mask = DIRSTRING_TYPE;
}
int (*decode_func)(CBS *, uint32_t *);
int error;
switch (inform) {
case MBSTRING_BMP:
decode_func = CBS_get_ucs2_be;
error = ASN1_R_INVALID_BMPSTRING;
break;
case MBSTRING_UNIV:
decode_func = CBS_get_utf32_be;
error = ASN1_R_INVALID_UNIVERSALSTRING;
break;
case MBSTRING_UTF8:
decode_func = CBS_get_utf8;
error = ASN1_R_INVALID_UTF8STRING;
break;
case MBSTRING_ASC:
decode_func = CBS_get_latin1;
error = ERR_R_INTERNAL_ERROR; // Latin-1 inputs are never invalid.
break;
default:
OPENSSL_PUT_ERROR(ASN1, ASN1_R_UNKNOWN_FORMAT);
return -1;
}
// Check |minsize| and |maxsize| and work out the minimal type, if any.
CBS cbs;
CBS_init(&cbs, in, len);
size_t utf8_len = 0, nchar = 0;
while (CBS_len(&cbs) != 0) {
uint32_t c;
if (!decode_func(&cbs, &c)) {
OPENSSL_PUT_ERROR(ASN1, error);
return -1;
}
if (nchar == 0 && (inform == MBSTRING_BMP || inform == MBSTRING_UNIV) &&
c == 0xfeff) {
// Reject byte-order mark. We could drop it but that would mean
// adding ambiguity around whether a BOM was included or not when
// matching strings.
//
// For a little-endian UCS-2 string, the BOM will appear as 0xfffe
// and will be rejected as noncharacter, below.
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_CHARACTERS);
return -1;
}
// Update which output formats are still possible.
if ((mask & B_ASN1_PRINTABLESTRING) && !asn1_is_printable(c)) {
mask &= ~B_ASN1_PRINTABLESTRING;
}
if ((mask & B_ASN1_IA5STRING) && (c > 127)) {
mask &= ~B_ASN1_IA5STRING;
}
if ((mask & B_ASN1_T61STRING) && (c > 0xff)) {
mask &= ~B_ASN1_T61STRING;
}
if ((mask & B_ASN1_BMPSTRING) && (c > 0xffff)) {
mask &= ~B_ASN1_BMPSTRING;
}
if (!mask) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_CHARACTERS);
return -1;
}
nchar++;
utf8_len += CBB_get_utf8_len(c);
if (maxsize > 0 && nchar > (size_t)maxsize) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_STRING_TOO_LONG);
ERR_add_error_dataf("maxsize=%zu", (size_t)maxsize);
return -1;
}
}
if (minsize > 0 && nchar < (size_t)minsize) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_STRING_TOO_SHORT);
ERR_add_error_dataf("minsize=%zu", (size_t)minsize);
return -1;
}
// Now work out output format and string type
int str_type;
int (*encode_func)(CBB *, uint32_t) = CBB_add_latin1;
size_t size_estimate = nchar;
int outform = MBSTRING_ASC;
if (mask & B_ASN1_PRINTABLESTRING) {
str_type = V_ASN1_PRINTABLESTRING;
} else if (mask & B_ASN1_IA5STRING) {
str_type = V_ASN1_IA5STRING;
} else if (mask & B_ASN1_T61STRING) {
str_type = V_ASN1_T61STRING;
} else if (mask & B_ASN1_BMPSTRING) {
str_type = V_ASN1_BMPSTRING;
outform = MBSTRING_BMP;
encode_func = CBB_add_ucs2_be;
size_estimate = 2 * nchar;
} else if (mask & B_ASN1_UNIVERSALSTRING) {
str_type = V_ASN1_UNIVERSALSTRING;
encode_func = CBB_add_utf32_be;
size_estimate = 4 * nchar;
outform = MBSTRING_UNIV;
} else if (mask & B_ASN1_UTF8STRING) {
str_type = V_ASN1_UTF8STRING;
outform = MBSTRING_UTF8;
encode_func = CBB_add_utf8;
size_estimate = utf8_len;
} else {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_CHARACTERS);
return -1;
}
if (!out) {
return str_type;
}
int free_dest = 0;
ASN1_STRING *dest;
if (*out) {
dest = *out;
} else {
free_dest = 1;
dest = ASN1_STRING_type_new(str_type);
if (!dest) {
return -1;
}
}
CBB cbb;
CBB_zero(&cbb);
// If both the same type just copy across
uint8_t *data = NULL;
size_t data_len = 0;
if (inform == outform) {
if (!ASN1_STRING_set(dest, in, len)) {
goto err;
}
dest->type = str_type;
*out = dest;
return str_type;
}
if (!CBB_init(&cbb, size_estimate + 1)) {
goto err;
}
CBS_init(&cbs, in, len);
while (CBS_len(&cbs) != 0) {
uint32_t c;
if (!decode_func(&cbs, &c) || !encode_func(&cbb, c)) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_INTERNAL_ERROR);
goto err;
}
}
if (/* OpenSSL historically NUL-terminated this value with a single byte,
* even for |MBSTRING_BMP| and |MBSTRING_UNIV|. */
!CBB_add_u8(&cbb, 0) || //
!CBB_finish(&cbb, &data, &data_len) || //
data_len < 1 || //
data_len > INT_MAX) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_INTERNAL_ERROR);
OPENSSL_free(data);
goto err;
}
dest->type = str_type;
ASN1_STRING_set0(dest, data, (int)data_len - 1);
*out = dest;
return str_type;
err:
if (free_dest) {
ASN1_STRING_free(dest);
}
CBB_cleanup(&cbb);
return -1;
}
int asn1_is_printable(uint32_t value) {
if (value > 0x7f) {
return 0;
}
return OPENSSL_isalnum(value) || //
value == ' ' || value == '\'' || value == '(' || value == ')' ||
value == '+' || value == ',' || value == '-' || value == '.' ||
value == '/' || value == ':' || value == '=' || value == '?';
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_object.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <limits.h>
#include <string.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include <CNIOBoringSSL_obj.h>
#include "../bytestring/internal.h"
#include "../internal.h"
#include "internal.h"
int i2d_ASN1_OBJECT(const ASN1_OBJECT *in, unsigned char **outp) {
if (in == NULL) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_PASSED_NULL_PARAMETER);
return -1;
}
if (in->length <= 0) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_OBJECT);
return -1;
}
CBB cbb, child;
if (!CBB_init(&cbb, (size_t)in->length + 2) ||
!CBB_add_asn1(&cbb, &child, CBS_ASN1_OBJECT) ||
!CBB_add_bytes(&child, in->data, in->length)) {
CBB_cleanup(&cbb);
return -1;
}
return CBB_finish_i2d(&cbb, outp);
}
int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a) {
return OBJ_obj2txt(buf, buf_len, a, 0);
}
static int write_str(BIO *bp, const char *str) {
size_t len = strlen(str);
if (len > INT_MAX) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_OVERFLOW);
return -1;
}
return BIO_write(bp, str, (int)len) == (int)len ? (int)len : -1;
}
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a) {
if (a == NULL || a->data == NULL) {
return write_str(bp, "NULL");
}
char buf[80], *allocated = NULL;
const char *str = buf;
int len = i2t_ASN1_OBJECT(buf, sizeof(buf), a);
if (len > (int)sizeof(buf) - 1) {
// The input was truncated. Allocate a buffer that fits.
allocated = reinterpret_cast<char *>(OPENSSL_malloc(len + 1));
if (allocated == NULL) {
return -1;
}
len = i2t_ASN1_OBJECT(allocated, len + 1, a);
str = allocated;
}
if (len <= 0) {
str = "<INVALID>";
}
int ret = write_str(bp, str);
OPENSSL_free(allocated);
return ret;
}
ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **out, const unsigned char **inp,
long len) {
if (len < 0) {
return NULL;
}
CBS cbs, child;
CBS_init(&cbs, *inp, (size_t)len);
if (!CBS_get_asn1(&cbs, &child, CBS_ASN1_OBJECT)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_DECODE_ERROR);
return NULL;
}
const uint8_t *contents = CBS_data(&child);
ASN1_OBJECT *ret = c2i_ASN1_OBJECT(out, &contents, CBS_len(&child));
if (ret != NULL) {
// |c2i_ASN1_OBJECT| should have consumed the entire input.
assert(CBS_data(&cbs) == contents);
*inp = CBS_data(&cbs);
}
return ret;
}
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **out, const unsigned char **inp,
long len) {
if (len < 0) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_OBJECT_ENCODING);
return NULL;
}
CBS cbs;
CBS_init(&cbs, *inp, (size_t)len);
if (!CBS_is_valid_asn1_oid(&cbs)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_OBJECT_ENCODING);
return NULL;
}
ASN1_OBJECT *ret = ASN1_OBJECT_create(NID_undef, *inp, (size_t)len,
/*sn=*/NULL, /*ln=*/NULL);
if (ret == NULL) {
return NULL;
}
if (out != NULL) {
ASN1_OBJECT_free(*out);
*out = ret;
}
*inp += len; // All bytes were consumed.
return ret;
}
ASN1_OBJECT *ASN1_OBJECT_new(void) {
ASN1_OBJECT *ret;
ret = (ASN1_OBJECT *)OPENSSL_malloc(sizeof(ASN1_OBJECT));
if (ret == NULL) {
return NULL;
}
ret->length = 0;
ret->data = NULL;
ret->nid = 0;
ret->sn = NULL;
ret->ln = NULL;
ret->flags = ASN1_OBJECT_FLAG_DYNAMIC;
return ret;
}
void ASN1_OBJECT_free(ASN1_OBJECT *a) {
if (a == NULL) {
return;
}
if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) {
OPENSSL_free((void *)a->sn);
OPENSSL_free((void *)a->ln);
a->sn = a->ln = NULL;
}
if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) {
OPENSSL_free((void *)a->data);
a->data = NULL;
a->length = 0;
}
if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC) {
OPENSSL_free(a);
}
}
ASN1_OBJECT *ASN1_OBJECT_create(int nid, const unsigned char *data, size_t len,
const char *sn, const char *ln) {
if (len > INT_MAX) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_STRING_TOO_LONG);
return NULL;
}
ASN1_OBJECT o;
o.sn = sn;
o.ln = ln;
o.data = data;
o.nid = nid;
o.length = (int)len;
o.flags = ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS |
ASN1_OBJECT_FLAG_DYNAMIC_DATA;
return OBJ_dup(&o);
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_octet.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *x) {
return ASN1_STRING_dup(x);
}
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
const ASN1_OCTET_STRING *b) {
return ASN1_STRING_cmp(a, b);
}
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d,
int len) {
return ASN1_STRING_set(x, d, len);
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_strex.cc
================================================
/*
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <assert.h>
#include <ctype.h>
#include <inttypes.h>
#include <limits.h>
#include <string.h>
#include <time.h>
#include <CNIOBoringSSL_bio.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_mem.h>
#include "../bytestring/internal.h"
#include "../internal.h"
#include "internal.h"
#define ESC_FLAGS \
(ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | \
ASN1_STRFLGS_ESC_MSB)
static int maybe_write(BIO *out, const void *buf, int len) {
// If |out| is NULL, ignore the output but report the length.
return out == NULL || BIO_write(out, buf, len) == len;
}
static int is_control_character(unsigned char c) { return c < 32 || c == 127; }
static int do_esc_char(uint32_t c, unsigned long flags, char *do_quotes,
BIO *out, int is_first, int is_last) {
// |c| is a |uint32_t| because, depending on |ASN1_STRFLGS_UTF8_CONVERT|,
// we may be escaping bytes or Unicode codepoints.
char buf[16]; // Large enough for "\\W01234567".
unsigned char u8 = (unsigned char)c;
if (c > 0xffff) {
snprintf(buf, sizeof(buf), "\\W%08" PRIX32, c);
} else if (c > 0xff) {
snprintf(buf, sizeof(buf), "\\U%04" PRIX32, c);
} else if ((flags & ASN1_STRFLGS_ESC_MSB) && c > 0x7f) {
snprintf(buf, sizeof(buf), "\\%02X", c);
} else if ((flags & ASN1_STRFLGS_ESC_CTRL) && is_control_character(c)) {
snprintf(buf, sizeof(buf), "\\%02X", c);
} else if (flags & ASN1_STRFLGS_ESC_2253) {
// See RFC 2253, sections 2.4 and 4.
if (c == '\\' || c == '"') {
// Quotes and backslashes are always escaped, quoted or not.
snprintf(buf, sizeof(buf), "\\%c", (int)c);
} else if (c == ',' || c == '+' || c == '<' || c == '>' || c == ';' ||
(is_first && (c == ' ' || c == '#')) ||
(is_last && (c == ' '))) {
if (flags & ASN1_STRFLGS_ESC_QUOTE) {
// No need to escape, just tell the caller to quote.
if (do_quotes != NULL) {
*do_quotes = 1;
}
return maybe_write(out, &u8, 1) ? 1 : -1;
}
snprintf(buf, sizeof(buf), "\\%c", (int)c);
} else {
return maybe_write(out, &u8, 1) ? 1 : -1;
}
} else if ((flags & ESC_FLAGS) && c == '\\') {
// If any escape flags are set, also escape backslashes.
snprintf(buf, sizeof(buf), "\\%c", (int)c);
} else {
return maybe_write(out, &u8, 1) ? 1 : -1;
}
static_assert(sizeof(buf) < INT_MAX, "len may not fit in int");
int len = (int)strlen(buf);
return maybe_write(out, buf, len) ? len : -1;
}
// This function sends each character in a buffer to do_esc_char(). It
// interprets the content formats and converts to or from UTF8 as
// appropriate.
static int do_buf(const unsigned char *buf, int buflen, int encoding,
unsigned long flags, char *quotes, BIO *out) {
int (*get_char)(CBS *cbs, uint32_t *out);
int get_char_error;
switch (encoding) {
case MBSTRING_UNIV:
get_char = CBS_get_utf32_be;
get_char_error = ASN1_R_INVALID_UNIVERSALSTRING;
break;
case MBSTRING_BMP:
get_char = CBS_get_ucs2_be;
get_char_error = ASN1_R_INVALID_BMPSTRING;
break;
case MBSTRING_ASC:
get_char = CBS_get_latin1;
get_char_error = ERR_R_INTERNAL_ERROR; // Should not be possible.
break;
case MBSTRING_UTF8:
get_char = CBS_get_utf8;
get_char_error = ASN1_R_INVALID_UTF8STRING;
break;
default:
assert(0);
return -1;
}
CBS cbs;
CBS_init(&cbs, buf, buflen);
int outlen = 0;
while (CBS_len(&cbs) != 0) {
const int is_first = CBS_data(&cbs) == buf;
uint32_t c;
if (!get_char(&cbs, &c)) {
OPENSSL_PUT_ERROR(ASN1, get_char_error);
return -1;
}
const int is_last = CBS_len(&cbs) == 0;
if (flags & ASN1_STRFLGS_UTF8_CONVERT) {
uint8_t utf8_buf[6];
CBB utf8_cbb;
CBB_init_fixed(&utf8_cbb, utf8_buf, sizeof(utf8_buf));
if (!CBB_add_utf8(&utf8_cbb, c)) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_INTERNAL_ERROR);
return 1;
}
size_t utf8_len = CBB_len(&utf8_cbb);
for (size_t i = 0; i < utf8_len; i++) {
int len = do_esc_char(utf8_buf[i], flags, quotes, out,
is_first && i == 0, is_last && i == utf8_len - 1);
if (len < 0) {
return -1;
}
outlen += len;
}
} else {
int len = do_esc_char(c, flags, quotes, out, is_first, is_last);
if (len < 0) {
return -1;
}
outlen += len;
}
}
return outlen;
}
// This function hex dumps a buffer of characters
static int do_hex_dump(BIO *out, unsigned char *buf, int buflen) {
static const char hexdig[] = "0123456789ABCDEF";
unsigned char *p, *q;
char hextmp[2];
if (out) {
p = buf;
q = buf + buflen;
while (p != q) {
hextmp[0] = hexdig[*p >> 4];
hextmp[1] = hexdig[*p & 0xf];
if (!maybe_write(out, hextmp, 2)) {
return -1;
}
p++;
}
}
return buflen << 1;
}
// "dump" a string. This is done when the type is unknown, or the flags
// request it. We can either dump the content octets or the entire DER
// encoding. This uses the RFC 2253 #01234 format.
static int do_dump(unsigned long flags, BIO *out, const ASN1_STRING *str) {
if (!maybe_write(out, "#", 1)) {
return -1;
}
// If we don't dump DER encoding just dump content octets
if (!(flags & ASN1_STRFLGS_DUMP_DER)) {
int outlen = do_hex_dump(out, str->data, str->length);
if (outlen < 0) {
return -1;
}
return outlen + 1;
}
// Placing the ASN1_STRING in a temporary ASN1_TYPE allows the DER encoding
// to readily obtained.
ASN1_TYPE t;
OPENSSL_memset(&t, 0, sizeof(ASN1_TYPE));
asn1_type_set0_string(&t, (ASN1_STRING *)str);
unsigned char *der_buf = NULL;
int der_len = i2d_ASN1_TYPE(&t, &der_buf);
if (der_len < 0) {
return -1;
}
int outlen = do_hex_dump(out, der_buf, der_len);
OPENSSL_free(der_buf);
if (outlen < 0) {
return -1;
}
return outlen + 1;
}
// string_type_to_encoding returns the |MBSTRING_*| constant for the encoding
// used by the |ASN1_STRING| type |type|, or -1 if |tag| is not a string
// type.
static int string_type_to_encoding(int type) {
// This function is sometimes passed ASN.1 universal types and sometimes
// passed |ASN1_STRING| type values
switch (type) {
case V_ASN1_UTF8STRING:
return MBSTRING_UTF8;
case V_ASN1_NUMERICSTRING:
case V_ASN1_PRINTABLESTRING:
case V_ASN1_T61STRING:
case V_ASN1_IA5STRING:
case V_ASN1_UTCTIME:
case V_ASN1_GENERALIZEDTIME:
case V_ASN1_ISO64STRING:
// |MBSTRING_ASC| refers to Latin-1, not ASCII.
return MBSTRING_ASC;
case V_ASN1_UNIVERSALSTRING:
return MBSTRING_UNIV;
case V_ASN1_BMPSTRING:
return MBSTRING_BMP;
}
return -1;
}
// This is the main function, print out an ASN1_STRING taking note of various
// escape and display options. Returns number of characters written or -1 if
// an error occurred.
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str,
unsigned long flags) {
int type = str->type;
int outlen = 0;
if (flags & ASN1_STRFLGS_SHOW_TYPE) {
const char *tagname = ASN1_tag2str(type);
outlen += strlen(tagname);
if (!maybe_write(out, tagname, outlen) || !maybe_write(out, ":", 1)) {
return -1;
}
outlen++;
}
// Decide what to do with |str|, either dump the contents or display it.
int encoding;
if (flags & ASN1_STRFLGS_DUMP_ALL) {
// Dump everything.
encoding = -1;
} else if (flags & ASN1_STRFLGS_IGNORE_TYPE) {
// Ignore the string type and interpret the contents as Latin-1.
encoding = MBSTRING_ASC;
} else {
encoding = string_type_to_encoding(type);
if (encoding == -1 && (flags & ASN1_STRFLGS_DUMP_UNKNOWN) == 0) {
encoding = MBSTRING_ASC;
}
}
if (encoding == -1) {
int len = do_dump(flags, out, str);
if (len < 0) {
return -1;
}
outlen += len;
return outlen;
}
// Measure the length.
char quotes = 0;
int len = do_buf(str->data, str->length, encoding, flags, "es, NULL);
if (len < 0) {
return -1;
}
outlen += len;
if (quotes) {
outlen += 2;
}
if (!out) {
return outlen;
}
// Encode the value.
if ((quotes && !maybe_write(out, "\"", 1)) ||
do_buf(str->data, str->length, encoding, flags, NULL, out) < 0 ||
(quotes && !maybe_write(out, "\"", 1))) {
return -1;
}
return outlen;
}
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str,
unsigned long flags) {
BIO *bio = NULL;
if (fp != NULL) {
// If |fp| is NULL, this function returns the number of bytes without
// writing.
bio = BIO_new_fp(fp, BIO_NOCLOSE);
if (bio == NULL) {
return -1;
}
}
int ret = ASN1_STRING_print_ex(bio, str, flags);
BIO_free(bio);
return ret;
}
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) {
if (!in) {
return -1;
}
int mbflag = string_type_to_encoding(in->type);
if (mbflag == -1) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_UNKNOWN_TAG);
return -1;
}
ASN1_STRING stmp, *str = &stmp;
stmp.data = NULL;
stmp.length = 0;
stmp.flags = 0;
int ret =
ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
if (ret < 0) {
return ret;
}
*out = stmp.data;
return stmp.length;
}
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v) {
int i, n;
char buf[80];
const char *p;
if (v == NULL) {
return 0;
}
n = 0;
p = (const char *)v->data;
for (i = 0; i < v->length; i++) {
if ((p[i] > '~') || ((p[i] < ' ') && (p[i] != '\n') && (p[i] != '\r'))) {
buf[n] = '.';
} else {
buf[n] = p[i];
}
n++;
if (n >= 80) {
if (BIO_write(bp, buf, n) <= 0) {
return 0;
}
n = 0;
}
}
if (n > 0) {
if (BIO_write(bp, buf, n) <= 0) {
return 0;
}
}
return 1;
}
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) {
if (tm->type == V_ASN1_UTCTIME) {
return ASN1_UTCTIME_print(bp, tm);
}
if (tm->type == V_ASN1_GENERALIZEDTIME) {
return ASN1_GENERALIZEDTIME_print(bp, tm);
}
BIO_puts(bp, "Bad time value");
return 0;
}
static const char *const mon[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm) {
CBS cbs;
CBS_init(&cbs, tm->data, tm->length);
struct tm utc;
if (!CBS_parse_generalized_time(&cbs, &utc, /*allow_timezone_offset=*/0)) {
BIO_puts(bp, "Bad time value");
return 0;
}
return BIO_printf(bp, "%s %2d %02d:%02d:%02d %d GMT", mon[utc.tm_mon],
utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec,
utc.tm_year + 1900) > 0;
}
int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm) {
CBS cbs;
CBS_init(&cbs, tm->data, tm->length);
struct tm utc;
if (!CBS_parse_utc_time(&cbs, &utc, /*allow_timezone_offset=*/0)) {
BIO_puts(bp, "Bad time value");
return 0;
}
return BIO_printf(bp, "%s %2d %02d:%02d:%02d %d GMT", mon[utc.tm_mon],
utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec,
utc.tm_year + 1900) > 0;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_strnid.cc
================================================
/*
* Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include <CNIOBoringSSL_obj.h>
#include "../internal.h"
#include "../lhash/internal.h"
#include "internal.h"
DEFINE_LHASH_OF(ASN1_STRING_TABLE)
static LHASH_OF(ASN1_STRING_TABLE) *string_tables = NULL;
static CRYPTO_MUTEX string_tables_lock = CRYPTO_MUTEX_INIT;
void ASN1_STRING_set_default_mask(unsigned long mask) {}
unsigned long ASN1_STRING_get_default_mask(void) { return B_ASN1_UTF8STRING; }
int ASN1_STRING_set_default_mask_asc(const char *p) { return 1; }
static const ASN1_STRING_TABLE *asn1_string_table_get(int nid);
// The following function generates an ASN1_STRING based on limits in a
// table. Frequently the types and length of an ASN1_STRING are restricted by
// a corresponding OID. For example certificates and certificate requests.
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
ossl_ssize_t len, int inform, int nid) {
ASN1_STRING *str = NULL;
int ret;
if (!out) {
out = &str;
}
const ASN1_STRING_TABLE *tbl = asn1_string_table_get(nid);
if (tbl != NULL) {
unsigned long mask = tbl->mask;
if (!(tbl->flags & STABLE_NO_MASK)) {
mask &= B_ASN1_UTF8STRING;
}
ret = ASN1_mbstring_ncopy(out, in, len, inform, mask, tbl->minsize,
tbl->maxsize);
} else {
ret = ASN1_mbstring_copy(out, in, len, inform, B_ASN1_UTF8STRING);
}
if (ret <= 0) {
return NULL;
}
return *out;
}
// Now the tables and helper functions for the string table:
// See RFC 5280.
#define ub_name 32768
#define ub_common_name 64
#define ub_locality_name 128
#define ub_state_name 128
#define ub_organization_name 64
#define ub_organization_unit_name 64
#define ub_email_address 128
#define ub_serial_number 64
// This table must be kept in NID order
static const ASN1_STRING_TABLE tbl_standard[] = {
{NID_commonName, 1, ub_common_name, DIRSTRING_TYPE, 0},
{NID_countryName, 2, 2, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
{NID_localityName, 1, ub_locality_name, DIRSTRING_TYPE, 0},
{NID_stateOrProvinceName, 1, ub_state_name, DIRSTRING_TYPE, 0},
{NID_organizationName, 1, ub_organization_name, DIRSTRING_TYPE, 0},
{NID_organizationalUnitName, 1, ub_organization_unit_name, DIRSTRING_TYPE,
0},
{NID_pkcs9_emailAddress, 1, ub_email_address, B_ASN1_IA5STRING,
STABLE_NO_MASK},
{NID_pkcs9_unstructuredName, 1, -1, PKCS9STRING_TYPE, 0},
{NID_pkcs9_challengePassword, 1, -1, PKCS9STRING_TYPE, 0},
{NID_pkcs9_unstructuredAddress, 1, -1, DIRSTRING_TYPE, 0},
{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
{NID_serialNumber, 1, ub_serial_number, B_ASN1_PRINTABLESTRING,
STABLE_NO_MASK},
{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
{NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
{NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}};
static int table_cmp(const ASN1_STRING_TABLE *a, const ASN1_STRING_TABLE *b) {
if (a->nid < b->nid) {
return -1;
}
if (a->nid > b->nid) {
return 1;
}
return 0;
}
static int table_cmp_void(const void *a, const void *b) {
return table_cmp(reinterpret_cast<const ASN1_STRING_TABLE *>(a),
reinterpret_cast<const ASN1_STRING_TABLE *>(b));
}
static uint32_t table_hash(const ASN1_STRING_TABLE *tbl) {
return OPENSSL_hash32(&tbl->nid, sizeof(tbl->nid));
}
static const ASN1_STRING_TABLE *asn1_string_table_get(int nid) {
ASN1_STRING_TABLE key;
key.nid = nid;
const ASN1_STRING_TABLE *tbl = reinterpret_cast<ASN1_STRING_TABLE *>(
bsearch(&key, tbl_standard, OPENSSL_ARRAY_SIZE(tbl_standard),
sizeof(ASN1_STRING_TABLE), table_cmp_void));
if (tbl != NULL) {
return tbl;
}
CRYPTO_MUTEX_lock_read(&string_tables_lock);
if (string_tables != NULL) {
tbl = lh_ASN1_STRING_TABLE_retrieve(string_tables, &key);
}
CRYPTO_MUTEX_unlock_read(&string_tables_lock);
// Note returning |tbl| without the lock is only safe because
// |ASN1_STRING_TABLE_add| cannot modify or delete existing entries. If we
// wish to support that, this function must copy the result under a lock.
return tbl;
}
int ASN1_STRING_TABLE_add(int nid, long minsize, long maxsize,
unsigned long mask, unsigned long flags) {
// Existing entries cannot be overwritten.
if (asn1_string_table_get(nid) != NULL) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
int ret = 0;
CRYPTO_MUTEX_lock_write(&string_tables_lock);
ASN1_STRING_TABLE *tbl = NULL;
if (string_tables == NULL) {
string_tables = lh_ASN1_STRING_TABLE_new(table_hash, table_cmp);
if (string_tables == NULL) {
goto err;
}
} else {
// Check again for an existing entry. One may have been added while
// unlocked.
ASN1_STRING_TABLE key;
key.nid = nid;
if (lh_ASN1_STRING_TABLE_retrieve(string_tables, &key) != NULL) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
goto err;
}
}
tbl = reinterpret_cast<ASN1_STRING_TABLE *>(
OPENSSL_malloc(sizeof(ASN1_STRING_TABLE)));
if (tbl == NULL) {
goto err;
}
tbl->nid = nid;
tbl->flags = flags;
tbl->minsize = minsize;
tbl->maxsize = maxsize;
tbl->mask = mask;
ASN1_STRING_TABLE *old_tbl;
if (!lh_ASN1_STRING_TABLE_insert(string_tables, &old_tbl, tbl)) {
OPENSSL_free(tbl);
goto err;
}
assert(old_tbl == NULL);
ret = 1;
err:
CRYPTO_MUTEX_unlock_write(&string_tables_lock);
return ret;
}
void ASN1_STRING_TABLE_cleanup(void) {}
void asn1_get_string_table_for_testing(const ASN1_STRING_TABLE **out_ptr,
size_t *out_len) {
*out_ptr = tbl_standard;
*out_len = OPENSSL_ARRAY_SIZE(tbl_standard);
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_time.cc
================================================
/*
* Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_posix_time.h>
#include <string.h>
#include <time.h>
#include <CNIOBoringSSL_asn1t.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include "internal.h"
// This is an implementation of the ASN1 Time structure which is: Time ::=
// CHOICE { utcTime UTCTime, generalTime GeneralizedTime } written by Steve
// Henson.
IMPLEMENT_ASN1_MSTRING(ASN1_TIME, B_ASN1_TIME)
IMPLEMENT_ASN1_FUNCTIONS_const(ASN1_TIME)
ASN1_TIME *ASN1_TIME_set_posix(ASN1_TIME *s, int64_t posix_time) {
return ASN1_TIME_adj(s, posix_time, 0, 0);
}
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t time) {
return ASN1_TIME_adj(s, time, 0, 0);
}
static int fits_in_utc_time(const struct tm *tm) {
return 50 <= tm->tm_year && tm->tm_year < 150;
}
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, int64_t posix_time, int offset_day,
long offset_sec) {
struct tm tm;
if (!OPENSSL_posix_to_tm(posix_time, &tm)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ERROR_GETTING_TIME);
return NULL;
}
if (offset_day || offset_sec) {
if (!OPENSSL_gmtime_adj(&tm, offset_day, offset_sec)) {
return NULL;
}
}
if (fits_in_utc_time(&tm)) {
return ASN1_UTCTIME_adj(s, posix_time, offset_day, offset_sec);
}
return ASN1_GENERALIZEDTIME_adj(s, posix_time, offset_day, offset_sec);
}
int ASN1_TIME_check(const ASN1_TIME *t) {
if (t->type == V_ASN1_GENERALIZEDTIME) {
return ASN1_GENERALIZEDTIME_check(t);
} else if (t->type == V_ASN1_UTCTIME) {
return ASN1_UTCTIME_check(t);
}
return 0;
}
// Convert an ASN1_TIME structure to GeneralizedTime
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *in,
ASN1_GENERALIZEDTIME **out) {
if (!ASN1_TIME_check(in)) {
return NULL;
}
ASN1_GENERALIZEDTIME *ret = NULL;
if (!out || !*out) {
if (!(ret = ASN1_GENERALIZEDTIME_new())) {
goto err;
}
} else {
ret = *out;
}
// If already GeneralizedTime just copy across
if (in->type == V_ASN1_GENERALIZEDTIME) {
if (!ASN1_STRING_set(ret, in->data, in->length)) {
goto err;
}
goto done;
}
// Grow the string to accomodate the two-digit century.
if (!ASN1_STRING_set(ret, NULL, in->length + 2)) {
goto err;
}
{
char *const out_str = (char *)ret->data;
// |ASN1_STRING_set| also allocates an additional byte for a trailing NUL.
const size_t out_str_capacity = in->length + 2 + 1;
// Work out the century and prepend
if (in->data[0] >= '5') {
OPENSSL_strlcpy(out_str, "19", out_str_capacity);
} else {
OPENSSL_strlcpy(out_str, "20", out_str_capacity);
}
OPENSSL_strlcat(out_str, (const char *)in->data, out_str_capacity);
}
done:
if (out != NULL && *out == NULL) {
*out = ret;
}
return ret;
err:
if (out == NULL || *out != ret) {
ASN1_GENERALIZEDTIME_free(ret);
}
return NULL;
}
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str) {
return ASN1_UTCTIME_set_string(s, str) ||
ASN1_GENERALIZEDTIME_set_string(s, str);
}
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str) {
CBS cbs;
CBS_init(&cbs, (const uint8_t *)str, strlen(str));
int type;
struct tm tm;
if (CBS_parse_utc_time(&cbs, /*out_tm=*/NULL,
/*allow_timezone_offset=*/0)) {
type = V_ASN1_UTCTIME;
} else if (CBS_parse_generalized_time(&cbs, &tm,
/*allow_timezone_offset=*/0)) {
type = V_ASN1_GENERALIZEDTIME;
if (fits_in_utc_time(&tm)) {
type = V_ASN1_UTCTIME;
CBS_skip(&cbs, 2);
}
} else {
return 0;
}
if (s != NULL) {
if (!ASN1_STRING_set(s, CBS_data(&cbs), CBS_len(&cbs))) {
return 0;
}
s->type = type;
}
return 1;
}
static int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *t,
int allow_timezone_offset) {
if (t == NULL) {
if (OPENSSL_posix_to_tm(time(NULL), tm)) {
return 1;
}
return 0;
}
if (t->type == V_ASN1_UTCTIME) {
return asn1_utctime_to_tm(tm, t, allow_timezone_offset);
} else if (t->type == V_ASN1_GENERALIZEDTIME) {
return asn1_generalizedtime_to_tm(tm, t);
}
return 0;
}
int ASN1_TIME_diff(int *out_days, int *out_seconds, const ASN1_TIME *from,
const ASN1_TIME *to) {
struct tm tm_from, tm_to;
if (!asn1_time_to_tm(&tm_from, from, /*allow_timezone_offset=*/1)) {
return 0;
}
if (!asn1_time_to_tm(&tm_to, to, /*allow_timezone_offset=*/1)) {
return 0;
}
return OPENSSL_gmtime_diff(out_days, out_seconds, &tm_from, &tm_to);
}
int ASN1_TIME_to_posix_nonstandard(const ASN1_TIME *t, int64_t *out_time) {
struct tm tm;
if (!asn1_time_to_tm(&tm, t, /*allow_timezone_offset=*/1)) {
return 0;
}
return OPENSSL_tm_to_posix(&tm, out_time);
}
// The functions below do *not* permissively allow the use of four digit
// timezone offsets in UTC times, as is done elsewhere in the code. They are
// both new API, and used internally to X509_cmp_time. This is to discourage the
// use of nonstandard times in new code, and to ensure that this code behaves
// correctly in X509_cmp_time which historically did its own time validations
// slightly different than the many other copies of X.509 time validation
// sprinkled through the codebase. The custom checks in X509_cmp_time meant that
// it did not allow four digit timezone offsets in UTC times.
int ASN1_TIME_to_time_t(const ASN1_TIME *t, time_t *out_time) {
struct tm tm;
if (!asn1_time_to_tm(&tm, t, /*allow_timezone_offset=*/0)) {
return 0;
}
return OPENSSL_timegm(&tm, out_time);
}
int ASN1_TIME_to_posix(const ASN1_TIME *t, int64_t *out_time) {
struct tm tm;
if (!asn1_time_to_tm(&tm, t, /*allow_timezone_offset=*/0)) {
return 0;
}
return OPENSSL_tm_to_posix(&tm, out_time);
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_type.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <assert.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include <CNIOBoringSSL_obj.h>
#include "internal.h"
int ASN1_TYPE_get(const ASN1_TYPE *a) {
switch (a->type) {
case V_ASN1_NULL:
case V_ASN1_BOOLEAN:
return a->type;
case V_ASN1_OBJECT:
return a->value.object != NULL ? a->type : 0;
default:
return a->value.asn1_string != NULL ? a->type : 0;
}
}
const void *asn1_type_value_as_pointer(const ASN1_TYPE *a) {
switch (a->type) {
case V_ASN1_NULL:
return NULL;
case V_ASN1_BOOLEAN:
return a->value.boolean ? (void *)0xff : NULL;
case V_ASN1_OBJECT:
return a->value.object;
default:
return a->value.asn1_string;
}
}
void asn1_type_set0_string(ASN1_TYPE *a, ASN1_STRING *str) {
// |ASN1_STRING| types are almost the same as |ASN1_TYPE| types, except that
// the negative flag is not reflected into |ASN1_TYPE|.
int type = str->type;
if (type == V_ASN1_NEG_INTEGER) {
type = V_ASN1_INTEGER;
} else if (type == V_ASN1_NEG_ENUMERATED) {
type = V_ASN1_ENUMERATED;
}
// These types are not |ASN1_STRING| types and use a different
// representation when stored in |ASN1_TYPE|.
assert(type != V_ASN1_NULL && type != V_ASN1_OBJECT &&
type != V_ASN1_BOOLEAN);
ASN1_TYPE_set(a, type, str);
}
void asn1_type_cleanup(ASN1_TYPE *a) {
switch (a->type) {
case V_ASN1_NULL:
a->value.ptr = NULL;
break;
case V_ASN1_BOOLEAN:
a->value.boolean = ASN1_BOOLEAN_NONE;
break;
case V_ASN1_OBJECT:
ASN1_OBJECT_free(a->value.object);
a->value.object = NULL;
break;
default:
ASN1_STRING_free(a->value.asn1_string);
a->value.asn1_string = NULL;
break;
}
}
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value) {
asn1_type_cleanup(a);
a->type = type;
switch (type) {
case V_ASN1_NULL:
a->value.ptr = NULL;
break;
case V_ASN1_BOOLEAN:
a->value.boolean = value ? ASN1_BOOLEAN_TRUE : ASN1_BOOLEAN_FALSE;
break;
case V_ASN1_OBJECT:
a->value.object = reinterpret_cast<ASN1_OBJECT *>(value);
break;
default:
a->value.asn1_string = reinterpret_cast<ASN1_STRING *>(value);
break;
}
}
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value) {
if (!value || (type == V_ASN1_BOOLEAN)) {
void *p = (void *)value;
ASN1_TYPE_set(a, type, p);
} else if (type == V_ASN1_OBJECT) {
ASN1_OBJECT *odup;
odup = OBJ_dup(reinterpret_cast<const ASN1_OBJECT *>(value));
if (!odup) {
return 0;
}
ASN1_TYPE_set(a, type, odup);
} else {
ASN1_STRING *sdup;
sdup = ASN1_STRING_dup(reinterpret_cast<const ASN1_STRING *>(value));
if (!sdup) {
return 0;
}
ASN1_TYPE_set(a, type, sdup);
}
return 1;
}
// Returns 0 if they are equal, != 0 otherwise.
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) {
int result = -1;
if (!a || !b || a->type != b->type) {
return -1;
}
switch (a->type) {
case V_ASN1_OBJECT:
result = OBJ_cmp(a->value.object, b->value.object);
break;
case V_ASN1_NULL:
result = 0; // They do not have content.
break;
case V_ASN1_BOOLEAN:
result = a->value.boolean - b->value.boolean;
break;
case V_ASN1_INTEGER:
case V_ASN1_ENUMERATED:
case V_ASN1_BIT_STRING:
case V_ASN1_OCTET_STRING:
case V_ASN1_SEQUENCE:
case V_ASN1_SET:
case V_ASN1_NUMERICSTRING:
case V_ASN1_PRINTABLESTRING:
case V_ASN1_T61STRING:
case V_ASN1_VIDEOTEXSTRING:
case V_ASN1_IA5STRING:
case V_ASN1_UTCTIME:
case V_ASN1_GENERALIZEDTIME:
case V_ASN1_GRAPHICSTRING:
case V_ASN1_VISIBLESTRING:
case V_ASN1_GENERALSTRING:
case V_ASN1_UNIVERSALSTRING:
case V_ASN1_BMPSTRING:
case V_ASN1_UTF8STRING:
case V_ASN1_OTHER:
default:
result = ASN1_STRING_cmp(a->value.asn1_string, b->value.asn1_string);
break;
}
return result;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_utctm.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include <CNIOBoringSSL_posix_time.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "internal.h"
int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d,
int allow_timezone_offset) {
if (d->type != V_ASN1_UTCTIME) {
return 0;
}
CBS cbs;
CBS_init(&cbs, d->data, (size_t)d->length);
if (!CBS_parse_utc_time(&cbs, tm, allow_timezone_offset)) {
return 0;
}
return 1;
}
int ASN1_UTCTIME_check(const ASN1_UTCTIME *d) {
return asn1_utctime_to_tm(NULL, d, /*allow_timezone_offset=*/1);
}
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str) {
// Although elsewhere we allow timezone offsets with UTCTime, to be compatible
// with some existing misissued certificates, this function is used to
// construct new certificates and can be stricter.
size_t len = strlen(str);
CBS cbs;
CBS_init(&cbs, (const uint8_t *)str, len);
if (!CBS_parse_utc_time(&cbs, /*out_tm=*/NULL,
/*allow_timezone_offset=*/0)) {
return 0;
}
if (s != NULL) {
if (!ASN1_STRING_set(s, str, len)) {
return 0;
}
s->type = V_ASN1_UTCTIME;
}
return 1;
}
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, int64_t posix_time) {
return ASN1_UTCTIME_adj(s, posix_time, 0, 0);
}
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, int64_t posix_time,
int offset_day, long offset_sec) {
struct tm data;
if (!OPENSSL_posix_to_tm(posix_time, &data)) {
return NULL;
}
if (offset_day || offset_sec) {
if (!OPENSSL_gmtime_adj(&data, offset_day, offset_sec)) {
return NULL;
}
}
if (data.tm_year < 50 || data.tm_year >= 150) {
return NULL;
}
char buf[14];
int ret = snprintf(buf, sizeof(buf), "%02d%02d%02d%02d%02d%02dZ",
data.tm_year % 100, data.tm_mon + 1, data.tm_mday,
data.tm_hour, data.tm_min, data.tm_sec);
// |snprintf| must write exactly 15 bytes (plus the NUL) to the buffer.
BSSL_CHECK(ret == static_cast<int>(sizeof(buf) - 1));
int free_s = 0;
if (s == NULL) {
free_s = 1;
s = ASN1_UTCTIME_new();
if (s == NULL) {
return NULL;
}
}
if (!ASN1_STRING_set(s, buf, strlen(buf))) {
if (free_s) {
ASN1_UTCTIME_free(s);
}
return NULL;
}
s->type = V_ASN1_UTCTIME;
return s;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/asn1_lib.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <limits.h>
#include <string.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include "../internal.h"
#include "internal.h"
// Cross-module errors from crypto/x509/i2d_pr.c.
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNSUPPORTED_PUBLIC_KEY_TYPE)
// Cross-module errors from crypto/x509/algorithm.c.
OPENSSL_DECLARE_ERROR_REASON(ASN1, CONTEXT_NOT_INITIALISED)
OPENSSL_DECLARE_ERROR_REASON(ASN1, DIGEST_AND_KEY_TYPE_NOT_SUPPORTED)
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNKNOWN_MESSAGE_DIGEST_ALGORITHM)
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNKNOWN_SIGNATURE_ALGORITHM)
OPENSSL_DECLARE_ERROR_REASON(ASN1, WRONG_PUBLIC_KEY_TYPE)
// Cross-module errors from crypto/x509/asn1_gen.c. TODO(davidben): Remove
// these once asn1_gen.c is gone.
OPENSSL_DECLARE_ERROR_REASON(ASN1, DEPTH_EXCEEDED)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_BITSTRING_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_BOOLEAN)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_HEX)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_IMPLICIT_TAG)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_INTEGER)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_NESTED_TAGGING)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_NULL_VALUE)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_OBJECT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, ILLEGAL_TIME_VALUE)
OPENSSL_DECLARE_ERROR_REASON(ASN1, INTEGER_NOT_ASCII_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, INVALID_MODIFIER)
OPENSSL_DECLARE_ERROR_REASON(ASN1, INVALID_NUMBER)
OPENSSL_DECLARE_ERROR_REASON(ASN1, LIST_ERROR)
OPENSSL_DECLARE_ERROR_REASON(ASN1, MISSING_VALUE)
OPENSSL_DECLARE_ERROR_REASON(ASN1, NOT_ASCII_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, OBJECT_NOT_ASCII_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, SEQUENCE_OR_SET_NEEDS_CONFIG)
OPENSSL_DECLARE_ERROR_REASON(ASN1, TIME_NOT_ASCII_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNKNOWN_FORMAT)
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNKNOWN_TAG)
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNSUPPORTED_TYPE)
// Limit |ASN1_STRING|s to 64 MiB of data. Most of this module, as well as
// downstream code, does not correctly handle overflow. We cap string fields
// more tightly than strictly necessary to fit in |int|. This is not expected to
// impact real world uses of this field.
//
// In particular, this limit is small enough that the bit count of a BIT STRING
// comfortably fits in an |int|, with room for arithmetic.
#define ASN1_STRING_MAX (64 * 1024 * 1024)
static void asn1_put_length(unsigned char **pp, int length);
int ASN1_get_object(const unsigned char **inp, long *out_len, int *out_tag,
int *out_class, long in_len) {
if (in_len < 0) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_HEADER_TOO_LONG);
return 0x80;
}
CBS_ASN1_TAG tag;
CBS cbs, body;
CBS_init(&cbs, *inp, (size_t)in_len);
if (!CBS_get_any_asn1(&cbs, &body, &tag) ||
// Bound the length to comfortably fit in an int. Lengths in this
// module often switch between int and long without overflow checks.
CBS_len(&body) > INT_MAX / 2) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_HEADER_TOO_LONG);
return 0x80;
}
// Convert between tag representations.
int tag_class = (tag & CBS_ASN1_CLASS_MASK) >> CBS_ASN1_TAG_SHIFT;
int constructed = (tag & CBS_ASN1_CONSTRUCTED) >> CBS_ASN1_TAG_SHIFT;
int tag_number = tag & CBS_ASN1_TAG_NUMBER_MASK;
// To avoid ambiguity with V_ASN1_NEG, impose a limit on universal tags.
if (tag_class == V_ASN1_UNIVERSAL && tag_number > V_ASN1_MAX_UNIVERSAL) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_HEADER_TOO_LONG);
return 0x80;
}
*inp = CBS_data(&body);
*out_len = CBS_len(&body);
*out_tag = tag_number;
*out_class = tag_class;
return constructed;
}
// class 0 is constructed constructed == 2 for indefinite length constructed
void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag,
int xclass) {
unsigned char *p = *pp;
int i, ttag;
i = (constructed) ? V_ASN1_CONSTRUCTED : 0;
i |= (xclass & V_ASN1_PRIVATE);
if (tag < 31) {
*(p++) = i | (tag & V_ASN1_PRIMITIVE_TAG);
} else {
*(p++) = i | V_ASN1_PRIMITIVE_TAG;
for (i = 0, ttag = tag; ttag > 0; i++) {
ttag >>= 7;
}
ttag = i;
while (i-- > 0) {
p[i] = tag & 0x7f;
if (i != (ttag - 1)) {
p[i] |= 0x80;
}
tag >>= 7;
}
p += ttag;
}
if (constructed == 2) {
*(p++) = 0x80;
} else {
asn1_put_length(&p, length);
}
*pp = p;
}
int ASN1_put_eoc(unsigned char **pp) {
// This function is no longer used in the library, but some external code
// uses it.
unsigned char *p = *pp;
*p++ = 0;
*p++ = 0;
*pp = p;
return 2;
}
static void asn1_put_length(unsigned char **pp, int length) {
unsigned char *p = *pp;
int i, l;
if (length <= 127) {
*(p++) = (unsigned char)length;
} else {
l = length;
for (i = 0; l > 0; i++) {
l >>= 8;
}
*(p++) = i | 0x80;
l = i;
while (i-- > 0) {
p[i] = length & 0xff;
length >>= 8;
}
p += l;
}
*pp = p;
}
int ASN1_object_size(int constructed, int length, int tag) {
int ret = 1;
if (length < 0) {
return -1;
}
if (tag >= 31) {
while (tag > 0) {
tag >>= 7;
ret++;
}
}
if (constructed == 2) {
ret += 3;
} else {
ret++;
if (length > 127) {
int tmplen = length;
while (tmplen > 0) {
tmplen >>= 8;
ret++;
}
}
}
if (ret >= INT_MAX - length) {
return -1;
}
return ret + length;
}
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str) {
if (str == NULL) {
return 0;
}
if (!ASN1_STRING_set(dst, str->data, str->length)) {
return 0;
}
dst->type = str->type;
dst->flags = str->flags;
return 1;
}
ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *str) {
ASN1_STRING *ret;
if (!str) {
return NULL;
}
ret = ASN1_STRING_new();
if (!ret) {
return NULL;
}
if (!ASN1_STRING_copy(ret, str)) {
ASN1_STRING_free(ret);
return NULL;
}
return ret;
}
int ASN1_STRING_set(ASN1_STRING *str, const void *_data, ossl_ssize_t len_s) {
const char *data = reinterpret_cast<const char *>(_data);
size_t len;
if (len_s < 0) {
if (data == NULL) {
return 0;
}
len = strlen(data);
} else {
len = (size_t)len_s;
}
static_assert(ASN1_STRING_MAX < INT_MAX, "len will not overflow int");
if (len > ASN1_STRING_MAX) {
OPENSSL_PUT_ERROR(ASN1, ERR_R_OVERFLOW);
return 0;
}
if (str->length <= (int)len || str->data == NULL) {
unsigned char *c = str->data;
if (c == NULL) {
str->data = reinterpret_cast<uint8_t *>(OPENSSL_malloc(len + 1));
} else {
str->data = reinterpret_cast<uint8_t *>(OPENSSL_realloc(c, len + 1));
}
if (str->data == NULL) {
str->data = c;
return 0;
}
}
str->length = (int)len;
if (data != NULL) {
OPENSSL_memcpy(str->data, data, len);
// Historically, OpenSSL would NUL-terminate most (but not all)
// |ASN1_STRING|s, in case anyone accidentally passed |str->data| into a
// function expecting a C string. We retain this behavior for compatibility,
// but code must not rely on this. See CVE-2021-3712.
str->data[len] = '\0';
}
return 1;
}
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) {
OPENSSL_free(str->data);
str->data = reinterpret_cast<uint8_t *>(data);
str->length = len;
}
ASN1_STRING *ASN1_STRING_new(void) {
return (ASN1_STRING_type_new(V_ASN1_OCTET_STRING));
}
ASN1_STRING *ASN1_STRING_type_new(int type) {
ASN1_STRING *ret;
ret = (ASN1_STRING *)OPENSSL_malloc(sizeof(ASN1_STRING));
if (ret == NULL) {
return NULL;
}
ret->length = 0;
ret->type = type;
ret->data = NULL;
ret->flags = 0;
return ret;
}
void ASN1_STRING_free(ASN1_STRING *str) {
if (str == NULL) {
return;
}
OPENSSL_free(str->data);
OPENSSL_free(str);
}
int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) {
// Capture padding bits and implicit truncation in BIT STRINGs.
int a_length = a->length, b_length = b->length;
uint8_t a_padding = 0, b_padding = 0;
if (a->type == V_ASN1_BIT_STRING) {
a_length = asn1_bit_string_length(a, &a_padding);
}
if (b->type == V_ASN1_BIT_STRING) {
b_length = asn1_bit_string_length(b, &b_padding);
}
if (a_length < b_length) {
return -1;
}
if (a_length > b_length) {
return 1;
}
// In a BIT STRING, the number of bits is 8 * length - padding. Invert this
// comparison so we compare by lengths.
if (a_padding > b_padding) {
return -1;
}
if (a_padding < b_padding) {
return 1;
}
int ret = OPENSSL_memcmp(a->data, b->data, a_length);
if (ret != 0) {
return ret;
}
// Comparing the type first is more natural, but this matches OpenSSL.
if (a->type < b->type) {
return -1;
}
if (a->type > b->type) {
return 1;
}
return 0;
}
int ASN1_STRING_length(const ASN1_STRING *str) { return str->length; }
int ASN1_STRING_type(const ASN1_STRING *str) { return str->type; }
unsigned char *ASN1_STRING_data(ASN1_STRING *str) { return str->data; }
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *str) {
return str->data;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/asn1_par.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
const char *ASN1_tag2str(int tag) {
static const char *const tag2str[] = {
"EOC",
"BOOLEAN",
"INTEGER",
"BIT STRING",
"OCTET STRING",
"NULL",
"OBJECT",
"OBJECT DESCRIPTOR",
"EXTERNAL",
"REAL",
"ENUMERATED",
"<ASN1 11>",
"UTF8STRING",
"<ASN1 13>",
"<ASN1 14>",
"<ASN1 15>",
"SEQUENCE",
"SET",
"NUMERICSTRING",
"PRINTABLESTRING",
"T61STRING",
"VIDEOTEXSTRING",
"IA5STRING",
"UTCTIME",
"GENERALIZEDTIME",
"GRAPHICSTRING",
"VISIBLESTRING",
"GENERALSTRING",
"UNIVERSALSTRING",
"<ASN1 29>",
"BMPSTRING",
};
if ((tag == V_ASN1_NEG_INTEGER) || (tag == V_ASN1_NEG_ENUMERATED)) {
tag &= ~V_ASN1_NEG;
}
if (tag < 0 || tag > 30) {
return "(unknown)";
}
return tag2str[tag];
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/asn_pack.cc
================================================
/*
* Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_STRING **out) {
uint8_t *new_data = NULL;
int len = ASN1_item_i2d(reinterpret_cast<ASN1_VALUE *>(obj), &new_data, it);
if (len <= 0) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ENCODE_ERROR);
return NULL;
}
ASN1_STRING *ret = NULL;
if (out == NULL || *out == NULL) {
ret = ASN1_STRING_new();
if (ret == NULL) {
OPENSSL_free(new_data);
return NULL;
}
} else {
ret = *out;
}
ASN1_STRING_set0(ret, new_data, len);
if (out != NULL) {
*out = ret;
}
return ret;
}
void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it) {
const unsigned char *p = oct->data;
void *ret = ASN1_item_d2i(NULL, &p, oct->length, it);
if (ret == NULL || p != oct->data + oct->length) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_DECODE_ERROR);
ASN1_item_free(reinterpret_cast<ASN1_VALUE *>(ret), it);
return NULL;
}
return ret;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/f_int.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_bio.h>
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a) {
int i, n = 0;
static const char *h = "0123456789ABCDEF";
char buf[2];
if (a == NULL) {
return 0;
}
if (a->type & V_ASN1_NEG) {
if (BIO_write(bp, "-", 1) != 1) {
goto err;
}
n = 1;
}
if (a->length == 0) {
if (BIO_write(bp, "00", 2) != 2) {
goto err;
}
n += 2;
} else {
for (i = 0; i < a->length; i++) {
if ((i != 0) && (i % 35 == 0)) {
if (BIO_write(bp, "\\\n", 2) != 2) {
goto err;
}
n += 2;
}
buf[0] = h[((unsigned char)a->data[i] >> 4) & 0x0f];
buf[1] = h[((unsigned char)a->data[i]) & 0x0f];
if (BIO_write(bp, buf, 2) != 2) {
goto err;
}
n += 2;
}
}
return n;
err:
return -1;
}
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a) {
return i2a_ASN1_INTEGER(bp, a);
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/f_string.cc
================================================
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_bio.h>
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type) {
int i, n = 0;
static const char *h = "0123456789ABCDEF";
char buf[2];
if (a == NULL) {
return 0;
}
if (a->length == 0) {
if (BIO_write(bp, "0", 1) != 1) {
goto err;
}
n = 1;
} else {
for (i = 0; i < a->length; i++) {
if ((i != 0) && (i % 35 == 0)) {
if (BIO_write(bp, "\\\n", 2) != 2) {
goto err;
}
n += 2;
}
buf[0] = h[((unsigned char)a->data[i] >> 4) & 0x0f];
buf[1] = h[((unsigned char)a->data[i]) & 0x0f];
if (BIO_write(bp, buf, 2) != 2) {
goto err;
}
n += 2;
}
}
return n;
err:
return -1;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/internal.h
================================================
/*
* Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#ifndef OPENSSL_HEADER_ASN1_INTERNAL_H
#define OPENSSL_HEADER_ASN1_INTERNAL_H
#include <time.h>
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_asn1t.h>
#if defined(__cplusplus)
extern "C" {
#endif
// Wrapper functions for time functions.
// OPENSSL_gmtime converts a time_t value in |time| which must be in the range
// of year 0000 to 9999 to a broken out time value in |tm|. On success |tm| is
// returned. On failure NULL is returned.
OPENSSL_EXPORT struct tm *OPENSSL_gmtime(const time_t *time, struct tm *result);
// OPENSSL_gmtime_adj returns one on success, and updates |tm| by adding
// |offset_day| days and |offset_sec| seconds. It returns zero on failure. |tm|
// must be in the range of year 0000 to 9999 both before and after the update or
// a failure will be returned.
OPENSSL_EXPORT int OPENSSL_gmtime_adj(struct tm *tm, int offset_day,
int64_t offset_sec);
// OPENSSL_gmtime_diff calculates the difference between |from| and |to|. It
// returns one, and outputs the difference as a number of days and seconds in
// |*out_days| and |*out_secs| on success. It returns zero on failure. Both
// |from| and |to| must be in the range of year 0000 to 9999 or a failure will
// be returned.
OPENSSL_EXPORT int OPENSSL_gmtime_diff(int *out_days, int *out_secs,
const struct tm *from,
const struct tm *to);
// Internal ASN1 structures and functions: not for application use
// These are used internally in the ASN1_OBJECT to keep track of
// whether the names and data need to be free()ed
#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 // internal use
#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 // internal use
#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 // internal use
// An asn1_object_st (aka |ASN1_OBJECT|) represents an ASN.1 OBJECT IDENTIFIER.
// Note: Mutating an |ASN1_OBJECT| is only permitted when initializing it. The
// library maintains a table of static |ASN1_OBJECT|s, which may be referenced
// by non-const |ASN1_OBJECT| pointers. Code which receives an |ASN1_OBJECT|
// pointer externally must assume it is immutable, even if the pointer is not
// const.
struct asn1_object_st {
const char *sn, *ln;
int nid;
int length;
const unsigned char *data; // data remains const after init
int flags; // Should we free this one
};
ASN1_OBJECT *ASN1_OBJECT_new(void);
// ASN1_ENCODING is used to save the received encoding of an ASN.1 type. This
// avoids problems with invalid encodings that break signatures.
typedef struct ASN1_ENCODING_st {
// enc is the saved DER encoding. Its ownership is determined by |buf|.
uint8_t *enc;
// len is the length of |enc|. If zero, there is no saved encoding.
size_t len;
// buf, if non-NULL, is the |CRYPTO_BUFFER| that |enc| points into. If NULL,
// |enc| must be released with |OPENSSL_free|.
CRYPTO_BUFFER *buf;
} ASN1_ENCODING;
OPENSSL_EXPORT int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d,
int allow_timezone_offset);
OPENSSL_EXPORT int asn1_generalizedtime_to_tm(struct tm *tm,
const ASN1_GENERALIZEDTIME *d);
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
// ASN1_item_ex_d2i parses |len| bytes from |*in| as a structure of type |it|
// and writes the result to |*pval|. If |tag| is non-negative, |it| is
// implicitly tagged with the tag specified by |tag| and |aclass|. If |opt| is
// non-zero, the value is optional. If |buf| is non-NULL, |*in| must point into
// |buf|.
//
// This function returns one and advances |*in| if an object was successfully
// parsed, -1 if an optional value was successfully skipped, and zero on error.
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it, int tag, int aclass, char opt,
CRYPTO_BUFFER *buf);
// ASN1_item_ex_i2d encodes |*pval| as a value of type |it| to |out| under the
// i2d output convention. It returns a non-zero length on success and -1 on
// error. If |tag| is -1. the tag and class come from |it|. Otherwise, the tag
// number is |tag| and the class is |aclass|. This is used for implicit tagging.
// This function treats a missing value as an error, not an optional field.
int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
const ASN1_ITEM *it, int tag, int aclass);
void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
// asn1_get_choice_selector returns the CHOICE selector value for |*pval|, which
// must of type |it|.
int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it);
int asn1_set_choice_selector(ASN1_VALUE **pval, int value, const ASN1_ITEM *it);
// asn1_get_field_ptr returns a pointer to the field in |*pval| corresponding to
// |tt|.
ASN1_VALUE **asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
// asn1_do_adb returns the |ASN1_TEMPLATE| for the ANY DEFINED BY field |tt|,
// based on the selector INTEGER or OID in |*pval|. If |tt| is not an ADB field,
// it returns |tt|. If the selector does not match any value, it returns NULL.
// If |nullerr| is non-zero, it will additionally push an error to the error
// queue when there is no match.
const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt,
int nullerr);
void asn1_refcount_set_one(ASN1_VALUE **pval, const ASN1_ITEM *it);
int asn1_refcount_dec_and_test_zero(ASN1_VALUE **pval, const ASN1_ITEM *it);
void asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it);
void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
// asn1_enc_restore, if |*pval| has a saved encoding, writes it to |out| under
// the i2d output convention, sets |*len| to the length, and returns one. If it
// has no saved encoding, it returns zero.
int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval,
const ASN1_ITEM *it);
// asn1_enc_save saves |inlen| bytes from |in| as |*pval|'s saved encoding. It
// returns one on success and zero on error. If |buf| is non-NULL, |in| must
// point into |buf|.
int asn1_enc_save(ASN1_VALUE **pval, const uint8_t *in, size_t inlen,
const ASN1_ITEM *it, CRYPTO_BUFFER *buf);
// asn1_encoding_clear clears the cached encoding in |enc|.
void asn1_encoding_clear(ASN1_ENCODING *enc);
// asn1_type_value_as_pointer returns |a|'s value in pointer form. This is
// usually the value object but, for BOOLEAN values, is 0 or 0xff cast to
// a pointer.
const void *asn1_type_value_as_pointer(const ASN1_TYPE *a);
// asn1_type_set0_string sets |a|'s value to the object represented by |str| and
// takes ownership of |str|.
void asn1_type_set0_string(ASN1_TYPE *a, ASN1_STRING *str);
// asn1_type_cleanup releases memory associated with |a|'s value, without
// freeing |a| itself.
void asn1_type_cleanup(ASN1_TYPE *a);
// asn1_is_printable returns one if |value| is a valid Unicode codepoint for an
// ASN.1 PrintableString, and zero otherwise.
int asn1_is_printable(uint32_t value);
// asn1_bit_string_length returns the number of bytes in |str| and sets
// |*out_padding_bits| to the number of padding bits.
//
// This function should be used instead of |ASN1_STRING_length| to correctly
// handle the non-|ASN1_STRING_FLAG_BITS_LEFT| case.
int asn1_bit_string_length(const ASN1_BIT_STRING *str,
uint8_t *out_padding_bits);
typedef struct {
int nid;
long minsize;
long maxsize;
unsigned long mask;
unsigned long flags;
} ASN1_STRING_TABLE;
// asn1_get_string_table_for_testing sets |*out_ptr| and |*out_len| to the table
// of built-in |ASN1_STRING_TABLE| values. It is exported for testing.
OPENSSL_EXPORT void asn1_get_string_table_for_testing(
const ASN1_STRING_TABLE **out_ptr, size_t *out_len);
typedef ASN1_VALUE *ASN1_new_func(void);
typedef void ASN1_free_func(ASN1_VALUE *a);
typedef ASN1_VALUE *ASN1_d2i_func(ASN1_VALUE **a, const unsigned char **in,
long length);
typedef int ASN1_i2d_func(ASN1_VALUE *a, unsigned char **in);
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it, int opt, ASN1_TLC *ctx);
typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
const ASN1_ITEM *it);
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
typedef struct ASN1_EXTERN_FUNCS_st {
ASN1_ex_new_func *asn1_ex_new;
ASN1_ex_free_func *asn1_ex_free;
ASN1_ex_d2i *asn1_ex_d2i;
ASN1_ex_i2d *asn1_ex_i2d;
} ASN1_EXTERN_FUNCS;
#if defined(__cplusplus)
} // extern C
#endif
#endif // OPENSSL_HEADER_ASN1_INTERNAL_H
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/posix_time.cc
================================================
/* Copyright 2022 The BoringSSL Authors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
// Time conversion to/from POSIX time_t and struct tm, with no support
// for time zones other than UTC
#include <CNIOBoringSSL_posix_time.h>
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
#include <string.h>
#include <time.h>
#include "internal.h"
#define SECS_PER_HOUR (60 * 60)
#define SECS_PER_DAY (INT64_C(24) * SECS_PER_HOUR)
// Is a year/month/day combination valid, in the range from year 0000
// to 9999?
static int is_valid_date(int64_t year, int64_t month, int64_t day) {
if (day < 1 || month < 1 || year < 0 || year > 9999) {
return 0;
}
switch (month) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return day > 0 && day <= 31;
case 4:
case 6:
case 9:
case 11:
return day > 0 && day <= 30;
case 2:
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
return day > 0 && day <= 29;
} else {
return day > 0 && day <= 28;
}
default:
return 0;
}
}
// Is a time valid? Leap seconds of 60 are not considered valid, as
// the POSIX time in seconds does not include them.
static int is_valid_time(int64_t hours, int64_t minutes, int64_t seconds) {
if (hours < 0 || minutes < 0 || seconds < 0 || hours > 23 || minutes > 59 ||
seconds > 59) {
return 0;
}
return 1;
}
// 0000-01-01 00:00:00 UTC
#define MIN_POSIX_TIME INT64_C(-62167219200)
// 9999-12-31 23:59:59 UTC
#define MAX_POSIX_TIME INT64_C(253402300799)
// Is an int64 time within our expected range?
static int is_valid_posix_time(int64_t time) {
return MIN_POSIX_TIME <= time && time <= MAX_POSIX_TIME;
}
// Inspired by algorithms presented in
// https://howardhinnant.github.io/date_algorithms.html
// (Public Domain)
static int posix_time_from_utc(int64_t year, int64_t month, int64_t day,
int64_t hours, int64_t minutes, int64_t seconds,
int64_t *out_time) {
if (!is_valid_date(year, month, day) ||
!is_valid_time(hours, minutes, seconds)) {
return 0;
}
if (month <= 2) {
year--; // Start years on Mar 1, so leap days always finish a year.
}
// At this point year will be in the range -1 and 9999.
assert(-1 <= year && year <= 9999);
int64_t era = (year >= 0 ? year : year - 399) / 400;
int64_t year_of_era = year - era * 400;
int64_t day_of_year =
(153 * (month > 2 ? month - 3 : month + 9) + 2) / 5 + day - 1;
int64_t day_of_era =
year_of_era * 365 + year_of_era / 4 - year_of_era / 100 + day_of_year;
int64_t posix_days = era * 146097 + day_of_era - 719468;
*out_time = posix_days * SECS_PER_DAY + hours * SECS_PER_HOUR + minutes * 60 +
seconds;
return 1;
}
// Inspired by algorithms presented in
// https://howardhinnant.github.io/date_algorithms.html
// (Public Domain)
static int utc_from_posix_time(int64_t time, int *out_year, int *out_month,
int *out_day, int *out_hours, int *out_minutes,
int *out_seconds) {
if (!is_valid_posix_time(time)) {
return 0;
}
int64_t days = time / SECS_PER_DAY;
int64_t leftover_seconds = time % SECS_PER_DAY;
if (leftover_seconds < 0) {
days--;
leftover_seconds += SECS_PER_DAY;
}
days += 719468; // Shift to starting epoch of Mar 1 0000.
// At this point, days will be in the range -61 and 3652364.
assert(-61 <= days && days <= 3652364);
int64_t era = (days > 0 ? days : days - 146096) / 146097;
int64_t day_of_era = days - era * 146097;
int64_t year_of_era = (day_of_era - day_of_era / 1460 + day_of_era / 36524 -
day_of_era / 146096) /
365;
*out_year = (int)(year_of_era + era * 400); // Year starting on Mar 1.
int64_t day_of_year =
day_of_era - (365 * year_of_era + year_of_era / 4 - year_of_era / 100);
int64_t month_of_year = (5 * day_of_year + 2) / 153;
*out_month =
(int)(month_of_year < 10 ? month_of_year + 3 : month_of_year - 9);
if (*out_month <= 2) {
(*out_year)++; // Adjust year back to Jan 1 start of year.
}
*out_day = (int)(day_of_year - (153 * month_of_year + 2) / 5 + 1);
*out_hours = (int)(leftover_seconds / SECS_PER_HOUR);
leftover_seconds %= SECS_PER_HOUR;
*out_minutes = (int)(leftover_seconds / 60);
*out_seconds = (int)(leftover_seconds % 60);
return 1;
}
int OPENSSL_tm_to_posix(const struct tm *tm, int64_t *out) {
return posix_time_from_utc(tm->tm_year + INT64_C(1900),
tm->tm_mon + INT64_C(1), tm->tm_mday, tm->tm_hour,
tm->tm_min, tm->tm_sec, out);
}
int OPENSSL_posix_to_tm(int64_t time, struct tm *out_tm) {
struct tm tmp_tm = {};
if (!utc_from_posix_time(time, &tmp_tm.tm_year, &tmp_tm.tm_mon,
&tmp_tm.tm_mday, &tmp_tm.tm_hour, &tmp_tm.tm_min,
&tmp_tm.tm_sec)) {
return 0;
}
tmp_tm.tm_year -= 1900;
tmp_tm.tm_mon -= 1;
*out_tm = tmp_tm;
return 1;
}
int OPENSSL_timegm(const struct tm *tm, time_t *out) {
static_assert(
sizeof(time_t) == sizeof(int32_t) || sizeof(time_t) == sizeof(int64_t),
"time_t is broken");
int64_t posix_time;
if (!OPENSSL_tm_to_posix(tm, &posix_time)) {
return 0;
}
if (sizeof(time_t) == sizeof(int32_t) &&
(posix_time > INT32_MAX || posix_time < INT32_MIN)) {
return 0;
}
*out = (time_t)posix_time;
return 1;
}
struct tm *OPENSSL_gmtime(const time_t *time, struct tm *out_tm) {
static_assert(
sizeof(time_t) == sizeof(int32_t) || sizeof(time_t) == sizeof(int64_t),
"time_t is broken");
int64_t posix_time = *time;
if (!OPENSSL_posix_to_tm(posix_time, out_tm)) {
return NULL;
}
return out_tm;
}
int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, int64_t offset_sec) {
int64_t posix_time;
if (!OPENSSL_tm_to_posix(tm, &posix_time)) {
return 0;
}
static_assert(INT_MAX <= INT64_MAX / SECS_PER_DAY,
"day offset in seconds cannot overflow");
static_assert(MAX_POSIX_TIME <= INT64_MAX - INT_MAX * SECS_PER_DAY,
"addition cannot overflow");
static_assert(MIN_POSIX_TIME >= INT64_MIN - INT_MIN * SECS_PER_DAY,
"addition cannot underflow");
posix_time += offset_day * SECS_PER_DAY;
if (posix_time > 0 && offset_sec > INT64_MAX - posix_time) {
return 0;
}
if (posix_time < 0 && offset_sec < INT64_MIN - posix_time) {
return 0;
}
posix_time += offset_sec;
if (!OPENSSL_posix_to_tm(posix_time, tm)) {
return 0;
}
return 1;
}
int OPENSSL_gmtime_diff(int *out_days, int *out_secs, const struct tm *from,
const struct tm *to) {
int64_t time_to, time_from;
if (!OPENSSL_tm_to_posix(to, &time_to) ||
!OPENSSL_tm_to_posix(from, &time_from)) {
return 0;
}
// Times are in range, so these calculations can not overflow.
static_assert(SECS_PER_DAY <= INT_MAX, "seconds per day does not fit in int");
static_assert((MAX_POSIX_TIME - MIN_POSIX_TIME) / SECS_PER_DAY <= INT_MAX,
"range of valid POSIX times, in days, does not fit in int");
int64_t timediff = time_to - time_from;
int64_t daydiff = timediff / SECS_PER_DAY;
timediff %= SECS_PER_DAY;
*out_secs = (int)timediff;
*out_days = (int)daydiff;
return 1;
}
================================================
FILE: Sources/CNIOBoringSSL/crypto/asn1/tasn_dec.cc
================================================
/*
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <CNIOBoringSSL_asn1.h>
#include <CNIOBoringSSL_asn1t.h>
#include <CNIOBoringSSL_bytestring.h>
#include <CNIOBoringSSL_err.h>
#include <CNIOBoringSSL_mem.h>
#include <CNIOBoringSSL_pool.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include "../bytestring/internal.h"
#include "../internal.h"
#include "internal.h"
// Constructed types with a recursive definition (such as can be found in PKCS7)
// could eventually exceed the stack given malicious input with excessive
// recursion. Therefore we limit the stack depth. This is the maximum number of
// recursive invocations of asn1_item_embed_d2i().
#define ASN1_MAX_CONSTRUCTED_NEST 30
static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass,
char *cst, const unsigned char **in, long len,
int exptag, int expclass, char opt);
static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in,
long len, const ASN1_TEMPLATE *tt, char opt,
CRYPTO_BUFFER *buf, int depth);
static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in,
long len, const ASN1_TEMPLATE *tt, char opt,
CRYPTO_BUFFER *buf, int depth);
static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, long len,
int utype, const ASN1_ITEM *it);
static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in,
long len, const ASN1_ITEM *it, int tag,
int aclass, char opt);
static int asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in,
long len, const ASN1_ITEM *it, int tag, int aclass,
char opt, CRYPTO_BUFFER *buf, int depth);
// Table to convert tags to bit values, used for MSTRING type
static const unsigned long tag2bit[31] = {
0, // (reserved)
0, // BOOLEAN
0, // INTEGER
B_ASN1_BIT_STRING,
B_ASN1_OCTET_STRING,
0, // NULL
0, // OBJECT IDENTIFIER
B_ASN1_UNKNOWN, // ObjectDescriptor
B_ASN1_UNKNOWN, // EXTERNAL
B_ASN1_UNKNOWN, // REAL
B_ASN1_UNKNOWN, // ENUMERATED
B_ASN1_UNKNOWN, // EMBEDDED PDV
B_ASN1_UTF8STRING,
B_ASN1_UNKNOWN, // RELATIVE-OID
B_ASN1_UNKNOWN, // TIME
B_ASN1_UNKNOWN, // (reserved)
B_ASN1_SEQUENCE,
0, // SET
B_ASN1_NUMERICSTRING,
B_ASN1_PRINTABLESTRING,
B_ASN1_T61STRING,
B_ASN1_VIDEOTEXSTRING,
B_ASN1_IA5STRING,
B_ASN1_UTCTIME,
B_ASN1_GENERALIZEDTIME,
B_ASN1_GRAPHICSTRING,
B_ASN1_ISO64STRING,
B_ASN1_GENERALSTRING,
B_ASN1_UNIVERSALSTRING,
B_ASN1_UNKNOWN, // CHARACTER STRING
B_ASN1_BMPSTRING,
};
unsigned long ASN1_tag2bit(int tag) {
if (tag < 0 || tag > 30) {
return 0;
}
return tag2bit[tag];
}
static int is_supported_universal_type(int tag, int aclass) {
if (aclass != V_ASN1_UNIVERSAL) {
return 0;
}
return tag == V_ASN1_OBJECT || tag == V_ASN1_NULL || tag == V_ASN1_BOOLEAN ||
tag == V_ASN1_BIT_STRING || tag == V_ASN1_INTEGER ||
tag == V_ASN1_ENUMERATED || tag == V_ASN1_OCTET_STRING ||
tag == V_ASN1_NUMERICSTRING || tag == V_ASN1_PRINTABLESTRING ||
tag == V_ASN1_T61STRING || tag == V_ASN1_VIDEOTEXSTRING ||
tag == V_ASN1_IA5STRING || tag == V_ASN1_UTCTIME ||
tag == V_ASN1_GENERALIZEDTIME || tag == V_ASN1_GRAPHICSTRING ||
tag == V_ASN1_VISIBLESTRING || tag == V_ASN1_GENERALSTRING ||
tag == V_ASN1_UNIVERSALSTRING || tag == V_ASN1_BMPSTRING ||
tag == V_ASN1_UTF8STRING || tag == V_ASN1_SET ||
tag == V_ASN1_SEQUENCE;
}
// Macro to initialize and invalidate the cache
// Decode an ASN1 item, this currently behaves just like a standard 'd2i'
// function. 'in' points to a buffer to read the data from, in future we
// will have more advanced versions that can input data a piece at a time and
// this will simply be a special case.
ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it) {
ASN1_VALUE *ret = NULL;
if (asn1_item_ex_d2i(&ret, in, len, it, /*tag=*/-1, /*aclass=*/0, /*opt=*/0,
/*buf=*/NULL, /*depth=*/0) <= 0) {
// Clean up, in case the caller left a partial object.
//
// TODO(davidben): I don't think it can leave one, but the codepaths below
// are a bit inconsistent. Revisit this when rewriting this function.
ASN1_item_ex_free(&ret, it);
}
// If the caller supplied an output pointer, free the old one and replace it
// with |ret|. This differs from OpenSSL slightly in that we don't support
// object reuse. We run this on both success and failure. On failure, even
// with object reuse, OpenSSL destroys the previous object.
if (pval != NULL) {
ASN1_item_ex_free(pval, it);
*pval = ret;
}
return ret;
}
// Decode an item, taking care of IMPLICIT tagging, if any. If 'opt' set and
// tag mismatch return -1 to handle OPTIONAL
//
// TODO(davidben): Historically, all functions in this file had to account for
// |*pval| containing an arbitrary existing value. This is no longer the case
// because |ASN1_item_d2i| now always starts from NULL. As part of rewriting
// this function, take the simplified assumptions into account. Though we must
// still account for the internal calls to |ASN1_item_ex_new|.
static int asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in,
long len, const ASN1_ITEM *it, int tag, int aclass,
char opt, CRYPTO_BUFFER *buf, int depth) {
const ASN1_TEMPLATE *tt, *errtt = NULL;
const unsigned char *p = NULL, *q;
unsigned char oclass;
char cst, isopt;
int i;
int otag;
int ret = 0;
ASN1_VALUE **pchptr;
if (!pval) {
return 0;
}
if (buf != NULL) {
assert(CRYPTO_BUFFER_data(buf) <= *in &&
*in + len <= CRYPTO_BUFFER_data(buf) + CRYPTO_BUFFER_len(buf));
}
// Bound |len| to comfortably fit in an int. Lengths in this module often
// switch between int and long without overflow checks.
if (len > INT_MAX / 2) {
len = INT_MAX / 2;
}
if (++depth > ASN1_MAX_CONSTRUCTED_NEST) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_TOO_DEEP);
goto err;
}
switch (it->itype) {
case ASN1_ITYPE_PRIMITIVE:
if (it->templates) {
// tagging or OPTIONAL is currently illegal on an item template
// because the flags can't get passed down. In practice this
// isn't a problem: we include the relevant flags from the item
// template in the template itself.
if ((tag != -1) || opt) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE);
goto err;
}
return asn1_template_ex_d2i(pval, in, len, it->templates, opt, buf,
depth);
}
return asn1_d2i_ex_primitive(pval, in, len, it, tag, aclass, opt);
break;
case ASN1_ITYPE_MSTRING:
// It never makes sense for multi-strings to have implicit tagging, so
// if tag != -1, then this looks like an error in the template.
if (tag != -1) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_BAD_TEMPLATE);
goto err;
}
p = *in;
// Just read in tag and class
ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, &p, len, -1, 0, 1);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
}
// Must be UNIVERSAL class
if (oclass != V_ASN1_UNIVERSAL) {
// If OPTIONAL, assume this is OK
if (opt) {
return -1;
}
OPENSSL_PUT_ERROR(ASN1, ASN1_R_MSTRING_NOT_UNIVERSAL);
goto err;
}
// Check tag matches bit map
if (!(ASN1_tag2bit(otag) & it->utype)) {
// If OPTIONAL, assume this is OK
if (opt) {
return -1;
}
OPENSSL_PUT_ERROR(ASN1, ASN1_R_MSTRING_WRONG_TAG);
goto err;
}
return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0);
case ASN1_ITYPE_EXTERN: {
// We don't support implicit tagging with external types.
if (tag != -1) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_BAD_TEMPLATE);
goto err;
}
const ASN1_EXTERN_FUNCS *ef =
reinterpret_cast<const ASN1_EXTERN_FUNCS *>(it->funcs);
return ef->asn1_ex_d2i(pval, in, len, it, opt, NULL);
}
case ASN1_ITYPE_CHOICE: {
// It never makes sense for CHOICE types to have implicit tagging, so if
// tag != -1, then this looks like an error in the template.
if (tag != -1) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_BAD_TEMPLATE);
goto err;
}
const ASN1_AUX *aux = reinterpret_cast<const ASN1_AUX *>(it->funcs);
ASN1_aux_cb *asn1_cb = aux != NULL ? aux->asn1_cb : NULL;
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) {
goto auxerr;
}
if (*pval) {
// Free up and zero CHOICE value if initialised
i = asn1_get_choice_selector(pval, it);
if ((i >= 0) && (i < it->tcount)) {
tt = it->templates + i;
pchptr = asn1_get_field_ptr(pval, tt);
ASN1_template_free(pchptr, tt);
asn1_set_choice_selector(pval, -1, it);
}
} else if (!ASN1_item_ex_new(pval, it)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
}
// CHOICE type, try each possibility in turn
p = *in;
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
pchptr = asn1_get_field_ptr(pval, tt);
// We mark field as OPTIONAL so its absence can be recognised.
ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, buf, depth);
// If field not present, try the next one
if (ret == -1) {
continue;
}
// If positive return, read OK, break loop
if (ret > 0) {
break;
}
// Otherwise must be an ASN1 parsing error
errtt = tt;
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
}
// Did we fall off the end without reading anything?
if (i == it->tcount) {
// If OPTIONAL, this is OK
if (opt) {
// Free and zero it
ASN1_item_ex_free(pval, it);
return -1;
}
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NO_MATCHING_CHOICE_TYPE);
goto err;
}
asn1_set_choice_selector(pval, i, it);
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL)) {
goto auxerr;
}
*in = p;
return 1;
}
case ASN1_ITYPE_SEQUENCE: {
p = *in;
// If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL
if (tag == -1) {
tag = V_ASN1_SEQUENCE;
aclass = V_ASN1_UNIVERSAL;
}
// Get SEQUENCE length and update len, p
ret = asn1_check_tlen(&len, NULL, NULL, &cst, &p, len, tag, aclass, opt);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
} else if (ret == -1) {
return -1;
}
if (!cst) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_SEQUENCE_NOT_CONSTRUCTED);
goto err;
}
if (!*pval && !ASN1_item_ex_new(pval, it)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
}
const ASN1_AUX *aux = reinterpret_cast<const ASN1_AUX *>(it->funcs);
ASN1_aux_cb *asn1_cb = aux != NULL ? aux->asn1_cb : NULL;
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) {
goto auxerr;
}
// Free up and zero any ADB found
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
if (tt->flags & ASN1_TFLG_ADB_MASK) {
const ASN1_TEMPLATE *seqtt;
ASN1_VALUE **pseqval;
seqtt = asn1_do_adb(pval, tt, 0);
if (seqtt == NULL) {
continue;
}
pseqval = asn1_get_field_ptr(pval, seqtt);
ASN1_template_free(pseqval, seqtt);
}
}
// Get each field entry
for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
const ASN1_TEMPLATE *seqtt;
ASN1_VALUE **pseqval;
seqtt = asn1_do_adb(pval, tt, 1);
if (seqtt == NULL) {
goto err;
}
pseqval = asn1_get_field_ptr(pval, seqtt);
// Have we ran out of data?
if (!len) {
break;
}
q = p;
// This determines the OPTIONAL flag value. The field cannot be
// omitted if it is the last of a SEQUENCE and there is still
// data to be read. This isn't strictly necessary but it
// increases efficiency in some cases.
if (i == (it->tcount - 1)) {
isopt = 0;
} else {
isopt = (seqtt->flags & ASN1_TFLG_OPTIONAL) != 0;
}
// attempt to read in field, allowing each to be OPTIONAL
ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, buf, depth);
if (!ret) {
errtt = seqtt;
goto err;
} else if (ret == -1) {
// OPTIONAL component absent. Free and zero the field.
ASN1_template_free(pseqval, seqtt);
continue;
}
// Update length
len -= p - q;
}
// Check all data read
if (len) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_SEQUENCE_LENGTH_MISMATCH);
goto err;
}
// If we get here we've got no more data in the SEQUENCE, however we
// may not have read all fields so check all remaining are OPTIONAL
// and clear any that are.
for (; i < it->tcount; tt++, i++) {
const ASN1_TEMPLATE *seqtt;
seqtt = asn1_do_adb(pval, tt, 1);
if (seqtt == NULL) {
goto err;
}
if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
ASN1_VALUE **pseqval;
pseqval = asn1_get_field_ptr(pval, seqtt);
ASN1_template_free(pseqval, seqtt);
} else {
errtt = seqtt;
OPENSSL_PUT_ERROR(ASN1, ASN1_R_FIELD_MISSING);
goto err;
}
}
// Save encoding
if (!asn1_enc_save(pval, *in, p - *in, it, buf)) {
goto auxerr;
}
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL)) {
goto auxerr;
}
*in = p;
return 1;
}
default:
return 0;
}
auxerr:
OPENSSL_PUT_ERROR(ASN1, ASN1_R_AUX_ERROR);
err:
ASN1_item_ex_free(pval, it);
if (errtt) {
ERR_add_error_data(4, "Field=", errtt->field_name, ", Type=", it->sname);
} else {
ERR_add_error_data(2, "Type=", it->sname);
}
return 0;
}
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it, int tag, int aclass, char opt,
CRYPTO_BUFFER *buf) {
return asn1_item_ex_d2i(pval, in, len, it, tag, aclass, opt, buf,
/*depth=*/0);
}
// Templates are handled with two separate functions. One handles any
// EXPLICIT tag and the other handles the rest.
static int asn1_template_ex_d2i(ASN1_VALUE **val, const unsigned char **in,
long inlen, const ASN1_TEMPLATE *tt, char opt,
CRYPTO_BUFFER *buf, int depth) {
int aclass;
int ret;
long len;
const unsigned char *p, *q;
if (!val) {
return 0;
}
uint32_t flags = tt->flags;
aclass = flags & ASN1_TFLG_TAG_CLASS;
p = *in;
// Check if EXPLICIT tag expected
if (flags & ASN1_TFLG_EXPTAG) {
char cst;
// Need to work out amount of data available to the inner content and
// where it starts: so read in EXPLICIT header to get the info.
ret = asn1_check_tlen(&len, NULL, NULL, &cst, &p, inlen, tt->tag, aclass,
opt);
q = p;
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
return 0;
} else if (ret == -1) {
return -1;
}
if (!cst) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED);
return 0;
}
// We've found the field so it can't be OPTIONAL now
ret = asn1_template_noexp_d2i(val, &p, len, tt, /*opt=*/0, buf, depth);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
return 0;
}
// We read the field in OK so update length
len -= p - q;
// Check for trailing data.
if (len) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_EXPLICIT_LENGTH_MISMATCH);
goto err;
}
} else {
return asn1_template_noexp_d2i(val, in, inlen, tt, opt, buf, depth);
}
*in = p;
return 1;
err:
ASN1_template_free(val, tt);
return 0;
}
static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in,
long len, const ASN1_TEMPLATE *tt, char opt,
CRYPTO_BUFFER *buf, int depth) {
int aclass;
int ret;
const unsigned char *p;
if (!val) {
return 0;
}
uint32_t flags = tt->flags;
aclass = flags & ASN1_TFLG_TAG_CLASS;
p = *in;
if (flags & ASN1_TFLG_SK_MASK) {
// SET OF, SEQUENCE OF
int sktag, skaclass;
// First work out expected inner tag value
if (flags & ASN1_TFLG_IMPTAG) {
sktag = tt->tag;
skaclass = aclass;
} else {
skaclass = V_ASN1_UNIVERSAL;
if (flags & ASN1_TFLG_SET_OF) {
sktag = V_ASN1_SET;
} else {
sktag = V_ASN1_SEQUENCE;
}
}
// Get the tag
ret =
asn1_check_tlen(&len, NULL, NULL, NULL, &p, len, sktag, skaclass, opt);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
return 0;
} else if (ret == -1) {
return -1;
}
if (!*val) {
*val = (ASN1_VALUE *)sk_ASN1_VALUE_new_null();
} else {
// We've got a valid STACK: free up any items present
STACK_OF(ASN1_VALUE) *sktmp = (STACK_OF(ASN1_VALUE) *)*val;
ASN1_VALUE *vtmp;
while (sk_ASN1_VALUE_num(sktmp) > 0) {
vtmp = sk_ASN1_VALUE_pop(sktmp);
ASN1_item_ex_free(&vtmp, ASN1_ITEM_ptr(tt->item));
}
}
if (!*val) {
goto err;
}
// Read as many items as we can
while (len > 0) {
ASN1_VALUE *skfield;
const unsigned char *q = p;
skfield = NULL;
if (!asn1_item_ex_d2i(&skfield, &p, len, ASN1_ITEM_ptr(tt->item),
/*tag=*/-1, /*aclass=*/0, /*opt=*/0, buf, depth)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
}
len -= p - q;
if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) {
ASN1_item_ex_free(&skfield, ASN1_ITEM_ptr(tt->item));
goto err;
}
}
} else if (flags & ASN1_TFLG_IMPTAG) {
// IMPLICIT tagging
ret = asn1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), tt->tag,
aclass, opt, buf, depth);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
} else if (ret == -1) {
return -1;
}
} else {
// Nothing special
ret = asn1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), /*tag=*/-1,
/*aclass=*/0, opt, buf, depth);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
goto err;
} else if (ret == -1) {
return -1;
}
}
*in = p;
return 1;
err:
ASN1_template_free(val, tt);
return 0;
}
static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in,
long inlen, const ASN1_ITEM *it, int tag,
int aclass, char opt) {
int ret = 0, utype;
long plen;
char cst;
const unsigned char *p;
const unsigned char *cont = NULL;
long len;
if (!pval) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_NULL);
return 0; // Should never happen
}
if (it->itype == ASN1_ITYPE_MSTRING) {
utype = tag;
tag = -1;
} else {
utype = it->utype;
}
if (utype == V_ASN1_ANY) {
// If type is ANY need to figure out type from tag
unsigned char oclass;
if (tag >= 0) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_TAGGED_ANY);
return 0;
}
if (opt) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_OPTIONAL_ANY);
return 0;
}
p = *in;
ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, &p, inlen, -1, 0, 0);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
return 0;
}
if (!is_supported_universal_type(utype, oclass)) {
utype = V_ASN1_OTHER;
}
}
if (tag == -1) {
tag = utype;
aclass = V_ASN1_UNIVERSAL;
}
p = *in;
// Check header
ret = asn1_check_tlen(&plen, NULL, NULL, &cst, &p, inlen, tag, aclass, opt);
if (!ret) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NESTED_ASN1_ERROR);
return 0;
} else if (ret == -1) {
return -1;
}
ret = 0;
// SEQUENCE, SET and "OTHER" are left in encoded form
if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) ||
(utype == V_ASN1_OTHER)) {
// SEQUENCE and SET must be constructed
if (utype != V_ASN1_OTHER && !cst) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_TYPE_NOT_CONSTRUCTED);
return 0;
}
cont = *in;
len = p - cont + plen;
p += plen;
} else if (cst) {
// This parser historically supported BER constructed strings. We no
// longer do and will gradually tighten this parser into a DER
// parser. BER types should use |CBS_asn1_ber_to_der|.
OPENSSL_PUT_ERROR(ASN1, ASN1_R_TYPE_NOT_PRIMITIVE);
return 0;
} else {
cont = p;
len = plen;
p += plen;
}
// We now have content length and type: translate into a structure
if (!asn1_ex_c2i(pval, cont, len, utype, it)) {
goto err;
}
*in = p;
ret = 1;
err:
return ret;
}
// Translate ASN1 content octets into a structure
static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, long len,
int utype, const ASN1_ITEM *it) {
ASN1_VALUE **opval = NULL;
ASN1_STRING *stmp;
ASN1_TYPE *typ = NULL;
int ret = 0;
ASN1_INTEGER **tint;
// Historically, |it->funcs| for primitive types contained an
// |ASN1_PRIMITIVE_FUNCS| table of callbacks.
assert(it->funcs == NULL);
// If ANY type clear type and set pointer to internal value
if (it->utype == V_ASN1_ANY) {
if (!*pval) {
typ = ASN1_TYPE_new();
if (typ == NULL) {
goto err;
}
*pval = (ASN1_VALUE *)typ;
} else {
typ = (ASN1_TYPE *)*pval;
}
if (utype != typ->type) {
ASN1_TYPE_set(typ, utype, NULL);
}
opval = pval;
pval = &typ->value.asn1_value;
}
switch (utype) {
case V_ASN1_OBJECT:
if (!c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len)) {
goto err;
}
break;
case V_ASN1_NULL:
if (len) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_NULL_IS_WRONG_LENGTH);
goto err;
}
*pval = (ASN1_VALUE *)1;
break;
case V_ASN1_BOOLEAN:
if (len != 1) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
goto err;
} else {
ASN1_BOOLEAN *tbool;
tbool = (ASN1_BOOLEAN *)pval;
*tbool = *cont;
}
break;
case V_ASN1_BIT_STRING:
if (!c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len)) {
goto err;
}
break;
case V_ASN1_INTEGER:
case V_ASN1_ENUMERATED:
tint = (ASN1_INTEGER **)pval;
if (!c2i_ASN1_INTEGER(tint, &cont, len)) {
goto err;
}
// Fixup type to match the expected form
(*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
break;
case V_ASN1_OCTET_STRING:
case V_ASN1_NUMERICSTRING:
case V_ASN1_PRINTABLESTRING:
case V_ASN1_T61STRING:
case V_ASN1_VIDEOTEXSTRING:
case V_ASN1_IA5STRING:
case V_ASN1_UTCTIME:
case V_ASN1_GENERALIZEDTIME:
case V_ASN1_GRAPHICSTRING:
case V_ASN1_VISIBLESTRING:
case V_ASN1_GENERALSTRING:
case V_ASN1_UNIVERSALSTRING:
case V_ASN1_BMPSTRING:
case V_ASN1_UTF8STRING:
case V_ASN1_OTHER:
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
// TODO(crbug.com/boringssl/412): This default case should be removed, now
// that we've resolved https://crbug.com/boringssl/561. However, it is still
// needed to support some edge cases in |ASN1_PRINTABLE|. |ASN1_PRINTABLE|
// broadly doesn't tolerate unrecognized universal tags, but except for
// eight values that map to |B_ASN1_UNKNOWN| instead of zero. See the
// X509Test.NameAttributeValues test.
default: {
CBS cbs;
CBS_init(&cbs, cont, (size_t)len);
if (utype == V_ASN1_BMPSTRING) {
while (CBS_len(&cbs) != 0) {
uint32_t c;
if (!CBS_get_ucs2_be(&cbs, &c)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_BMPSTRING);
goto err;
}
}
}
if (utype == V_ASN1_UNIVERSALSTRING) {
while (CBS_len(&cbs) != 0) {
uint32_t c;
if (!CBS_get_utf32_be(&cbs, &c)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_UNIVERSALSTRING);
goto err;
}
}
}
if (utype == V_ASN1_UTF8STRING) {
while (CBS_len(&cbs) != 0) {
uint32_t c;
if (!CBS_get_utf8(&cbs, &c)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_UTF8STRING);
goto err;
}
}
}
if (utype == V_ASN1_UTCTIME) {
if (!CBS_parse_utc_time(&cbs, NULL, /*allow_timezone_offset=*/1)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_TIME_FORMAT);
goto err;
}
}
if (utype == V_ASN1_GENERALIZEDTIME) {
if (!CBS_parse_generalized_time(&cbs, NULL,
/*allow_timezone_offset=*/0)) {
OPENSSL_PUT_ERROR(ASN1, ASN1_R_INVALID_TIME_FORMAT);
goto err;
}
}
// TODO(https://crbug.com/boringssl/427): Check other string types.
// All based on ASN1_STRING and handled the same
if (!*pval) {
stmp = ASN1_STRING_type_new(utype);
if (!stmp) {
goto err;
}
*pval = (ASN1_VALUE *)stmp;
} else {
stmp = (ASN1_STRING *)*pval;
stmp->type = utype;
}
if (!ASN1_STRING_set(stmp, cont, len)) {
ASN1_STRING_free(stmp);
*pval = NULL;
goto err;
}
break;
}
}
// If ASN1_ANY and NULL type fix up value
if (typ && (utype == V_ASN1_NULL)) {
typ->value.ptr = NULL;
}
ret = 1;
err:
if (!ret) {
ASN1_TYPE_free(typ);
if (opval) {
*opval = NULL;
}
}
return ret;
}
// Check an
gitextract_pqg_y_t3/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── release.yml
│ └── workflows/
│ ├── main.yml
│ ├── pull_request.yml
│ └── pull_request_label.yml
├── .gitignore
├── .licenseignore
├── .spi.yml
├── .swift-format
├── .unacceptablelanguageignore
├── Benchmarks/
│ ├── Benchmarks/
│ │ └── NIOSSLBenchmarks/
│ │ ├── Benchmarks.swift
│ │ ├── ManyWrites.swift
│ │ ├── Shared.swift
│ │ └── SimpleHandshake.swift
│ ├── Package.swift
│ └── Thresholds/
│ ├── 6.1/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ ├── 6.2/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ ├── 6.3/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ ├── nightly-main/
│ │ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ │ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
│ └── nightly-next/
│ ├── NIOSSLBenchmarks.ManyWrites.p90.json
│ └── NIOSSLBenchmarks.SimpleHandshake.p90.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.txt
├── IntegrationTests/
│ ├── plugin_echo.sh
│ ├── plugin_junit_xml.sh
│ ├── run-single-test.sh
│ ├── run-tests.sh
│ ├── test_functions.sh
│ └── tests_01_general/
│ ├── defines.sh
│ ├── test_01_renegotiation.sh
│ └── test_02_execstack.sh
├── LICENSE.txt
├── NOTICE.txt
├── Package.swift
├── README.md
├── SECURITY.md
├── Sources/
│ ├── CNIOBoringSSL/
│ │ ├── crypto/
│ │ │ ├── asn1/
│ │ │ │ ├── a_bitstr.cc
│ │ │ │ ├── a_bool.cc
│ │ │ │ ├── a_d2i_fp.cc
│ │ │ │ ├── a_dup.cc
│ │ │ │ ├── a_gentm.cc
│ │ │ │ ├── a_i2d_fp.cc
│ │ │ │ ├── a_int.cc
│ │ │ │ ├── a_mbstr.cc
│ │ │ │ ├── a_object.cc
│ │ │ │ ├── a_octet.cc
│ │ │ │ ├── a_strex.cc
│ │ │ │ ├── a_strnid.cc
│ │ │ │ ├── a_time.cc
│ │ │ │ ├── a_type.cc
│ │ │ │ ├── a_utctm.cc
│ │ │ │ ├── asn1_lib.cc
│ │ │ │ ├── asn1_par.cc
│ │ │ │ ├── asn_pack.cc
│ │ │ │ ├── f_int.cc
│ │ │ │ ├── f_string.cc
│ │ │ │ ├── internal.h
│ │ │ │ ├── posix_time.cc
│ │ │ │ ├── tasn_dec.cc
│ │ │ │ ├── tasn_enc.cc
│ │ │ │ ├── tasn_fre.cc
│ │ │ │ ├── tasn_new.cc
│ │ │ │ ├── tasn_typ.cc
│ │ │ │ └── tasn_utl.cc
│ │ │ ├── base64/
│ │ │ │ └── base64.cc
│ │ │ ├── bcm_support.h
│ │ │ ├── bio/
│ │ │ │ ├── bio.cc
│ │ │ │ ├── bio_mem.cc
│ │ │ │ ├── connect.cc
│ │ │ │ ├── errno.cc
│ │ │ │ ├── fd.cc
│ │ │ │ ├── file.cc
│ │ │ │ ├── hexdump.cc
│ │ │ │ ├── internal.h
│ │ │ │ ├── pair.cc
│ │ │ │ ├── printf.cc
│ │ │ │ ├── socket.cc
│ │ │ │ └── socket_helper.cc
│ │ │ ├── blake2/
│ │ │ │ └── blake2.cc
│ │ │ ├── bn/
│ │ │ │ ├── bn_asn1.cc
│ │ │ │ └── convert.cc
│ │ │ ├── buf/
│ │ │ │ └── buf.cc
│ │ │ ├── bytestring/
│ │ │ │ ├── asn1_compat.cc
│ │ │ │ ├── ber.cc
│ │ │ │ ├── cbb.cc
│ │ │ │ ├── cbs.cc
│ │ │ │ ├── internal.h
│ │ │ │ └── unicode.cc
│ │ │ ├── chacha/
│ │ │ │ ├── chacha.cc
│ │ │ │ └── internal.h
│ │ │ ├── cipher/
│ │ │ │ ├── derive_key.cc
│ │ │ │ ├── e_aesctrhmac.cc
│ │ │ │ ├── e_aesgcmsiv.cc
│ │ │ │ ├── e_chacha20poly1305.cc
│ │ │ │ ├── e_des.cc
│ │ │ │ ├── e_null.cc
│ │ │ │ ├── e_rc2.cc
│ │ │ │ ├── e_rc4.cc
│ │ │ │ ├── e_tls.cc
│ │ │ │ ├── get_cipher.cc
│ │ │ │ ├── internal.h
│ │ │ │ └── tls_cbc.cc
│ │ │ ├── conf/
│ │ │ │ ├── conf.cc
│ │ │ │ └── internal.h
│ │ │ ├── cpu_aarch64_apple.cc
│ │ │ ├── cpu_aarch64_fuchsia.cc
│ │ │ ├── cpu_aarch64_linux.cc
│ │ │ ├── cpu_aarch64_openbsd.cc
│ │ │ ├── cpu_aarch64_sysreg.cc
│ │ │ ├── cpu_aarch64_win.cc
│ │ │ ├── cpu_arm_freebsd.cc
│ │ │ ├── cpu_arm_linux.cc
│ │ │ ├── cpu_arm_linux.h
│ │ │ ├── cpu_intel.cc
│ │ │ ├── crypto.cc
│ │ │ ├── curve25519/
│ │ │ │ ├── asm/
│ │ │ │ │ └── x25519-asm-arm.S
│ │ │ │ ├── curve25519.cc
│ │ │ │ ├── curve25519_64_adx.cc
│ │ │ │ ├── curve25519_tables.h
│ │ │ │ ├── internal.h
│ │ │ │ └── spake25519.cc
│ │ │ ├── des/
│ │ │ │ ├── des.cc
│ │ │ │ └── internal.h
│ │ │ ├── dh/
│ │ │ │ ├── dh_asn1.cc
│ │ │ │ └── params.cc
│ │ │ ├── digest/
│ │ │ │ └── digest_extra.cc
│ │ │ ├── dsa/
│ │ │ │ ├── dsa.cc
│ │ │ │ ├── dsa_asn1.cc
│ │ │ │ └── internal.h
│ │ │ ├── ec/
│ │ │ │ ├── ec_asn1.cc
│ │ │ │ ├── ec_derive.cc
│ │ │ │ ├── hash_to_curve.cc
│ │ │ │ └── internal.h
│ │ │ ├── ecdh/
│ │ │ │ └── ecdh.cc
│ │ │ ├── ecdsa/
│ │ │ │ └── ecdsa_asn1.cc
│ │ │ ├── engine/
│ │ │ │ └── engine.cc
│ │ │ ├── err/
│ │ │ │ ├── err.cc
│ │ │ │ └── internal.h
│ │ │ ├── evp/
│ │ │ │ ├── evp.cc
│ │ │ │ ├── evp_asn1.cc
│ │ │ │ ├── evp_ctx.cc
│ │ │ │ ├── internal.h
│ │ │ │ ├── p_dh.cc
│ │ │ │ ├── p_dh_asn1.cc
│ │ │ │ ├── p_dsa_asn1.cc
│ │ │ │ ├── p_ec.cc
│ │ │ │ ├── p_ec_asn1.cc
│ │ │ │ ├── p_ed25519.cc
│ │ │ │ ├── p_ed25519_asn1.cc
│ │ │ │ ├── p_hkdf.cc
│ │ │ │ ├── p_rsa.cc
│ │ │ │ ├── p_rsa_asn1.cc
│ │ │ │ ├── p_x25519.cc
│ │ │ │ ├── p_x25519_asn1.cc
│ │ │ │ ├── pbkdf.cc
│ │ │ │ ├── print.cc
│ │ │ │ ├── scrypt.cc
│ │ │ │ └── sign.cc
│ │ │ ├── ex_data.cc
│ │ │ ├── fipsmodule/
│ │ │ │ ├── aes/
│ │ │ │ │ ├── aes.cc.inc
│ │ │ │ │ ├── aes_nohw.cc.inc
│ │ │ │ │ ├── cbc.cc.inc
│ │ │ │ │ ├── cfb.cc.inc
│ │ │ │ │ ├── ctr.cc.inc
│ │ │ │ │ ├── gcm.cc.inc
│ │ │ │ │ ├── gcm_nohw.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── key_wrap.cc.inc
│ │ │ │ │ ├── mode_wrappers.cc.inc
│ │ │ │ │ ├── ofb.cc.inc
│ │ │ │ │ └── polyval.cc.inc
│ │ │ │ ├── bcm.cc
│ │ │ │ ├── bcm_interface.h
│ │ │ │ ├── bn/
│ │ │ │ │ ├── add.cc.inc
│ │ │ │ │ ├── asm/
│ │ │ │ │ │ └── x86_64-gcc.cc.inc
│ │ │ │ │ ├── bn.cc.inc
│ │ │ │ │ ├── bytes.cc.inc
│ │ │ │ │ ├── cmp.cc.inc
│ │ │ │ │ ├── ctx.cc.inc
│ │ │ │ │ ├── div.cc.inc
│ │ │ │ │ ├── div_extra.cc.inc
│ │ │ │ │ ├── exponentiation.cc.inc
│ │ │ │ │ ├── gcd.cc.inc
│ │ │ │ │ ├── gcd_extra.cc.inc
│ │ │ │ │ ├── generic.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── jacobi.cc.inc
│ │ │ │ │ ├── montgomery.cc.inc
│ │ │ │ │ ├── montgomery_inv.cc.inc
│ │ │ │ │ ├── mul.cc.inc
│ │ │ │ │ ├── prime.cc.inc
│ │ │ │ │ ├── random.cc.inc
│ │ │ │ │ ├── rsaz_exp.cc.inc
│ │ │ │ │ ├── rsaz_exp.h
│ │ │ │ │ ├── shift.cc.inc
│ │ │ │ │ └── sqrt.cc.inc
│ │ │ │ ├── cipher/
│ │ │ │ │ ├── aead.cc.inc
│ │ │ │ │ ├── cipher.cc.inc
│ │ │ │ │ ├── e_aes.cc.inc
│ │ │ │ │ ├── e_aesccm.cc.inc
│ │ │ │ │ └── internal.h
│ │ │ │ ├── cmac/
│ │ │ │ │ └── cmac.cc.inc
│ │ │ │ ├── delocate.h
│ │ │ │ ├── dh/
│ │ │ │ │ ├── check.cc.inc
│ │ │ │ │ ├── dh.cc.inc
│ │ │ │ │ └── internal.h
│ │ │ │ ├── digest/
│ │ │ │ │ ├── digest.cc.inc
│ │ │ │ │ ├── digests.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── md32_common.h
│ │ │ │ ├── digestsign/
│ │ │ │ │ └── digestsign.cc.inc
│ │ │ │ ├── ec/
│ │ │ │ │ ├── builtin_curves.h
│ │ │ │ │ ├── ec.cc.inc
│ │ │ │ │ ├── ec_key.cc.inc
│ │ │ │ │ ├── ec_montgomery.cc.inc
│ │ │ │ │ ├── felem.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── oct.cc.inc
│ │ │ │ │ ├── p224-64.cc.inc
│ │ │ │ │ ├── p256-nistz-table.h
│ │ │ │ │ ├── p256-nistz.cc.inc
│ │ │ │ │ ├── p256-nistz.h
│ │ │ │ │ ├── p256.cc.inc
│ │ │ │ │ ├── p256_table.h
│ │ │ │ │ ├── scalar.cc.inc
│ │ │ │ │ ├── simple.cc.inc
│ │ │ │ │ ├── simple_mul.cc.inc
│ │ │ │ │ ├── util.cc.inc
│ │ │ │ │ └── wnaf.cc.inc
│ │ │ │ ├── ecdh/
│ │ │ │ │ └── ecdh.cc.inc
│ │ │ │ ├── ecdsa/
│ │ │ │ │ ├── ecdsa.cc.inc
│ │ │ │ │ └── internal.h
│ │ │ │ ├── fips_shared_support.cc
│ │ │ │ ├── hkdf/
│ │ │ │ │ └── hkdf.cc.inc
│ │ │ │ ├── hmac/
│ │ │ │ │ └── hmac.cc.inc
│ │ │ │ ├── keccak/
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── keccak.cc.inc
│ │ │ │ ├── mldsa/
│ │ │ │ │ └── mldsa.cc.inc
│ │ │ │ ├── mlkem/
│ │ │ │ │ └── mlkem.cc.inc
│ │ │ │ ├── rand/
│ │ │ │ │ ├── ctrdrbg.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── rand.cc.inc
│ │ │ │ ├── rsa/
│ │ │ │ │ ├── blinding.cc.inc
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── padding.cc.inc
│ │ │ │ │ ├── rsa.cc.inc
│ │ │ │ │ └── rsa_impl.cc.inc
│ │ │ │ ├── self_check/
│ │ │ │ │ ├── fips.cc.inc
│ │ │ │ │ └── self_check.cc.inc
│ │ │ │ ├── service_indicator/
│ │ │ │ │ ├── internal.h
│ │ │ │ │ └── service_indicator.cc.inc
│ │ │ │ ├── sha/
│ │ │ │ │ ├── internal.h
│ │ │ │ │ ├── sha1.cc.inc
│ │ │ │ │ ├── sha256.cc.inc
│ │ │ │ │ └── sha512.cc.inc
│ │ │ │ ├── slhdsa/
│ │ │ │ │ ├── address.h
│ │ │ │ │ ├── fors.cc.inc
│ │ │ │ │ ├── fors.h
│ │ │ │ │ ├── merkle.cc.inc
│ │ │ │ │ ├── merkle.h
│ │ │ │ │ ├── params.h
│ │ │ │ │ ├── slhdsa.cc.inc
│ │ │ │ │ ├── thash.cc.inc
│ │ │ │ │ ├── thash.h
│ │ │ │ │ ├── wots.cc.inc
│ │ │ │ │ └── wots.h
│ │ │ │ └── tls/
│ │ │ │ ├── internal.h
│ │ │ │ └── kdf.cc.inc
│ │ │ ├── hpke/
│ │ │ │ └── hpke.cc
│ │ │ ├── hrss/
│ │ │ │ ├── asm/
│ │ │ │ │ └── poly_rq_mul.S
│ │ │ │ ├── hrss.cc
│ │ │ │ └── internal.h
│ │ │ ├── internal.h
│ │ │ ├── kyber/
│ │ │ │ ├── internal.h
│ │ │ │ └── kyber.cc
│ │ │ ├── lhash/
│ │ │ │ ├── internal.h
│ │ │ │ └── lhash.cc
│ │ │ ├── md4/
│ │ │ │ └── md4.cc
│ │ │ ├── md5/
│ │ │ │ ├── internal.h
│ │ │ │ └── md5.cc
│ │ │ ├── mem.cc
│ │ │ ├── mldsa/
│ │ │ │ └── mldsa.cc
│ │ │ ├── mlkem/
│ │ │ │ └── mlkem.cc
│ │ │ ├── obj/
│ │ │ │ ├── obj.cc
│ │ │ │ ├── obj_dat.h
│ │ │ │ └── obj_xref.cc
│ │ │ ├── pem/
│ │ │ │ ├── internal.h
│ │ │ │ ├── pem_all.cc
│ │ │ │ ├── pem_info.cc
│ │ │ │ ├── pem_lib.cc
│ │ │ │ ├── pem_oth.cc
│ │ │ │ ├── pem_pk8.cc
│ │ │ │ ├── pem_pkey.cc
│ │ │ │ ├── pem_x509.cc
│ │ │ │ └── pem_xaux.cc
│ │ │ ├── pkcs7/
│ │ │ │ ├── internal.h
│ │ │ │ ├── pkcs7.cc
│ │ │ │ └── pkcs7_x509.cc
│ │ │ ├── pkcs8/
│ │ │ │ ├── internal.h
│ │ │ │ ├── p5_pbev2.cc
│ │ │ │ ├── pkcs8.cc
│ │ │ │ └── pkcs8_x509.cc
│ │ │ ├── poly1305/
│ │ │ │ ├── internal.h
│ │ │ │ ├── poly1305.cc
│ │ │ │ ├── poly1305_arm.cc
│ │ │ │ ├── poly1305_arm_asm.S
│ │ │ │ └── poly1305_vec.cc
│ │ │ ├── pool/
│ │ │ │ ├── internal.h
│ │ │ │ └── pool.cc
│ │ │ ├── rand/
│ │ │ │ ├── deterministic.cc
│ │ │ │ ├── fork_detect.cc
│ │ │ │ ├── forkunsafe.cc
│ │ │ │ ├── getentropy.cc
│ │ │ │ ├── getrandom_fillin.h
│ │ │ │ ├── ios.cc
│ │ │ │ ├── passive.cc
│ │ │ │ ├── rand.cc
│ │ │ │ ├── sysrand_internal.h
│ │ │ │ ├── trusty.cc
│ │ │ │ ├── urandom.cc
│ │ │ │ └── windows.cc
│ │ │ ├── rc4/
│ │ │ │ └── rc4.cc
│ │ │ ├── refcount.cc
│ │ │ ├── rsa/
│ │ │ │ ├── internal.h
│ │ │ │ ├── rsa_asn1.cc
│ │ │ │ ├── rsa_crypt.cc
│ │ │ │ ├── rsa_extra.cc
│ │ │ │ └── rsa_print.cc
│ │ │ ├── sha/
│ │ │ │ ├── sha1.cc
│ │ │ │ ├── sha256.cc
│ │ │ │ └── sha512.cc
│ │ │ ├── siphash/
│ │ │ │ └── siphash.cc
│ │ │ ├── slhdsa/
│ │ │ │ └── slhdsa.cc
│ │ │ ├── spake2plus/
│ │ │ │ ├── internal.h
│ │ │ │ └── spake2plus.cc
│ │ │ ├── stack/
│ │ │ │ └── stack.cc
│ │ │ ├── thread.cc
│ │ │ ├── thread_none.cc
│ │ │ ├── thread_pthread.cc
│ │ │ ├── thread_win.cc
│ │ │ ├── trust_token/
│ │ │ │ ├── internal.h
│ │ │ │ ├── pmbtoken.cc
│ │ │ │ ├── trust_token.cc
│ │ │ │ └── voprf.cc
│ │ │ └── x509/
│ │ │ ├── a_digest.cc
│ │ │ ├── a_sign.cc
│ │ │ ├── a_verify.cc
│ │ │ ├── algorithm.cc
│ │ │ ├── asn1_gen.cc
│ │ │ ├── by_dir.cc
│ │ │ ├── by_file.cc
│ │ │ ├── ext_dat.h
│ │ │ ├── i2d_pr.cc
│ │ │ ├── internal.h
│ │ │ ├── name_print.cc
│ │ │ ├── policy.cc
│ │ │ ├── rsa_pss.cc
│ │ │ ├── t_crl.cc
│ │ │ ├── t_req.cc
│ │ │ ├── t_x509.cc
│ │ │ ├── t_x509a.cc
│ │ │ ├── v3_akey.cc
│ │ │ ├── v3_akeya.cc
│ │ │ ├── v3_alt.cc
│ │ │ ├── v3_bcons.cc
│ │ │ ├── v3_bitst.cc
│ │ │ ├── v3_conf.cc
│ │ │ ├── v3_cpols.cc
│ │ │ ├── v3_crld.cc
│ │ │ ├── v3_enum.cc
│ │ │ ├── v3_extku.cc
│ │ │ ├── v3_genn.cc
│ │ │ ├── v3_ia5.cc
│ │ │ ├── v3_info.cc
│ │ │ ├── v3_int.cc
│ │ │ ├── v3_lib.cc
│ │ │ ├── v3_ncons.cc
│ │ │ ├── v3_ocsp.cc
│ │ │ ├── v3_pcons.cc
│ │ │ ├── v3_pmaps.cc
│ │ │ ├── v3_prn.cc
│ │ │ ├── v3_purp.cc
│ │ │ ├── v3_skey.cc
│ │ │ ├── v3_utl.cc
│ │ │ ├── x509.cc
│ │ │ ├── x509_att.cc
│ │ │ ├── x509_cmp.cc
│ │ │ ├── x509_d2.cc
│ │ │ ├── x509_def.cc
│ │ │ ├── x509_ext.cc
│ │ │ ├── x509_lu.cc
│ │ │ ├── x509_obj.cc
│ │ │ ├── x509_req.cc
│ │ │ ├── x509_set.cc
│ │ │ ├── x509_trs.cc
│ │ │ ├── x509_txt.cc
│ │ │ ├── x509_v3.cc
│ │ │ ├── x509_vfy.cc
│ │ │ ├── x509_vpm.cc
│ │ │ ├── x509cset.cc
│ │ │ ├── x509name.cc
│ │ │ ├── x509rset.cc
│ │ │ ├── x509spki.cc
│ │ │ ├── x_algor.cc
│ │ │ ├── x_all.cc
│ │ │ ├── x_attrib.cc
│ │ │ ├── x_crl.cc
│ │ │ ├── x_exten.cc
│ │ │ ├── x_name.cc
│ │ │ ├── x_pubkey.cc
│ │ │ ├── x_req.cc
│ │ │ ├── x_sig.cc
│ │ │ ├── x_spki.cc
│ │ │ ├── x_val.cc
│ │ │ ├── x_x509.cc
│ │ │ └── x_x509a.cc
│ │ ├── gen/
│ │ │ ├── bcm/
│ │ │ │ ├── aes-gcm-avx10-x86_64-apple.S
│ │ │ │ ├── aes-gcm-avx10-x86_64-linux.S
│ │ │ │ ├── aes-gcm-avx2-x86_64-apple.S
│ │ │ │ ├── aes-gcm-avx2-x86_64-linux.S
│ │ │ │ ├── aesni-gcm-x86_64-apple.S
│ │ │ │ ├── aesni-gcm-x86_64-linux.S
│ │ │ │ ├── aesni-x86-apple.S
│ │ │ │ ├── aesni-x86-linux.S
│ │ │ │ ├── aesni-x86_64-apple.S
│ │ │ │ ├── aesni-x86_64-linux.S
│ │ │ │ ├── aesv8-armv7-linux.S
│ │ │ │ ├── aesv8-armv8-apple.S
│ │ │ │ ├── aesv8-armv8-linux.S
│ │ │ │ ├── aesv8-armv8-win.S
│ │ │ │ ├── aesv8-gcm-armv8-apple.S
│ │ │ │ ├── aesv8-gcm-armv8-linux.S
│ │ │ │ ├── aesv8-gcm-armv8-win.S
│ │ │ │ ├── armv4-mont-linux.S
│ │ │ │ ├── armv8-mont-apple.S
│ │ │ │ ├── armv8-mont-linux.S
│ │ │ │ ├── armv8-mont-win.S
│ │ │ │ ├── bn-586-apple.S
│ │ │ │ ├── bn-586-linux.S
│ │ │ │ ├── bn-armv8-apple.S
│ │ │ │ ├── bn-armv8-linux.S
│ │ │ │ ├── bn-armv8-win.S
│ │ │ │ ├── bsaes-armv7-linux.S
│ │ │ │ ├── co-586-apple.S
│ │ │ │ ├── co-586-linux.S
│ │ │ │ ├── ghash-armv4-linux.S
│ │ │ │ ├── ghash-neon-armv8-apple.S
│ │ │ │ ├── ghash-neon-armv8-linux.S
│ │ │ │ ├── ghash-neon-armv8-win.S
│ │ │ │ ├── ghash-ssse3-x86-apple.S
│ │ │ │ ├── ghash-ssse3-x86-linux.S
│ │ │ │ ├── ghash-ssse3-x86_64-apple.S
│ │ │ │ ├── ghash-ssse3-x86_64-linux.S
│ │ │ │ ├── ghash-x86-apple.S
│ │ │ │ ├── ghash-x86-linux.S
│ │ │ │ ├── ghash-x86_64-apple.S
│ │ │ │ ├── ghash-x86_64-linux.S
│ │ │ │ ├── ghashv8-armv7-linux.S
│ │ │ │ ├── ghashv8-armv8-apple.S
│ │ │ │ ├── ghashv8-armv8-linux.S
│ │ │ │ ├── ghashv8-armv8-win.S
│ │ │ │ ├── p256-armv8-asm-apple.S
│ │ │ │ ├── p256-armv8-asm-linux.S
│ │ │ │ ├── p256-armv8-asm-win.S
│ │ │ │ ├── p256-x86_64-asm-apple.S
│ │ │ │ ├── p256-x86_64-asm-linux.S
│ │ │ │ ├── p256_beeu-armv8-asm-apple.S
│ │ │ │ ├── p256_beeu-armv8-asm-linux.S
│ │ │ │ ├── p256_beeu-armv8-asm-win.S
│ │ │ │ ├── p256_beeu-x86_64-asm-apple.S
│ │ │ │ ├── p256_beeu-x86_64-asm-linux.S
│ │ │ │ ├── rdrand-x86_64-apple.S
│ │ │ │ ├── rdrand-x86_64-linux.S
│ │ │ │ ├── rsaz-avx2-apple.S
│ │ │ │ ├── rsaz-avx2-linux.S
│ │ │ │ ├── sha1-586-apple.S
│ │ │ │ ├── sha1-586-linux.S
│ │ │ │ ├── sha1-armv4-large-linux.S
│ │ │ │ ├── sha1-armv8-apple.S
│ │ │ │ ├── sha1-armv8-linux.S
│ │ │ │ ├── sha1-armv8-win.S
│ │ │ │ ├── sha1-x86_64-apple.S
│ │ │ │ ├── sha1-x86_64-linux.S
│ │ │ │ ├── sha256-586-apple.S
│ │ │ │ ├── sha256-586-linux.S
│ │ │ │ ├── sha256-armv4-linux.S
│ │ │ │ ├── sha256-armv8-apple.S
│ │ │ │ ├── sha256-armv8-linux.S
│ │ │ │ ├── sha256-armv8-win.S
│ │ │ │ ├── sha256-x86_64-apple.S
│ │ │ │ ├── sha256-x86_64-linux.S
│ │ │ │ ├── sha512-586-apple.S
│ │ │ │ ├── sha512-586-linux.S
│ │ │ │ ├── sha512-armv4-linux.S
│ │ │ │ ├── sha512-armv8-apple.S
│ │ │ │ ├── sha512-armv8-linux.S
│ │ │ │ ├── sha512-armv8-win.S
│ │ │ │ ├── sha512-x86_64-apple.S
│ │ │ │ ├── sha512-x86_64-linux.S
│ │ │ │ ├── vpaes-armv7-linux.S
│ │ │ │ ├── vpaes-armv8-apple.S
│ │ │ │ ├── vpaes-armv8-linux.S
│ │ │ │ ├── vpaes-armv8-win.S
│ │ │ │ ├── vpaes-x86-apple.S
│ │ │ │ ├── vpaes-x86-linux.S
│ │ │ │ ├── vpaes-x86_64-apple.S
│ │ │ │ ├── vpaes-x86_64-linux.S
│ │ │ │ ├── x86-mont-apple.S
│ │ │ │ ├── x86-mont-linux.S
│ │ │ │ ├── x86_64-mont-apple.S
│ │ │ │ ├── x86_64-mont-linux.S
│ │ │ │ ├── x86_64-mont5-apple.S
│ │ │ │ └── x86_64-mont5-linux.S
│ │ │ └── crypto/
│ │ │ ├── aes128gcmsiv-x86_64-apple.S
│ │ │ ├── aes128gcmsiv-x86_64-linux.S
│ │ │ ├── chacha-armv4-linux.S
│ │ │ ├── chacha-armv8-apple.S
│ │ │ ├── chacha-armv8-linux.S
│ │ │ ├── chacha-armv8-win.S
│ │ │ ├── chacha-x86-apple.S
│ │ │ ├── chacha-x86-linux.S
│ │ │ ├── chacha-x86_64-apple.S
│ │ │ ├── chacha-x86_64-linux.S
│ │ │ ├── chacha20_poly1305_armv8-apple.S
│ │ │ ├── chacha20_poly1305_armv8-linux.S
│ │ │ ├── chacha20_poly1305_armv8-win.S
│ │ │ ├── chacha20_poly1305_x86_64-apple.S
│ │ │ ├── chacha20_poly1305_x86_64-linux.S
│ │ │ ├── err_data.cc
│ │ │ ├── md5-586-apple.S
│ │ │ ├── md5-586-linux.S
│ │ │ ├── md5-x86_64-apple.S
│ │ │ └── md5-x86_64-linux.S
│ │ ├── hash.txt
│ │ ├── include/
│ │ │ ├── CNIOBoringSSL.h
│ │ │ ├── CNIOBoringSSL_aead.h
│ │ │ ├── CNIOBoringSSL_aes.h
│ │ │ ├── CNIOBoringSSL_arm_arch.h
│ │ │ ├── CNIOBoringSSL_asm_base.h
│ │ │ ├── CNIOBoringSSL_asn1.h
│ │ │ ├── CNIOBoringSSL_asn1_mac.h
│ │ │ ├── CNIOBoringSSL_asn1t.h
│ │ │ ├── CNIOBoringSSL_base.h
│ │ │ ├── CNIOBoringSSL_base64.h
│ │ │ ├── CNIOBoringSSL_bcm_public.h
│ │ │ ├── CNIOBoringSSL_bio.h
│ │ │ ├── CNIOBoringSSL_blake2.h
│ │ │ ├── CNIOBoringSSL_blowfish.h
│ │ │ ├── CNIOBoringSSL_bn.h
│ │ │ ├── CNIOBoringSSL_boringssl_prefix_symbols.h
│ │ │ ├── CNIOBoringSSL_boringssl_prefix_symbols_asm.h
│ │ │ ├── CNIOBoringSSL_buf.h
│ │ │ ├── CNIOBoringSSL_buffer.h
│ │ │ ├── CNIOBoringSSL_bytestring.h
│ │ │ ├── CNIOBoringSSL_cast.h
│ │ │ ├── CNIOBoringSSL_chacha.h
│ │ │ ├── CNIOBoringSSL_cipher.h
│ │ │ ├── CNIOBoringSSL_cmac.h
│ │ │ ├── CNIOBoringSSL_conf.h
│ │ │ ├── CNIOBoringSSL_cpu.h
│ │ │ ├── CNIOBoringSSL_crypto.h
│ │ │ ├── CNIOBoringSSL_ctrdrbg.h
│ │ │ ├── CNIOBoringSSL_curve25519.h
│ │ │ ├── CNIOBoringSSL_des.h
│ │ │ ├── CNIOBoringSSL_dh.h
│ │ │ ├── CNIOBoringSSL_digest.h
│ │ │ ├── CNIOBoringSSL_dsa.h
│ │ │ ├── CNIOBoringSSL_dtls1.h
│ │ │ ├── CNIOBoringSSL_e_os2.h
│ │ │ ├── CNIOBoringSSL_ec.h
│ │ │ ├── CNIOBoringSSL_ec_key.h
│ │ │ ├── CNIOBoringSSL_ecdh.h
│ │ │ ├── CNIOBoringSSL_ecdsa.h
│ │ │ ├── CNIOBoringSSL_engine.h
│ │ │ ├── CNIOBoringSSL_err.h
│ │ │ ├── CNIOBoringSSL_evp.h
│ │ │ ├── CNIOBoringSSL_evp_errors.h
│ │ │ ├── CNIOBoringSSL_ex_data.h
│ │ │ ├── CNIOBoringSSL_hkdf.h
│ │ │ ├── CNIOBoringSSL_hmac.h
│ │ │ ├── CNIOBoringSSL_hpke.h
│ │ │ ├── CNIOBoringSSL_hrss.h
│ │ │ ├── CNIOBoringSSL_is_boringssl.h
│ │ │ ├── CNIOBoringSSL_kdf.h
│ │ │ ├── CNIOBoringSSL_lhash.h
│ │ │ ├── CNIOBoringSSL_md4.h
│ │ │ ├── CNIOBoringSSL_md5.h
│ │ │ ├── CNIOBoringSSL_mem.h
│ │ │ ├── CNIOBoringSSL_mldsa.h
│ │ │ ├── CNIOBoringSSL_mlkem.h
│ │ │ ├── CNIOBoringSSL_nid.h
│ │ │ ├── CNIOBoringSSL_obj.h
│ │ │ ├── CNIOBoringSSL_obj_mac.h
│ │ │ ├── CNIOBoringSSL_objects.h
│ │ │ ├── CNIOBoringSSL_opensslconf.h
│ │ │ ├── CNIOBoringSSL_opensslv.h
│ │ │ ├── CNIOBoringSSL_ossl_typ.h
│ │ │ ├── CNIOBoringSSL_pem.h
│ │ │ ├── CNIOBoringSSL_pkcs12.h
│ │ │ ├── CNIOBoringSSL_pkcs7.h
│ │ │ ├── CNIOBoringSSL_pkcs8.h
│ │ │ ├── CNIOBoringSSL_poly1305.h
│ │ │ ├── CNIOBoringSSL_pool.h
│ │ │ ├── CNIOBoringSSL_posix_time.h
│ │ │ ├── CNIOBoringSSL_rand.h
│ │ │ ├── CNIOBoringSSL_rc4.h
│ │ │ ├── CNIOBoringSSL_ripemd.h
│ │ │ ├── CNIOBoringSSL_rsa.h
│ │ │ ├── CNIOBoringSSL_safestack.h
│ │ │ ├── CNIOBoringSSL_service_indicator.h
│ │ │ ├── CNIOBoringSSL_sha.h
│ │ │ ├── CNIOBoringSSL_siphash.h
│ │ │ ├── CNIOBoringSSL_slhdsa.h
│ │ │ ├── CNIOBoringSSL_span.h
│ │ │ ├── CNIOBoringSSL_srtp.h
│ │ │ ├── CNIOBoringSSL_ssl.h
│ │ │ ├── CNIOBoringSSL_ssl3.h
│ │ │ ├── CNIOBoringSSL_stack.h
│ │ │ ├── CNIOBoringSSL_target.h
│ │ │ ├── CNIOBoringSSL_thread.h
│ │ │ ├── CNIOBoringSSL_time.h
│ │ │ ├── CNIOBoringSSL_tls1.h
│ │ │ ├── CNIOBoringSSL_trust_token.h
│ │ │ ├── CNIOBoringSSL_type_check.h
│ │ │ ├── CNIOBoringSSL_x509.h
│ │ │ ├── CNIOBoringSSL_x509_vfy.h
│ │ │ ├── CNIOBoringSSL_x509v3.h
│ │ │ ├── CNIOBoringSSL_x509v3_errors.h
│ │ │ ├── boringssl_prefix_symbols_nasm.inc
│ │ │ ├── experimental/
│ │ │ │ └── CNIOBoringSSL_kyber.h
│ │ │ └── module.modulemap
│ │ ├── ssl/
│ │ │ ├── bio_ssl.cc
│ │ │ ├── d1_both.cc
│ │ │ ├── d1_lib.cc
│ │ │ ├── d1_pkt.cc
│ │ │ ├── d1_srtp.cc
│ │ │ ├── dtls_method.cc
│ │ │ ├── dtls_record.cc
│ │ │ ├── encrypted_client_hello.cc
│ │ │ ├── extensions.cc
│ │ │ ├── handoff.cc
│ │ │ ├── handshake.cc
│ │ │ ├── handshake_client.cc
│ │ │ ├── handshake_server.cc
│ │ │ ├── internal.h
│ │ │ ├── s3_both.cc
│ │ │ ├── s3_lib.cc
│ │ │ ├── s3_pkt.cc
│ │ │ ├── ssl_aead_ctx.cc
│ │ │ ├── ssl_asn1.cc
│ │ │ ├── ssl_buffer.cc
│ │ │ ├── ssl_cert.cc
│ │ │ ├── ssl_cipher.cc
│ │ │ ├── ssl_credential.cc
│ │ │ ├── ssl_file.cc
│ │ │ ├── ssl_key_share.cc
│ │ │ ├── ssl_lib.cc
│ │ │ ├── ssl_privkey.cc
│ │ │ ├── ssl_session.cc
│ │ │ ├── ssl_stat.cc
│ │ │ ├── ssl_transcript.cc
│ │ │ ├── ssl_versions.cc
│ │ │ ├── ssl_x509.cc
│ │ │ ├── t1_enc.cc
│ │ │ ├── tls13_both.cc
│ │ │ ├── tls13_client.cc
│ │ │ ├── tls13_enc.cc
│ │ │ ├── tls13_server.cc
│ │ │ ├── tls_method.cc
│ │ │ └── tls_record.cc
│ │ └── third_party/
│ │ └── fiat/
│ │ ├── asm/
│ │ │ ├── fiat_curve25519_adx_mul.S
│ │ │ ├── fiat_curve25519_adx_square.S
│ │ │ ├── fiat_p256_adx_mul.S
│ │ │ └── fiat_p256_adx_sqr.S
│ │ ├── curve25519_32.h
│ │ ├── curve25519_64.h
│ │ ├── curve25519_64_adx.h
│ │ ├── curve25519_64_msvc.h
│ │ ├── p256_32.h
│ │ ├── p256_64.h
│ │ └── p256_64_msvc.h
│ ├── CNIOBoringSSLShims/
│ │ ├── include/
│ │ │ └── CNIOBoringSSLShims.h
│ │ └── shims.c
│ ├── NIOSSL/
│ │ ├── AndroidCABundle.swift
│ │ ├── ByteBufferBIO.swift
│ │ ├── CustomPrivateKey.swift
│ │ ├── Docs.docc/
│ │ │ ├── TLSConfiguration.md
│ │ │ ├── index.md
│ │ │ ├── quantum-secure-tls.md
│ │ │ └── trust-roots-behavior.md
│ │ ├── IdentityVerification.swift
│ │ ├── LinuxCABundle.swift
│ │ ├── NIOSSLClientHandler.swift
│ │ ├── NIOSSLHandler+Configuration.swift
│ │ ├── NIOSSLHandler.swift
│ │ ├── NIOSSLServerHandler.swift
│ │ ├── ObjectIdentifier.swift
│ │ ├── PosixPort.swift
│ │ ├── PrivacyInfo.xcprivacy
│ │ ├── SSLCallbacks.swift
│ │ ├── SSLCertificate.swift
│ │ ├── SSLCertificateExtensions.swift
│ │ ├── SSLCertificateName.swift
│ │ ├── SSLConnection.swift
│ │ ├── SSLContext.swift
│ │ ├── SSLErrors.swift
│ │ ├── SSLInit.swift
│ │ ├── SSLPKCS12Bundle.swift
│ │ ├── SSLPrivateKey.swift
│ │ ├── SSLPublicKey.swift
│ │ ├── SecurityFrameworkCertificateVerification.swift
│ │ ├── String+unsafeUninitializedCapacity.swift
│ │ ├── SubjectAlternativeName.swift
│ │ ├── SwiftCrypto/
│ │ │ ├── NIOSSLSecureBytes.swift
│ │ │ ├── RNG.swift
│ │ │ ├── SafeCompare.swift
│ │ │ └── Zeroization.swift
│ │ ├── TLSConfiguration.swift
│ │ ├── UniversalBootstrapSupport.swift
│ │ └── UnsafeKeyAndChainTarget.swift
│ ├── NIOSSLHTTP1Client/
│ │ ├── README.md
│ │ └── main.swift
│ ├── NIOSSLPerformanceTester/
│ │ ├── BenchManyWrites.swift
│ │ ├── BenchRepeatedHandshakes.swift
│ │ ├── Benchmark.swift
│ │ ├── main.swift
│ │ └── shared.swift
│ └── NIOTLSServer/
│ ├── README.md
│ └── main.swift
├── Tests/
│ └── NIOSSLTests/
│ ├── ByteBufferBIOTest.swift
│ ├── CertificateVerificationTests.swift
│ ├── ClientSNITests.swift
│ ├── CustomPrivateKeyTests.swift
│ ├── IdentityVerificationTest.swift
│ ├── NIOSSLALPNTest.swift
│ ├── NIOSSLIntegrationTest.swift
│ ├── NIOSSLSecureBytesTests.swift
│ ├── NIOSSLTestHelpers.swift
│ ├── ObjectIdentifierTests.swift
│ ├── SSLCertificateExtensionsTests.swift
│ ├── SSLCertificateTest.swift
│ ├── SSLContextTests.swift
│ ├── SSLPKCS12BundleTest.swift
│ ├── SSLPrivateKeyTests.swift
│ ├── SecurityFrameworkVerificationTests.swift
│ ├── TLS13RecordObserver.swift
│ ├── TLSConfigurationTest.swift
│ ├── UnsafeTransfer.swift
│ └── UnwrappingTests.swift
├── dev/
│ └── git.commit.template
├── docker/
│ ├── Dockerfile
│ ├── docker-compose.2204.510.yaml
│ ├── docker-compose.2204.58.yaml
│ ├── docker-compose.2204.59.yaml
│ ├── docker-compose.2204.main.yaml
│ └── docker-compose.yaml
└── scripts/
├── analyze_performance_results.rb
├── build-asm.py
├── integration_tests.sh
├── patch-1-inttypes.patch
├── patch-2-inttypes.patch
├── patch-3-more-inttypes.patch
└── vendor-boringssl.sh
Showing preview only (506K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4966 symbols across 343 files)
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_bitstr.cc
function ASN1_BIT_STRING_set (line 22) | int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, const unsigned char *d,
function asn1_bit_string_length (line 27) | int asn1_bit_string_length(const ASN1_BIT_STRING *str,
function ASN1_BIT_STRING_num_bytes (line 55) | int ASN1_BIT_STRING_num_bytes(const ASN1_BIT_STRING *str, size_t *out) {
function i2c_ASN1_BIT_STRING (line 65) | int i2c_ASN1_BIT_STRING(const ASN1_BIT_STRING *a, unsigned char **pp) {
function ASN1_BIT_STRING (line 92) | ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
function ASN1_BIT_STRING_set_bit (line 165) | int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) {
function ASN1_BIT_STRING_get_bit (line 207) | int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) {
function ASN1_BIT_STRING_check (line 222) | int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a, const unsigned char ...
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_bool.cc
function i2d_ASN1_BOOLEAN (line 18) | int i2d_ASN1_BOOLEAN(ASN1_BOOLEAN a, unsigned char **outp) {
function ASN1_BOOLEAN (line 28) | ASN1_BOOLEAN d2i_ASN1_BOOLEAN(ASN1_BOOLEAN *out, const unsigned char **inp,
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_gentm.cc
function asn1_generalizedtime_to_tm (line 22) | int asn1_generalizedtime_to_tm(struct tm *tm, const ASN1_GENERALIZEDTIME...
function ASN1_GENERALIZEDTIME_check (line 34) | int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d) {
function ASN1_GENERALIZEDTIME_set_string (line 38) | int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char ...
function ASN1_GENERALIZEDTIME (line 55) | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
function ASN1_GENERALIZEDTIME (line 60) | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_i2d_fp.cc
function ASN1_item_i2d_fp (line 17) | int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x) {
function ASN1_item_i2d_bio (line 28) | int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_int.cc
function ASN1_INTEGER (line 23) | ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x) {
function ASN1_INTEGER_cmp (line 27) | int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y) {
function negate_twos_complement (line 52) | static void negate_twos_complement(uint8_t *buf, size_t len) {
function is_all_zeros (line 61) | static int is_all_zeros(const uint8_t *in, size_t len) {
function i2c_ASN1_INTEGER (line 70) | int i2c_ASN1_INTEGER(const ASN1_INTEGER *in, unsigned char **outp) {
function ASN1_INTEGER (line 129) | ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **out, const unsigned char *...
function ASN1_INTEGER_set_int64 (line 204) | int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t v) {
function ASN1_ENUMERATED_set_int64 (line 217) | int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t v) {
function ASN1_INTEGER_set (line 230) | int ASN1_INTEGER_set(ASN1_INTEGER *a, long v) {
function ASN1_ENUMERATED_set (line 235) | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) {
function asn1_string_set_uint64 (line 240) | static int asn1_string_set_uint64(ASN1_STRING *out, uint64_t v, int type) {
function ASN1_INTEGER_set_uint64 (line 257) | int ASN1_INTEGER_set_uint64(ASN1_INTEGER *out, uint64_t v) {
function ASN1_ENUMERATED_set_uint64 (line 261) | int ASN1_ENUMERATED_set_uint64(ASN1_ENUMERATED *out, uint64_t v) {
function asn1_string_get_abs_uint64 (line 265) | static int asn1_string_get_abs_uint64(uint64_t *out, const ASN1_STRING *a,
function asn1_string_get_uint64 (line 281) | static int asn1_string_get_uint64(uint64_t *out, const ASN1_STRING *a,
function ASN1_INTEGER_get_uint64 (line 293) | int ASN1_INTEGER_get_uint64(uint64_t *out, const ASN1_INTEGER *a) {
function ASN1_ENUMERATED_get_uint64 (line 297) | int ASN1_ENUMERATED_get_uint64(uint64_t *out, const ASN1_ENUMERATED *a) {
function asn1_string_get_int64 (line 301) | static int asn1_string_get_int64(int64_t *out, const ASN1_STRING *a, int...
function ASN1_INTEGER_get_int64 (line 324) | int ASN1_INTEGER_get_int64(int64_t *out, const ASN1_INTEGER *a) {
function ASN1_ENUMERATED_get_int64 (line 328) | int ASN1_ENUMERATED_get_int64(int64_t *out, const ASN1_ENUMERATED *a) {
function asn1_string_get_long (line 332) | static long asn1_string_get_long(const ASN1_STRING *a, int type) {
function ASN1_INTEGER_get (line 348) | long ASN1_INTEGER_get(const ASN1_INTEGER *a) {
function ASN1_ENUMERATED_get (line 352) | long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a) {
function ASN1_STRING (line 356) | static ASN1_STRING *bn_to_asn1_string(const BIGNUM *bn, ASN1_STRING *ai,
function ASN1_INTEGER (line 390) | ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai) {
function ASN1_ENUMERATED (line 394) | ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED...
function BIGNUM (line 398) | static BIGNUM *asn1_string_to_bn(const ASN1_STRING *ai, BIGNUM *bn, int ...
function BIGNUM (line 413) | BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn) {
function BIGNUM (line 417) | BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_mbstr.cc
function ASN1_mbstring_copy (line 29) | int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in,
function ASN1_mbstring_ncopy (line 39) | int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in,
function asn1_is_printable (line 226) | int asn1_is_printable(uint32_t value) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_object.cc
function i2d_ASN1_OBJECT (line 25) | int i2d_ASN1_OBJECT(const ASN1_OBJECT *in, unsigned char **outp) {
function i2t_ASN1_OBJECT (line 47) | int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a) {
function write_str (line 51) | static int write_str(BIO *bp, const char *str) {
function i2a_ASN1_OBJECT (line 60) | int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a) {
function ASN1_OBJECT (line 86) | ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **out, const unsigned char **inp,
function ASN1_OBJECT (line 109) | ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **out, const unsigned char **inp,
function ASN1_OBJECT (line 137) | ASN1_OBJECT *ASN1_OBJECT_new(void) {
function ASN1_OBJECT_free (line 153) | void ASN1_OBJECT_free(ASN1_OBJECT *a) {
function ASN1_OBJECT (line 172) | ASN1_OBJECT *ASN1_OBJECT_create(int nid, const unsigned char *data, size...
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_octet.cc
function ASN1_OCTET_STRING (line 15) | ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *x) {
function ASN1_OCTET_STRING_cmp (line 19) | int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
function ASN1_OCTET_STRING_set (line 24) | int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d,
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_strex.cc
function maybe_write (line 32) | static int maybe_write(BIO *out, const void *buf, int len) {
function is_control_character (line 37) | static int is_control_character(unsigned char c) { return c < 32 || c ==...
function do_esc_char (line 39) | static int do_esc_char(uint32_t c, unsigned long flags, char *do_quotes,
function do_buf (line 88) | static int do_buf(const unsigned char *buf, int buflen, int encoding,
function do_hex_dump (line 155) | static int do_hex_dump(BIO *out, unsigned char *buf, int buflen) {
function do_dump (line 178) | static int do_dump(unsigned long flags, BIO *out, const ASN1_STRING *str) {
function string_type_to_encoding (line 213) | static int string_type_to_encoding(int type) {
function ASN1_STRING_print_ex (line 240) | int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str,
function ASN1_STRING_print_ex_fp (line 300) | int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str,
function ASN1_STRING_to_UTF8 (line 316) | int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) {
function ASN1_STRING_print (line 338) | int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v) {
function ASN1_TIME_print (line 370) | int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) {
function ASN1_GENERALIZEDTIME_print (line 384) | int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm) {
function ASN1_UTCTIME_print (line 398) | int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_strnid.cc
function ASN1_STRING_set_default_mask (line 30) | void ASN1_STRING_set_default_mask(unsigned long mask) {}
function ASN1_STRING_get_default_mask (line 32) | unsigned long ASN1_STRING_get_default_mask(void) { return B_ASN1_UTF8STR...
function ASN1_STRING_set_default_mask_asc (line 34) | int ASN1_STRING_set_default_mask_asc(const char *p) { return 1; }
function ASN1_STRING (line 42) | ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned ch...
function table_cmp (line 104) | static int table_cmp(const ASN1_STRING_TABLE *a, const ASN1_STRING_TABLE...
function table_cmp_void (line 114) | static int table_cmp_void(const void *a, const void *b) {
function table_hash (line 119) | static uint32_t table_hash(const ASN1_STRING_TABLE *tbl) {
function ASN1_STRING_TABLE (line 123) | static const ASN1_STRING_TABLE *asn1_string_table_get(int nid) {
function ASN1_STRING_TABLE_add (line 144) | int ASN1_STRING_TABLE_add(int nid, long minsize, long maxsize,
function ASN1_STRING_TABLE_cleanup (line 195) | void ASN1_STRING_TABLE_cleanup(void) {}
function asn1_get_string_table_for_testing (line 197) | void asn1_get_string_table_for_testing(const ASN1_STRING_TABLE **out_ptr,
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_time.cc
function ASN1_TIME (line 31) | ASN1_TIME *ASN1_TIME_set_posix(ASN1_TIME *s, int64_t posix_time) {
function ASN1_TIME (line 35) | ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t time) {
function fits_in_utc_time (line 39) | static int fits_in_utc_time(const struct tm *tm) {
function ASN1_TIME (line 43) | ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, int64_t posix_time, int offset_day,
function ASN1_TIME_check (line 62) | int ASN1_TIME_check(const ASN1_TIME *t) {
function ASN1_GENERALIZEDTIME (line 72) | ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *in,
function ASN1_TIME_set_string (line 126) | int ASN1_TIME_set_string(ASN1_TIME *s, const char *str) {
function ASN1_TIME_set_string_X509 (line 131) | int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str) {
function asn1_time_to_tm (line 159) | static int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *t,
function ASN1_TIME_diff (line 177) | int ASN1_TIME_diff(int *out_days, int *out_seconds, const ASN1_TIME *from,
function ASN1_TIME_to_posix_nonstandard (line 189) | int ASN1_TIME_to_posix_nonstandard(const ASN1_TIME *t, int64_t *out_time) {
function ASN1_TIME_to_time_t (line 205) | int ASN1_TIME_to_time_t(const ASN1_TIME *t, time_t *out_time) {
function ASN1_TIME_to_posix (line 213) | int ASN1_TIME_to_posix(const ASN1_TIME *t, int64_t *out_time) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_type.cc
function ASN1_TYPE_get (line 21) | int ASN1_TYPE_get(const ASN1_TYPE *a) {
function asn1_type_set0_string (line 46) | void asn1_type_set0_string(ASN1_TYPE *a, ASN1_STRING *str) {
function asn1_type_cleanup (line 63) | void asn1_type_cleanup(ASN1_TYPE *a) {
function ASN1_TYPE_set (line 82) | void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value) {
function ASN1_TYPE_set1 (line 101) | int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value) {
function ASN1_TYPE_cmp (line 124) | int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/a_utctm.cc
function asn1_utctime_to_tm (line 22) | int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d,
function ASN1_UTCTIME_check (line 35) | int ASN1_UTCTIME_check(const ASN1_UTCTIME *d) {
function ASN1_UTCTIME_set_string (line 39) | int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str) {
function ASN1_UTCTIME (line 59) | ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, int64_t posix_time) {
function ASN1_UTCTIME (line 63) | ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, int64_t posix_time,
FILE: Sources/CNIOBoringSSL/crypto/asn1/asn1_lib.cc
function ASN1_get_object (line 69) | int ASN1_get_object(const unsigned char **inp, long *out_len, int *out_tag,
function ASN1_put_object (line 106) | void ASN1_put_object(unsigned char **pp, int constructed, int length, in...
function ASN1_put_eoc (line 138) | int ASN1_put_eoc(unsigned char **pp) {
function asn1_put_length (line 148) | static void asn1_put_length(unsigned char **pp, int length) {
function ASN1_object_size (line 169) | int ASN1_object_size(int constructed, int length, int tag) {
function ASN1_STRING_copy (line 198) | int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str) {
function ASN1_STRING (line 210) | ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *str) {
function ASN1_STRING_set (line 226) | int ASN1_STRING_set(ASN1_STRING *str, const void *_data, ossl_ssize_t le...
function ASN1_STRING_set0 (line 269) | void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) {
function ASN1_STRING (line 275) | ASN1_STRING *ASN1_STRING_new(void) {
function ASN1_STRING (line 279) | ASN1_STRING *ASN1_STRING_type_new(int type) {
function ASN1_STRING_free (line 293) | void ASN1_STRING_free(ASN1_STRING *str) {
function ASN1_STRING_cmp (line 301) | int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) {
function ASN1_STRING_length (line 342) | int ASN1_STRING_length(const ASN1_STRING *str) { return str->length; }
function ASN1_STRING_type (line 344) | int ASN1_STRING_type(const ASN1_STRING *str) { return str->type; }
FILE: Sources/CNIOBoringSSL/crypto/asn1/asn_pack.cc
function ASN1_STRING (line 16) | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_STRING ...
FILE: Sources/CNIOBoringSSL/crypto/asn1/f_int.cc
function i2a_ASN1_INTEGER (line 14) | int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a) {
function i2a_ASN1_ENUMERATED (line 56) | int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/f_string.cc
function i2a_ASN1_STRING (line 14) | int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/internal.h
type tm (line 28) | struct tm
type tm (line 34) | struct tm
type tm (line 43) | struct tm
type tm (line 44) | struct tm
type asn1_object_st (line 60) | struct asn1_object_st {
type ASN1_ENCODING (line 72) | typedef struct ASN1_ENCODING_st {
type tm (line 82) | struct tm
type tm (line 84) | struct tm
type ASN1_STRING_TABLE (line 178) | typedef struct {
type ASN1_VALUE (line 191) | typedef ASN1_VALUE *ASN1_new_func(void);
type ASN1_VALUE (line 193) | typedef ASN1_VALUE *ASN1_d2i_func(ASN1_VALUE **a, const unsigned char **in,
type ASN1_EXTERN_FUNCS (line 205) | typedef struct ASN1_EXTERN_FUNCS_st {
FILE: Sources/CNIOBoringSSL/crypto/asn1/posix_time.cc
function is_valid_date (line 34) | static int is_valid_date(int64_t year, int64_t month, int64_t day) {
function is_valid_time (line 65) | static int is_valid_time(int64_t hours, int64_t minutes, int64_t seconds) {
function is_valid_posix_time (line 79) | static int is_valid_posix_time(int64_t time) {
function posix_time_from_utc (line 86) | static int posix_time_from_utc(int64_t year, int64_t month, int64_t day,
function utc_from_posix_time (line 113) | static int utc_from_posix_time(int64_t time, int *out_year, int *out_month,
function OPENSSL_tm_to_posix (line 150) | int OPENSSL_tm_to_posix(const struct tm *tm, int64_t *out) {
function OPENSSL_posix_to_tm (line 156) | int OPENSSL_posix_to_tm(int64_t time, struct tm *out_tm) {
function OPENSSL_timegm (line 170) | int OPENSSL_timegm(const struct tm *tm, time_t *out) {
type tm (line 186) | struct tm
type tm (line 186) | struct tm
function OPENSSL_gmtime_adj (line 197) | int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, int64_t offset_sec) {
function OPENSSL_gmtime_diff (line 224) | int OPENSSL_gmtime_diff(int *out_days, int *out_secs, const struct tm *f...
FILE: Sources/CNIOBoringSSL/crypto/asn1/tasn_dec.cc
function ASN1_tag2bit (line 85) | unsigned long ASN1_tag2bit(int tag) {
function is_supported_universal_type (line 92) | static int is_supported_universal_type(int tag, int aclass) {
function ASN1_VALUE (line 116) | ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **pval, const unsigned char **in, l...
function asn1_item_ex_d2i (line 148) | static int asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in,
function ASN1_item_ex_d2i (line 445) | int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
function asn1_template_ex_d2i (line 455) | static int asn1_template_ex_d2i(ASN1_VALUE **val, const unsigned char **in,
function asn1_template_noexp_d2i (line 513) | static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char...
function asn1_d2i_ex_primitive (line 613) | static int asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char ...
function asn1_ex_c2i (line 706) | static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, lon...
function asn1_check_tlen (line 884) | static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass,
FILE: Sources/CNIOBoringSSL/crypto/asn1/tasn_enc.cc
function ASN1_item_i2d (line 39) | int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM ...
function ASN1_item_ex_i2d (line 67) | int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
function asn1_item_ex_i2d_opt (line 76) | int asn1_item_ex_i2d_opt(ASN1_VALUE **pval, unsigned char **out,
function asn1_template_ex_i2d (line 226) | static int asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
function der_cmp (line 380) | static int der_cmp(const void *a, const void *b) {
function asn1_i2d_ex_primitive (line 450) | static int asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out,
function asn1_ex_i2c (line 515) | static int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *out_...
FILE: Sources/CNIOBoringSSL/crypto/asn1/tasn_fre.cc
function ASN1_item_free (line 21) | void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it) {
function ASN1_item_ex_free (line 25) | void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function ASN1_template_free (line 110) | void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) {
function ASN1_primitive_free (line 124) | void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/tasn_new.cc
function ASN1_VALUE (line 29) | ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it) {
function ASN1_item_ex_new (line 39) | int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function asn1_item_clear (line 138) | static void asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function ASN1_template_new (line 163) | static int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) {
function asn1_template_clear (line 194) | static void asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *...
function ASN1_primitive_new (line 206) | static int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function asn1_primitive_clear (line 256) | static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it) {
FILE: Sources/CNIOBoringSSL/crypto/asn1/tasn_utl.cc
function asn1_get_choice_selector (line 32) | int asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function asn1_set_choice_selector (line 38) | int asn1_set_choice_selector(ASN1_VALUE **pval, int value,
function CRYPTO_refcount_t (line 47) | static CRYPTO_refcount_t *asn1_get_references(ASN1_VALUE **pval,
function asn1_refcount_set_one (line 60) | void asn1_refcount_set_one(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function asn1_refcount_dec_and_test_zero (line 67) | int asn1_refcount_dec_and_test_zero(ASN1_VALUE **pval, const ASN1_ITEM *...
function ASN1_ENCODING (line 75) | static ASN1_ENCODING *asn1_get_enc_ptr(ASN1_VALUE **pval, const ASN1_ITE...
function asn1_enc_init (line 88) | void asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function asn1_enc_free (line 97) | void asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it) {
function asn1_enc_save (line 104) | int asn1_enc_save(ASN1_VALUE **pval, const uint8_t *in, size_t in_len,
function asn1_encoding_clear (line 130) | void asn1_encoding_clear(ASN1_ENCODING *enc) {
function asn1_enc_restore (line 141) | int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval,
function ASN1_VALUE (line 158) | ASN1_VALUE **asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *...
function ASN1_TEMPLATE (line 168) | const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE ...
FILE: Sources/CNIOBoringSSL/crypto/base64/base64.cc
function constant_time_lt_args_8 (line 21) | static inline uint8_t constant_time_lt_args_8(uint8_t a, uint8_t b) {
function constant_time_in_range_8 (line 31) | static inline uint8_t constant_time_in_range_8(uint8_t a, uint8_t min,
function conv_bin2ascii (line 39) | static uint8_t conv_bin2ascii(uint8_t a) {
function EVP_EncodedLength (line 55) | int EVP_EncodedLength(size_t *out_len, size_t len) {
function EVP_ENCODE_CTX (line 76) | EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void) {
function EVP_ENCODE_CTX_free (line 81) | void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx) { OPENSSL_free(ctx); }
function EVP_EncodeInit (line 83) | void EVP_EncodeInit(EVP_ENCODE_CTX *ctx) {
function EVP_EncodeUpdate (line 87) | void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, uint8_t *out, int *out_len,
function EVP_EncodeFinal (line 151) | void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, uint8_t *out, int *out_len) {
function EVP_EncodeBlock (line 168) | size_t EVP_EncodeBlock(uint8_t *dst, const uint8_t *src, size_t src_len) {
function EVP_DecodedLength (line 203) | int EVP_DecodedLength(size_t *out_len, size_t len) {
function EVP_DecodeInit (line 212) | void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) {
function base64_ascii_to_bin (line 216) | static uint8_t base64_ascii_to_bin(uint8_t a) {
function base64_decode_quad (line 244) | static int base64_decode_quad(uint8_t *out, size_t *out_num_bytes,
function EVP_DecodeUpdate (line 293) | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, uint8_t *out, int *out_len,
function EVP_DecodeFinal (line 349) | int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, uint8_t *out, int *out_len) {
function EVP_DecodeBase64 (line 358) | int EVP_DecodeBase64(uint8_t *out, size_t *out_len, size_t max_out,
function EVP_DecodeBlock (line 390) | int EVP_DecodeBlock(uint8_t *dst, const uint8_t *src, size_t src_len) {
FILE: Sources/CNIOBoringSSL/crypto/bio/bio.cc
function BIO (line 28) | BIO *BIO_new(const BIO_METHOD *method) {
function BIO_free (line 47) | int BIO_free(BIO *bio) {
function BIO_up_ref (line 67) | int BIO_up_ref(BIO *bio) {
function BIO_vfree (line 72) | void BIO_vfree(BIO *bio) { BIO_free(bio); }
function BIO_free_all (line 74) | void BIO_free_all(BIO *bio) { BIO_free(bio); }
function BIO_read (line 76) | int BIO_read(BIO *bio, void *buf, int len) {
function BIO_gets (line 95) | int BIO_gets(BIO *bio, char *buf, int len) {
function BIO_write (line 114) | int BIO_write(BIO *bio, const void *in, int inl) {
function BIO_write_all (line 133) | int BIO_write_all(BIO *bio, const void *data, size_t len) {
function BIO_puts (line 146) | int BIO_puts(BIO *bio, const char *in) {
function BIO_flush (line 156) | int BIO_flush(BIO *bio) { return (int)BIO_ctrl(bio, BIO_CTRL_FLUSH, 0, N...
function BIO_ctrl (line 158) | long BIO_ctrl(BIO *bio, int cmd, long larg, void *parg) {
function BIO_int_ctrl (line 181) | long BIO_int_ctrl(BIO *b, int cmd, long larg, int iarg) {
function BIO_reset (line 187) | int BIO_reset(BIO *bio) { return (int)BIO_ctrl(bio, BIO_CTRL_RESET, 0, N...
function BIO_eof (line 189) | int BIO_eof(BIO *bio) { return (int)BIO_ctrl(bio, BIO_CTRL_EOF, 0, NULL); }
function BIO_set_flags (line 191) | void BIO_set_flags(BIO *bio, int flags) { bio->flags |= flags; }
function BIO_test_flags (line 193) | int BIO_test_flags(const BIO *bio, int flags) { return bio->flags & flag...
function BIO_should_read (line 195) | int BIO_should_read(const BIO *bio) {
function BIO_should_write (line 199) | int BIO_should_write(const BIO *bio) {
function BIO_should_retry (line 203) | int BIO_should_retry(const BIO *bio) {
function BIO_should_io_special (line 207) | int BIO_should_io_special(const BIO *bio) {
function BIO_get_retry_reason (line 211) | int BIO_get_retry_reason(const BIO *bio) { return bio->retry_reason; }
function BIO_set_retry_reason (line 213) | void BIO_set_retry_reason(BIO *bio, int reason) { bio->retry_reason = re...
function BIO_clear_flags (line 215) | void BIO_clear_flags(BIO *bio, int flags) { bio->flags &= ~flags; }
function BIO_set_retry_read (line 217) | void BIO_set_retry_read(BIO *bio) {
function BIO_set_retry_write (line 221) | void BIO_set_retry_write(BIO *bio) {
function BIO_get_retry_flags (line 227) | int BIO_get_retry_flags(BIO *bio) { return bio->flags & kRetryFlags; }
function BIO_clear_retry_flags (line 229) | void BIO_clear_retry_flags(BIO *bio) {
function BIO_method_type (line 234) | int BIO_method_type(const BIO *bio) { return bio->method->type; }
function BIO_copy_next_retry (line 236) | void BIO_copy_next_retry(BIO *bio) {
function BIO_callback_ctrl (line 242) | long BIO_callback_ctrl(BIO *bio, int cmd, bio_info_cb fp) {
function BIO_pending (line 255) | size_t BIO_pending(const BIO *bio) {
function BIO_ctrl_pending (line 265) | size_t BIO_ctrl_pending(const BIO *bio) { return BIO_pending(bio); }
function BIO_wpending (line 267) | size_t BIO_wpending(const BIO *bio) {
function BIO_set_close (line 277) | int BIO_set_close(BIO *bio, int close_flag) {
function OPENSSL_EXPORT (line 281) | OPENSSL_EXPORT uint64_t BIO_number_read(const BIO *bio) {
function OPENSSL_EXPORT (line 285) | OPENSSL_EXPORT uint64_t BIO_number_written(const BIO *bio) {
function BIO (line 289) | BIO *BIO_push(BIO *bio, BIO *appended_bio) {
function BIO (line 305) | BIO *BIO_pop(BIO *bio) {
function BIO (line 316) | BIO *BIO_next(BIO *bio) {
function BIO (line 323) | BIO *BIO_find_type(BIO *bio, int type) {
function BIO_indent (line 349) | int BIO_indent(BIO *bio, unsigned indent, unsigned max_indent) {
function print_bio (line 362) | static int print_bio(const char *str, size_t len, void *bio) {
function ERR_print_errors (line 366) | void ERR_print_errors(BIO *bio) { ERR_print_errors_cb(print_bio, bio); }
function bio_read_all (line 376) | static int bio_read_all(BIO *bio, uint8_t **out, size_t *out_len,
function bio_read_full (line 435) | static int bio_read_full(BIO *bio, uint8_t *out, int *out_eof_on_first_r...
function BIO_read_asn1 (line 462) | int BIO_read_asn1(BIO *bio, uint8_t **out, size_t *out_len, size_t max_l...
function BIO_set_retry_special (line 559) | void BIO_set_retry_special(BIO *bio) {
function BIO_set_write_buffer_size (line 563) | int BIO_set_write_buffer_size(BIO *bio, int buffer_size) { return 0; }
function BIO_get_new_index (line 568) | int BIO_get_new_index(void) {
function BIO_METHOD (line 576) | BIO_METHOD *BIO_meth_new(int type, const char *name) {
function BIO_meth_free (line 587) | void BIO_meth_free(BIO_METHOD *method) { OPENSSL_free(method); }
function BIO_meth_set_create (line 589) | int BIO_meth_set_create(BIO_METHOD *method, int (*create_func)(BIO *)) {
function BIO_meth_set_destroy (line 594) | int BIO_meth_set_destroy(BIO_METHOD *method, int (*destroy_func)(BIO *)) {
function BIO_meth_set_write (line 599) | int BIO_meth_set_write(BIO_METHOD *method,
function BIO_meth_set_read (line 605) | int BIO_meth_set_read(BIO_METHOD *method,
function BIO_meth_set_gets (line 611) | int BIO_meth_set_gets(BIO_METHOD *method,
function BIO_meth_set_ctrl (line 617) | int BIO_meth_set_ctrl(BIO_METHOD *method,
function BIO_set_data (line 623) | void BIO_set_data(BIO *bio, void *ptr) { bio->ptr = ptr; }
function BIO_set_init (line 627) | void BIO_set_init(BIO *bio, int init) { bio->init = init; }
function BIO_get_init (line 629) | int BIO_get_init(BIO *bio) { return bio->init; }
function BIO_set_shutdown (line 631) | void BIO_set_shutdown(BIO *bio, int shutdown) { bio->shutdown = shutdown; }
function BIO_get_shutdown (line 633) | int BIO_get_shutdown(BIO *bio) { return bio->shutdown; }
function BIO_meth_set_puts (line 635) | int BIO_meth_set_puts(BIO_METHOD *method, int (*puts)(BIO *, const char ...
function BIO_get_ex_new_index (line 640) | int BIO_get_ex_new_index(long argl, void *argp, //
function BIO_set_ex_data (line 647) | int BIO_set_ex_data(BIO *bio, int idx, void *data) {
FILE: Sources/CNIOBoringSSL/crypto/bio/bio_mem.cc
function BIO (line 22) | BIO *BIO_new_mem_buf(const void *buf, ossl_ssize_t len) {
function mem_new (line 53) | static int mem_new(BIO *bio) {
function mem_free (line 71) | static int mem_free(BIO *bio) {
function mem_read (line 85) | static int mem_read(BIO *bio, char *out, int outl) {
function mem_write (line 114) | static int mem_write(BIO *bio, const char *in, int inl) {
function mem_gets (line 133) | static int mem_gets(BIO *bio, char *buf, int size) {
function mem_ctrl (line 161) | static long mem_ctrl(BIO *bio, int cmd, long num, void *ptr) {
function BIO_METHOD (line 234) | const BIO_METHOD *BIO_s_mem(void) { return &mem_method; }
function BIO_mem_contents (line 236) | int BIO_mem_contents(const BIO *bio, const uint8_t **out_contents,
function BIO_get_mem_data (line 249) | long BIO_get_mem_data(BIO *bio, char **contents) {
function BIO_get_mem_ptr (line 253) | int BIO_get_mem_ptr(BIO *bio, BUF_MEM **out) {
function BIO_set_mem_buf (line 257) | int BIO_set_mem_buf(BIO *bio, BUF_MEM *b, int take_ownership) {
function BIO_set_mem_eof_return (line 261) | int BIO_set_mem_eof_return(BIO *bio, int eof_value) {
FILE: Sources/CNIOBoringSSL/crypto/bio/connect.cc
type bio_connect_st (line 44) | struct bio_connect_st {
type sockaddr_storage (line 53) | struct sockaddr_storage
function closesocket (line 67) | static int closesocket(int sock) { return close(sock); }
function split_host_and_port (line 73) | static int split_host_and_port(char **out_host, char **out_port,
function conn_state (line 122) | static int conn_state(BIO *bio, BIO_CONNECT *c) {
function BIO_CONNECT (line 252) | static BIO_CONNECT *BIO_CONNECT_new(void) {
function BIO_CONNECT_free (line 262) | static void BIO_CONNECT_free(BIO_CONNECT *c) {
function conn_new (line 271) | static int conn_new(BIO *bio) {
function conn_close_socket (line 279) | static void conn_close_socket(BIO *bio) {
function conn_free (line 294) | static int conn_free(BIO *bio) {
function conn_read (line 304) | static int conn_read(BIO *bio, char *out, int out_len) {
function conn_write (line 328) | static int conn_write(BIO *bio, const char *in, int in_len) {
function conn_ctrl (line 352) | static long conn_ctrl(BIO *bio, int cmd, long num, void *ptr) {
function conn_callback_ctrl (line 434) | static long conn_callback_ctrl(BIO *bio, int cmd, bio_info_cb fp) {
function BIO (line 462) | BIO *BIO_new_connect(const char *hostname) {
function BIO_METHOD (line 482) | const BIO_METHOD *BIO_s_connect(void) { return &methods_connectp; }
function BIO_set_conn_hostname (line 484) | int BIO_set_conn_hostname(BIO *bio, const char *name) {
function BIO_set_conn_port (line 488) | int BIO_set_conn_port(BIO *bio, const char *port_str) {
function BIO_set_conn_int_port (line 492) | int BIO_set_conn_int_port(BIO *bio, const int *port) {
function BIO_set_nbio (line 498) | int BIO_set_nbio(BIO *bio, int on) {
function BIO_do_connect (line 502) | int BIO_do_connect(BIO *bio) {
FILE: Sources/CNIOBoringSSL/crypto/bio/errno.cc
function bio_errno_should_retry (line 17) | int bio_errno_should_retry(int return_value) {
FILE: Sources/CNIOBoringSSL/crypto/bio/fd.cc
function BIO (line 42) | BIO *BIO_new_fd(int fd, int close_flag) {
function fd_new (line 51) | static int fd_new(BIO *bio) {
function fd_free (line 57) | static int fd_free(BIO *bio) {
function fd_read (line 67) | static int fd_read(BIO *b, char *out, int outl) {
function fd_write (line 81) | static int fd_write(BIO *b, const char *in, int inl) {
function fd_ctrl (line 93) | static long fd_ctrl(BIO *b, int cmd, long num, void *ptr) {
function fd_gets (line 152) | static int fd_gets(BIO *bp, char *buf, int size) {
function BIO_METHOD (line 178) | const BIO_METHOD *BIO_s_fd(void) { return &methods_fdp; }
function BIO_set_fd (line 182) | int BIO_set_fd(BIO *bio, int fd, int close_flag) {
function BIO_get_fd (line 186) | int BIO_get_fd(BIO *bio, int *out_fd) {
FILE: Sources/CNIOBoringSSL/crypto/bio/file.cc
function FILE (line 51) | static FILE *fopen_if_available(const char *path, const char *mode) {
function BIO (line 57) | BIO *BIO_new_file(const char *filename, const char *mode) {
function BIO (line 83) | BIO *BIO_new_fp(FILE *stream, int flags) {
function file_free (line 93) | static int file_free(BIO *bio) {
function file_read (line 107) | static int file_read(BIO *b, char *out, int outl) {
function file_write (line 123) | static int file_write(BIO *b, const char *in, int inl) {
function file_ctrl (line 135) | static long file_ctrl(BIO *b, int cmd, long num, void *ptr) {
function file_gets (line 228) | static int file_gets(BIO *bp, char *buf, int size) {
function BIO_METHOD (line 251) | const BIO_METHOD *BIO_s_file(void) { return &methods_filep; }
function BIO_get_fp (line 254) | int BIO_get_fp(BIO *bio, FILE **out_file) {
function BIO_set_fp (line 258) | int BIO_set_fp(BIO *bio, FILE *file, int flags) {
function BIO_read_filename (line 262) | int BIO_read_filename(BIO *bio, const char *filename) {
function BIO_write_filename (line 267) | int BIO_write_filename(BIO *bio, const char *filename) {
function BIO_append_filename (line 272) | int BIO_append_filename(BIO *bio, const char *filename) {
function BIO_rw_filename (line 277) | int BIO_rw_filename(BIO *bio, const char *filename) {
function BIO_tell (line 283) | long BIO_tell(BIO *bio) { return BIO_ctrl(bio, BIO_C_FILE_TELL, 0, NULL); }
function BIO_seek (line 285) | long BIO_seek(BIO *bio, long offset) {
FILE: Sources/CNIOBoringSSL/crypto/bio/hexdump.cc
type hexdump_ctx (line 20) | struct hexdump_ctx {
function hexbyte (line 29) | static void hexbyte(char *out, uint8_t b) {
function to_char (line 35) | static char to_char(uint8_t b) {
function hexdump_write (line 44) | static int hexdump_write(struct hexdump_ctx *ctx, const uint8_t *data,
function finish (line 103) | static int finish(struct hexdump_ctx *ctx) {
function BIO_hexdump (line 136) | int BIO_hexdump(BIO *bio, const uint8_t *data, size_t len, unsigned inde...
FILE: Sources/CNIOBoringSSL/crypto/bio/internal.h
type u_short (line 19) | typedef unsigned short u_short;
type sockaddr_storage (line 42) | struct sockaddr_storage
FILE: Sources/CNIOBoringSSL/crypto/bio/pair.cc
type bio_bio_st (line 22) | struct bio_bio_st {
function bio_new (line 42) | static int bio_new(BIO *bio) {
function bio_destroy_pair (line 54) | static void bio_destroy_pair(BIO *bio) {
function bio_free (line 86) | static int bio_free(BIO *bio) {
function bio_read (line 101) | static int bio_read(BIO *bio, char *buf, int size_) {
function bio_write (line 185) | static int bio_write(BIO *bio, const char *buf, int num_) {
function bio_make_pair (line 258) | static int bio_make_pair(BIO *bio1, BIO *bio2, size_t writebuf1_len,
function bio_ctrl (line 310) | static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr) {
function BIO_METHOD (line 411) | static const BIO_METHOD *bio_s_bio(void) { return &methods_biop; }
function BIO_new_bio_pair (line 413) | int BIO_new_bio_pair(BIO **bio1_p, size_t writebuf1_len, BIO **bio2_p,
function BIO_ctrl_get_read_request (line 431) | size_t BIO_ctrl_get_read_request(BIO *bio) {
function BIO_ctrl_get_write_guarantee (line 435) | size_t BIO_ctrl_get_write_guarantee(BIO *bio) {
function BIO_shutdown_wr (line 439) | int BIO_shutdown_wr(BIO *bio) {
FILE: Sources/CNIOBoringSSL/crypto/bio/printf.cc
function BIO_printf (line 19) | int BIO_printf(BIO *bio, const char *format, ...) {
FILE: Sources/CNIOBoringSSL/crypto/bio/socket.cc
function closesocket (line 31) | static int closesocket(int sock) {
function sock_free (line 36) | static int sock_free(BIO *bio) {
function sock_read (line 47) | static int sock_read(BIO *b, char *out, int outl) {
function sock_write (line 67) | static int sock_write(BIO *b, const char *in, int inl) {
function sock_ctrl (line 83) | static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) {
function BIO_METHOD (line 129) | const BIO_METHOD *BIO_s_socket(void) { return &methods_sockp; }
function BIO (line 131) | BIO *BIO_new_socket(int fd, int close_flag) {
FILE: Sources/CNIOBoringSSL/crypto/bio/socket_helper.cc
function bio_ip_and_port_to_socket_and_addr (line 43) | int bio_ip_and_port_to_socket_and_addr(int *out_sock,
function bio_socket_nbio (line 93) | int bio_socket_nbio(int sock, int on) {
function bio_clear_socket_error (line 112) | void bio_clear_socket_error(void) {}
function bio_sock_error (line 114) | int bio_sock_error(int sock) {
function bio_socket_should_retry (line 124) | int bio_socket_should_retry(int return_value) {
FILE: Sources/CNIOBoringSSL/crypto/blake2/blake2.cc
function blake2b_mix (line 46) | static void blake2b_mix(uint64_t v[16], int a, int b, int c, int d, uint...
function blake2b_load (line 58) | static uint64_t blake2b_load(const uint8_t block[BLAKE2B_CBLOCK], size_t...
function blake2b_transform (line 62) | static void blake2b_transform(BLAKE2B_CTX *b2b,
function BLAKE2B256_Init (line 108) | void BLAKE2B256_Init(BLAKE2B_CTX *b2b) {
function BLAKE2B256_Update (line 118) | void BLAKE2B256_Update(BLAKE2B_CTX *b2b, const void *in_data, size_t len) {
function BLAKE2B256_Final (line 154) | void BLAKE2B256_Final(uint8_t out[BLAKE2B256_DIGEST_LENGTH], BLAKE2B_CTX...
function BLAKE2B256 (line 163) | void BLAKE2B256(const uint8_t *data, size_t len,
FILE: Sources/CNIOBoringSSL/crypto/bn/bn_asn1.cc
function BN_parse_asn1_unsigned (line 21) | int BN_parse_asn1_unsigned(CBS *cbs, BIGNUM *ret) {
function BN_marshal_asn1 (line 38) | int BN_marshal_asn1(CBB *cbb, const BIGNUM *bn) {
FILE: Sources/CNIOBoringSSL/crypto/bn/convert.cc
function BN_bn2cbb_padded (line 25) | int BN_bn2cbb_padded(CBB *out, size_t len, const BIGNUM *in) {
function decode_hex (line 68) | static int decode_hex(BIGNUM *bn, const char *in, int in_len) {
function decode_dec (line 106) | static int decode_dec(BIGNUM *bn, const char *in, int in_len) {
function bn_x2bn (line 133) | static int bn_x2bn(BIGNUM **outp, const char *in, decode_func decode,
function BN_hex2bn (line 187) | int BN_hex2bn(BIGNUM **outp, const char *in) {
function BN_dec2bn (line 255) | int BN_dec2bn(BIGNUM **outp, const char *in) {
function BN_asc2bn (line 259) | int BN_asc2bn(BIGNUM **outp, const char *in) {
function BN_print (line 282) | int BN_print(BIO *bp, const BIGNUM *a) {
function BN_print_fp (line 312) | int BN_print_fp(FILE *fp, const BIGNUM *a) {
function BN_bn2mpi (line 324) | size_t BN_bn2mpi(const BIGNUM *in, uint8_t *out) {
function BIGNUM (line 362) | BIGNUM *BN_mpi2bn(const uint8_t *in, size_t len, BIGNUM *out) {
function BN_bn2binpad (line 404) | int BN_bn2binpad(const BIGNUM *in, uint8_t *out, int len) {
function BN_bn2lebinpad (line 412) | int BN_bn2lebinpad(const BIGNUM *in, uint8_t *out, int len) {
FILE: Sources/CNIOBoringSSL/crypto/buf/buf.cc
function BUF_MEM (line 20) | BUF_MEM *BUF_MEM_new(void) {
function BUF_MEM_free (line 24) | void BUF_MEM_free(BUF_MEM *buf) {
function BUF_MEM_reserve (line 32) | int BUF_MEM_reserve(BUF_MEM *buf, size_t cap) {
function BUF_MEM_grow (line 60) | size_t BUF_MEM_grow(BUF_MEM *buf, size_t len) {
function BUF_MEM_grow_clean (line 71) | size_t BUF_MEM_grow_clean(BUF_MEM *buf, size_t len) {
function BUF_MEM_append (line 75) | int BUF_MEM_append(BUF_MEM *buf, const void *in, size_t len) {
function BUF_strnlen (line 95) | size_t BUF_strnlen(const char *str, size_t max_len) {
function BUF_strlcpy (line 103) | size_t BUF_strlcpy(char *dst, const char *src, size_t dst_size) {
function BUF_strlcat (line 107) | size_t BUF_strlcat(char *dst, const char *src, size_t dst_size) {
FILE: Sources/CNIOBoringSSL/crypto/bytestring/asn1_compat.cc
function CBB_finish_i2d (line 28) | int CBB_finish_i2d(CBB *cbb, uint8_t **outp) {
FILE: Sources/CNIOBoringSSL/crypto/bytestring/ber.cc
function is_string_type (line 28) | static int is_string_type(CBS_ASN1_TAG tag) {
function cbs_find_ber (line 55) | static int cbs_find_ber(const CBS *orig_in, int *ber_found, uint32_t dep...
function cbs_get_eoc (line 97) | static int cbs_get_eoc(CBS *cbs) {
function cbs_convert_ber (line 112) | static int cbs_convert_ber(CBS *in, CBB *out, CBS_ASN1_TAG string_tag,
function CBS_asn1_ber_to_der (line 192) | int CBS_asn1_ber_to_der(CBS *in, CBS *out, uint8_t **out_storage) {
function CBS_get_asn1_implicit_string (line 222) | int CBS_get_asn1_implicit_string(CBS *in, CBS *out, uint8_t **out_storage,
FILE: Sources/CNIOBoringSSL/crypto/bytestring/cbb.cc
function CBB_zero (line 27) | void CBB_zero(CBB *cbb) { OPENSSL_memset(cbb, 0, sizeof(CBB)); }
function cbb_init (line 29) | static void cbb_init(CBB *cbb, uint8_t *buf, size_t cap, int can_resize) {
function CBB_init (line 39) | int CBB_init(CBB *cbb, size_t initial_capacity) {
function CBB_init_fixed (line 51) | int CBB_init_fixed(CBB *cbb, uint8_t *buf, size_t len) {
function CBB_cleanup (line 57) | void CBB_cleanup(CBB *cbb) {
function cbb_buffer_reserve (line 70) | static int cbb_buffer_reserve(struct cbb_buffer_st *base, uint8_t **out,
function cbb_buffer_add (line 114) | static int cbb_buffer_add(struct cbb_buffer_st *base, uint8_t **out,
function CBB_finish (line 124) | int CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len) {
type cbb_buffer_st (line 150) | struct cbb_buffer_st
function cbb_on_error (line 157) | static void cbb_on_error(CBB *cbb) {
function CBB_flush (line 183) | int CBB_flush(CBB *cbb) {
function CBB_len (line 282) | size_t CBB_len(const CBB *cbb) {
function cbb_add_child (line 293) | static int cbb_add_child(CBB *cbb, CBB *out_child, uint8_t len_len,
function cbb_add_length_prefixed (line 317) | static int cbb_add_length_prefixed(CBB *cbb, CBB *out_contents,
function CBB_add_u8_length_prefixed (line 326) | int CBB_add_u8_length_prefixed(CBB *cbb, CBB *out_contents) {
function CBB_add_u16_length_prefixed (line 330) | int CBB_add_u16_length_prefixed(CBB *cbb, CBB *out_contents) {
function CBB_add_u24_length_prefixed (line 334) | int CBB_add_u24_length_prefixed(CBB *cbb, CBB *out_contents) {
function add_base128_integer (line 341) | static int add_base128_integer(CBB *cbb, uint64_t v) {
function CBB_add_asn1 (line 364) | int CBB_add_asn1(CBB *cbb, CBB *out_contents, CBS_ASN1_TAG tag) {
function CBB_add_bytes (line 386) | int CBB_add_bytes(CBB *cbb, const uint8_t *data, size_t len) {
function CBB_add_zeros (line 395) | int CBB_add_zeros(CBB *cbb, size_t len) {
function CBB_add_space (line 404) | int CBB_add_space(CBB *cbb, uint8_t **out_data, size_t len) {
function CBB_reserve (line 411) | int CBB_reserve(CBB *cbb, uint8_t **out_data, size_t len) {
function CBB_did_write (line 419) | int CBB_did_write(CBB *cbb, size_t len) {
function cbb_add_u (line 429) | static int cbb_add_u(CBB *cbb, uint64_t v, size_t len_len) {
function CBB_add_u8 (line 449) | int CBB_add_u8(CBB *cbb, uint8_t value) { return cbb_add_u(cbb, value, 1...
function CBB_add_u16 (line 451) | int CBB_add_u16(CBB *cbb, uint16_t value) { return cbb_add_u(cbb, value,...
function CBB_add_u16le (line 453) | int CBB_add_u16le(CBB *cbb, uint16_t value) {
function CBB_add_u24 (line 457) | int CBB_add_u24(CBB *cbb, uint32_t value) { return cbb_add_u(cbb, value,...
function CBB_add_u32 (line 459) | int CBB_add_u32(CBB *cbb, uint32_t value) { return cbb_add_u(cbb, value,...
function CBB_add_u32le (line 461) | int CBB_add_u32le(CBB *cbb, uint32_t value) {
function CBB_add_u64 (line 465) | int CBB_add_u64(CBB *cbb, uint64_t value) { return cbb_add_u(cbb, value,...
function CBB_add_u64le (line 467) | int CBB_add_u64le(CBB *cbb, uint64_t value) {
function CBB_discard_child (line 471) | void CBB_discard_child(CBB *cbb) {
function CBB_add_asn1_uint64 (line 484) | int CBB_add_asn1_uint64(CBB *cbb, uint64_t value) {
function CBB_add_asn1_uint64_with_tag (line 488) | int CBB_add_asn1_uint64_with_tag(CBB *cbb, uint64_t value, CBS_ASN1_TAG ...
function CBB_add_asn1_int64 (line 526) | int CBB_add_asn1_int64(CBB *cbb, int64_t value) {
function CBB_add_asn1_int64_with_tag (line 530) | int CBB_add_asn1_int64_with_tag(CBB *cbb, int64_t value, CBS_ASN1_TAG ta...
function CBB_add_asn1_octet_string (line 559) | int CBB_add_asn1_octet_string(CBB *cbb, const uint8_t *data, size_t data...
function CBB_add_asn1_bool (line 570) | int CBB_add_asn1_bool(CBB *cbb, int value) {
function parse_dotted_decimal (line 585) | static int parse_dotted_decimal(CBS *cbs, uint64_t *out) {
function CBB_add_asn1_oid_from_text (line 597) | int CBB_add_asn1_oid_from_text(CBB *cbb, const char *text, size_t len) {
function compare_set_of_element (line 628) | static int compare_set_of_element(const void *a_ptr, const void *b_ptr) {
function CBB_flush_asn1_set_of (line 647) | int CBB_flush_asn1_set_of(CBB *cbb) {
FILE: Sources/CNIOBoringSSL/crypto/bytestring/cbs.cc
function cbs_get (line 29) | static int cbs_get(CBS *cbs, const uint8_t **p, size_t n) {
function CBS_skip (line 40) | int CBS_skip(CBS *cbs, size_t len) {
function CBS_stow (line 45) | int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len) {
function CBS_strdup (line 61) | int CBS_strdup(const CBS *cbs, char **out_ptr) {
function CBS_contains_zero_byte (line 69) | int CBS_contains_zero_byte(const CBS *cbs) {
function CBS_mem_equal (line 73) | int CBS_mem_equal(const CBS *cbs, const uint8_t *data, size_t len) {
function cbs_get_u (line 80) | static int cbs_get_u(CBS *cbs, uint64_t *out, size_t len) {
function CBS_get_u8 (line 95) | int CBS_get_u8(CBS *cbs, uint8_t *out) {
function CBS_get_u16 (line 104) | int CBS_get_u16(CBS *cbs, uint16_t *out) {
function CBS_get_u16le (line 113) | int CBS_get_u16le(CBS *cbs, uint16_t *out) {
function CBS_get_u24 (line 121) | int CBS_get_u24(CBS *cbs, uint32_t *out) {
function CBS_get_u32 (line 130) | int CBS_get_u32(CBS *cbs, uint32_t *out) {
function CBS_get_u32le (line 139) | int CBS_get_u32le(CBS *cbs, uint32_t *out) {
function CBS_get_u64 (line 147) | int CBS_get_u64(CBS *cbs, uint64_t *out) { return cbs_get_u(cbs, out, 8); }
function CBS_get_u64le (line 149) | int CBS_get_u64le(CBS *cbs, uint64_t *out) {
function CBS_get_last_u8 (line 157) | int CBS_get_last_u8(CBS *cbs, uint8_t *out) {
function CBS_get_bytes (line 166) | int CBS_get_bytes(CBS *cbs, CBS *out, size_t len) {
function CBS_copy_bytes (line 175) | int CBS_copy_bytes(CBS *cbs, uint8_t *out, size_t len) {
function cbs_get_length_prefixed (line 184) | static int cbs_get_length_prefixed(CBS *cbs, CBS *out, size_t len_len) {
function CBS_get_u8_length_prefixed (line 195) | int CBS_get_u8_length_prefixed(CBS *cbs, CBS *out) {
function CBS_get_u16_length_prefixed (line 199) | int CBS_get_u16_length_prefixed(CBS *cbs, CBS *out) {
function CBS_get_u24_length_prefixed (line 203) | int CBS_get_u24_length_prefixed(CBS *cbs, CBS *out) {
function CBS_get_until_first (line 207) | int CBS_get_until_first(CBS *cbs, CBS *out, uint8_t c) {
function CBS_get_u64_decimal (line 216) | int CBS_get_u64_decimal(CBS *cbs, uint64_t *out) {
function parse_base128_integer (line 243) | static int parse_base128_integer(CBS *cbs, uint64_t *out) {
function parse_asn1_tag (line 267) | static int parse_asn1_tag(CBS *cbs, CBS_ASN1_TAG *out) {
function cbs_get_any_asn1_element (line 306) | static int cbs_get_any_asn1_element(CBS *cbs, CBS *out, CBS_ASN1_TAG *ou...
function CBS_get_any_asn1 (line 407) | int CBS_get_any_asn1(CBS *cbs, CBS *out, CBS_ASN1_TAG *out_tag) {
function CBS_get_any_asn1_element (line 421) | int CBS_get_any_asn1_element(CBS *cbs, CBS *out, CBS_ASN1_TAG *out_tag,
function CBS_get_any_ber_asn1_element (line 427) | int CBS_get_any_ber_asn1_element(CBS *cbs, CBS *out, CBS_ASN1_TAG *out_tag,
function cbs_get_asn1 (line 437) | static int cbs_get_asn1(CBS *cbs, CBS *out, CBS_ASN1_TAG tag_value,
function CBS_get_asn1 (line 460) | int CBS_get_asn1(CBS *cbs, CBS *out, CBS_ASN1_TAG tag_value) {
function CBS_get_asn1_element (line 464) | int CBS_get_asn1_element(CBS *cbs, CBS *out, CBS_ASN1_TAG tag_value) {
function CBS_peek_asn1_tag (line 468) | int CBS_peek_asn1_tag(const CBS *cbs, CBS_ASN1_TAG tag_value) {
function CBS_get_asn1_uint64 (line 474) | int CBS_get_asn1_uint64(CBS *cbs, uint64_t *out) {
function CBS_get_asn1_int64 (line 496) | int CBS_get_asn1_int64(CBS *cbs, int64_t *out) {
function CBS_get_asn1_bool (line 515) | int CBS_get_asn1_bool(CBS *cbs, int *out) {
function CBS_get_optional_asn1 (line 530) | int CBS_get_optional_asn1(CBS *cbs, CBS *out, int *out_present,
function CBS_get_optional_asn1_octet_string (line 548) | int CBS_get_optional_asn1_octet_string(CBS *cbs, CBS *out, int *out_pres...
function CBS_get_optional_asn1_uint64 (line 570) | int CBS_get_optional_asn1_uint64(CBS *cbs, uint64_t *out, CBS_ASN1_TAG tag,
function CBS_get_optional_asn1_bool (line 587) | int CBS_get_optional_asn1_bool(CBS *cbs, int *out, CBS_ASN1_TAG tag,
function CBS_is_valid_asn1_bitstring (line 616) | int CBS_is_valid_asn1_bitstring(const CBS *cbs) {
function CBS_asn1_bitstring_has_bit (line 637) | int CBS_asn1_bitstring_has_bit(const CBS *cbs, unsigned bit) {
function CBS_is_valid_asn1_integer (line 652) | int CBS_is_valid_asn1_integer(const CBS *cbs, int *out_is_negative) {
function CBS_is_unsigned_asn1_integer (line 671) | int CBS_is_unsigned_asn1_integer(const CBS *cbs) {
function add_decimal (line 676) | static int add_decimal(CBB *out, uint64_t v) {
function CBS_is_valid_asn1_oid (line 682) | int CBS_is_valid_asn1_oid(const CBS *cbs) {
function cbs_get_two_digits (line 748) | static int cbs_get_two_digits(CBS *cbs, int *out) {
function is_valid_day (line 766) | static int is_valid_day(int year, int month, int day) {
function CBS_parse_rfc5280_time_internal (line 795) | static int CBS_parse_rfc5280_time_internal(const CBS *cbs, int is_gentime,
function CBS_parse_generalized_time (line 896) | int CBS_parse_generalized_time(const CBS *cbs, struct tm *out_tm,
function CBS_parse_utc_time (line 901) | int CBS_parse_utc_time(const CBS *cbs, struct tm *out_tm,
FILE: Sources/CNIOBoringSSL/crypto/bytestring/unicode.cc
function is_valid_code_point (line 20) | static int is_valid_code_point(uint32_t v) {
function CBS_get_utf8 (line 42) | int CBS_get_utf8(CBS *cbs, uint32_t *out) {
function CBS_get_latin1 (line 84) | int CBS_get_latin1(CBS *cbs, uint32_t *out) {
function CBS_get_ucs2_be (line 93) | int CBS_get_ucs2_be(CBS *cbs, uint32_t *out) {
function CBS_get_utf32_be (line 104) | int CBS_get_utf32_be(CBS *cbs, uint32_t *out) {
function CBB_get_utf8_len (line 108) | size_t CBB_get_utf8_len(uint32_t u) {
function CBB_add_utf8 (line 121) | int CBB_add_utf8(CBB *cbb, uint32_t u) {
function CBB_add_latin1 (line 146) | int CBB_add_latin1(CBB *cbb, uint32_t u) {
function CBB_add_ucs2_be (line 150) | int CBB_add_ucs2_be(CBB *cbb, uint32_t u) {
function CBB_add_utf32_be (line 154) | int CBB_add_utf32_be(CBB *cbb, uint32_t u) {
FILE: Sources/CNIOBoringSSL/crypto/chacha/chacha.cc
function CRYPTO_hchacha20 (line 41) | void CRYPTO_hchacha20(uint8_t out[32], const uint8_t key[32],
function ChaCha20_ctr32 (line 64) | static void ChaCha20_ctr32(uint8_t *out, const uint8_t *in, size_t in_len,
function CRYPTO_chacha_20 (line 98) | void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len,
function chacha_core (line 152) | static void chacha_core(uint8_t output[64], const uint32_t input[16]) {
function CRYPTO_chacha_20 (line 176) | void CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len,
FILE: Sources/CNIOBoringSSL/crypto/chacha/internal.h
function ChaCha20_ctr32_ssse3_capable (line 37) | inline int ChaCha20_ctr32_ssse3_capable(size_t len) {
function ChaCha20_ctr32_neon_capable (line 51) | inline int ChaCha20_ctr32_neon_capable(size_t len) {
function ChaCha20_ctr32_avx2_capable (line 60) | inline int ChaCha20_ctr32_avx2_capable(size_t len) {
function ChaCha20_ctr32_ssse3_4x_capable (line 67) | inline int ChaCha20_ctr32_ssse3_4x_capable(size_t len) {
function ChaCha20_ctr32_ssse3_capable (line 76) | inline int ChaCha20_ctr32_ssse3_capable(size_t len) {
FILE: Sources/CNIOBoringSSL/crypto/cipher/derive_key.cc
function EVP_BytesToKey (line 20) | int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_aesctrhmac.cc
type aead_aes_ctr_hmac_sha256_ctx (line 31) | struct aead_aes_ctr_hmac_sha256_ctx {
type aead_aes_ctr_hmac_sha256_ctx (line 43) | struct aead_aes_ctr_hmac_sha256_ctx
type aead_aes_ctr_hmac_sha256_ctx (line 46) | struct aead_aes_ctr_hmac_sha256_ctx
function hmac_init (line 49) | static void hmac_init(SHA256_CTX *out_inner, SHA256_CTX *out_outer,
function aead_aes_ctr_hmac_sha256_init (line 73) | static int aead_aes_ctr_hmac_sha256_init(EVP_AEAD_CTX *ctx, const uint8_...
function aead_aes_ctr_hmac_sha256_cleanup (line 108) | static void aead_aes_ctr_hmac_sha256_cleanup(EVP_AEAD_CTX *ctx) {}
function hmac_update_uint64 (line 110) | static void hmac_update_uint64(SHA256_CTX *sha256, uint64_t value) {
function hmac_calculate (line 121) | static void hmac_calculate(uint8_t out[SHA256_DIGEST_LENGTH],
function aead_aes_ctr_hmac_sha256_crypt (line 154) | static void aead_aes_ctr_hmac_sha256_crypt(
function aead_aes_ctr_hmac_sha256_seal_scatter (line 172) | static int aead_aes_ctr_hmac_sha256_seal_scatter(
function aead_aes_ctr_hmac_sha256_open_gather (line 208) | static int aead_aes_ctr_hmac_sha256_open_gather(
function EVP_AEAD (line 273) | const EVP_AEAD *EVP_aead_aes_128_ctr_hmac_sha256(void) {
function EVP_AEAD (line 277) | const EVP_AEAD *EVP_aead_aes_256_ctr_hmac_sha256(void) {
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_aesgcmsiv.cc
type aead_aes_gcm_siv_asm_ctx (line 40) | struct aead_aes_gcm_siv_asm_ctx {
type aead_aes_gcm_siv_asm_ctx (line 49) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 55) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 60) | struct aead_aes_gcm_siv_asm_ctx
function aead_aes_gcm_siv_asm_init (line 75) | static int aead_aes_gcm_siv_asm_init(EVP_AEAD_CTX *ctx, const uint8_t *key,
function aead_aes_gcm_siv_asm_cleanup (line 109) | static void aead_aes_gcm_siv_asm_cleanup(EVP_AEAD_CTX *ctx) {}
type aead_aes_gcm_siv_asm_ctx (line 148) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 155) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 188) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 194) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 203) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 210) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 217) | struct aead_aes_gcm_siv_asm_ctx
type aead_aes_gcm_siv_asm_ctx (line 224) | struct aead_aes_gcm_siv_asm_ctx
function gcm_siv_asm_polyval (line 230) | static void gcm_siv_asm_polyval(uint8_t out_tag[16], const uint8_t *in,
function aead_aes_gcm_siv_asm_crypt_last_block (line 286) | static void aead_aes_gcm_siv_asm_crypt_last_block(
function aead_aes_gcm_siv_kdf (line 312) | static void aead_aes_gcm_siv_kdf(
function aead_aes_gcm_siv_asm_seal_scatter (line 336) | static int aead_aes_gcm_siv_asm_seal_scatter(
function aead_aes_gcm_siv_asm_open_gather (line 402) | static int aead_aes_gcm_siv_asm_open_gather(
type aead_aes_gcm_siv_ctx (line 539) | struct aead_aes_gcm_siv_ctx {
type aead_aes_gcm_siv_ctx (line 550) | struct aead_aes_gcm_siv_ctx
type aead_aes_gcm_siv_ctx (line 553) | struct aead_aes_gcm_siv_ctx
function aead_aes_gcm_siv_init (line 556) | static int aead_aes_gcm_siv_init(EVP_AEAD_CTX *ctx, const uint8_t *key,
function aead_aes_gcm_siv_cleanup (line 585) | static void aead_aes_gcm_siv_cleanup(EVP_AEAD_CTX *ctx) {}
function gcm_siv_crypt (line 594) | static void gcm_siv_crypt(uint8_t *out, const uint8_t *in, size_t in_len,
function gcm_siv_polyval (line 622) | static void gcm_siv_polyval(
type gcm_siv_record_keys (line 660) | struct gcm_siv_record_keys {
function gcm_siv_keys (line 672) | static void gcm_siv_keys(const struct aead_aes_gcm_siv_ctx *gcm_siv_ctx,
function aead_aes_gcm_siv_seal_scatter (line 704) | static int aead_aes_gcm_siv_seal_scatter(
function aead_aes_gcm_siv_open_gather (line 745) | static int aead_aes_gcm_siv_open_gather(const EVP_AEAD_CTX *ctx, uint8_t...
function EVP_AEAD (line 825) | const EVP_AEAD *EVP_aead_aes_128_gcm_siv(void) {
function EVP_AEAD (line 832) | const EVP_AEAD *EVP_aead_aes_256_gcm_siv(void) {
function EVP_AEAD (line 841) | const EVP_AEAD *EVP_aead_aes_128_gcm_siv(void) { return &aead_aes_128_gc...
function EVP_AEAD (line 843) | const EVP_AEAD *EVP_aead_aes_256_gcm_siv(void) { return &aead_aes_256_gc...
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_chacha20poly1305.cc
type aead_chacha20_poly1305_ctx (line 31) | struct aead_chacha20_poly1305_ctx {
type aead_chacha20_poly1305_ctx (line 36) | struct aead_chacha20_poly1305_ctx
type aead_chacha20_poly1305_ctx (line 39) | struct aead_chacha20_poly1305_ctx
function aead_chacha20_poly1305_init (line 42) | static int aead_chacha20_poly1305_init(EVP_AEAD_CTX *ctx, const uint8_t ...
function aead_chacha20_poly1305_cleanup (line 66) | static void aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx) {}
function poly1305_update_length (line 68) | static void poly1305_update_length(poly1305_state *poly1305, size_t data...
function calc_tag (line 80) | static void calc_tag(uint8_t tag[POLY1305_TAG_LEN], const uint8_t *key,
function chacha20_poly1305_seal_scatter (line 109) | static int chacha20_poly1305_seal_scatter(
function aead_chacha20_poly1305_seal_scatter (line 183) | static int aead_chacha20_poly1305_seal_scatter(
function aead_xchacha20_poly1305_seal_scatter (line 196) | static int aead_xchacha20_poly1305_seal_scatter(
function chacha20_poly1305_open_gather (line 221) | static int chacha20_poly1305_open_gather(
function aead_chacha20_poly1305_open_gather (line 266) | static int aead_chacha20_poly1305_open_gather(
function aead_xchacha20_poly1305_open_gather (line 278) | static int aead_xchacha20_poly1305_open_gather(
function EVP_AEAD (line 335) | const EVP_AEAD *EVP_aead_chacha20_poly1305(void) {
function EVP_AEAD (line 339) | const EVP_AEAD *EVP_aead_xchacha20_poly1305(void) {
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_des.cc
function des_init_key (line 26) | static int des_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key,
function des_cbc_cipher (line 33) | static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8...
function EVP_CIPHER (line 53) | const EVP_CIPHER *EVP_des_cbc(void) { return &evp_des_cbc; }
function des_ecb_cipher (line 55) | static int des_ecb_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8...
function EVP_CIPHER (line 82) | const EVP_CIPHER *EVP_des_ecb(void) { return &evp_des_ecb; }
function des_ede3_init_key (line 91) | static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key,
function des_ede3_cbc_cipher (line 100) | static int des_ede3_cbc_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out,
function EVP_CIPHER (line 121) | const EVP_CIPHER *EVP_des_ede3_cbc(void) { return &evp_des_ede3_cbc; }
function des_ede_init_key (line 123) | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key,
function EVP_CIPHER (line 146) | const EVP_CIPHER *EVP_des_ede_cbc(void) { return &evp_des_ede_cbc; }
function des_ede_ecb_cipher (line 148) | static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out,
function EVP_CIPHER (line 176) | const EVP_CIPHER *EVP_des_ede(void) { return &evp_des_ede; }
function EVP_CIPHER (line 191) | const EVP_CIPHER *EVP_des_ede3(void) { return &evp_des_ede3; }
function EVP_CIPHER (line 193) | const EVP_CIPHER *EVP_des_ede3_ecb(void) { return EVP_des_ede3(); }
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_null.cc
function null_init_key (line 20) | static int null_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key,
function null_cipher (line 25) | static int null_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t ...
function EVP_CIPHER (line 46) | const EVP_CIPHER *EVP_enc_null(void) { return &n_cipher; }
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_rc2.cc
type rc2_key_st (line 94) | struct rc2_key_st {
function RC2_encrypt (line 98) | static void RC2_encrypt(uint32_t *d, RC2_KEY *key) {
function RC2_decrypt (line 142) | static void RC2_decrypt(uint32_t *d, RC2_KEY *key) {
function RC2_cbc_encrypt (line 187) | static void RC2_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t length,
function RC2_set_key (line 285) | static void RC2_set_key(RC2_KEY *key, int len, const uint8_t *data, int ...
function rc2_init_key (line 341) | static int rc2_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key,
function rc2_cbc_cipher (line 349) | static int rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8...
function rc2_ctrl (line 366) | static int rc2_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) {
function EVP_CIPHER (line 397) | const EVP_CIPHER *EVP_rc2_40_cbc(void) { return &rc2_40_cbc; }
function EVP_CIPHER (line 412) | const EVP_CIPHER *EVP_rc2_cbc(void) { return &rc2_cbc; }
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_rc4.cc
function rc4_init_key (line 20) | static int rc4_init_key(EVP_CIPHER_CTX *ctx, const uint8_t *key,
function rc4_cipher (line 28) | static int rc4_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in,
function EVP_CIPHER (line 49) | const EVP_CIPHER *EVP_rc4(void) { return &rc4; }
FILE: Sources/CNIOBoringSSL/crypto/cipher/e_tls.cc
function aead_tls_cleanup (line 51) | static void aead_tls_cleanup(EVP_AEAD_CTX *ctx) {
function aead_tls_init (line 57) | static int aead_tls_init(EVP_AEAD_CTX *ctx, const uint8_t *key, size_t k...
function aead_tls_tag_len (line 97) | static size_t aead_tls_tag_len(const EVP_AEAD_CTX *ctx, const size_t in_...
function aead_tls_seal_scatter (line 116) | static int aead_tls_seal_scatter(const EVP_AEAD_CTX *ctx, uint8_t *out,
function aead_tls_open (line 236) | static int aead_tls_open(const EVP_AEAD_CTX *ctx, uint8_t *out, size_t *...
function aead_aes_128_cbc_sha1_tls_init (line 389) | static int aead_aes_128_cbc_sha1_tls_init(EVP_AEAD_CTX *ctx, const uint8...
function aead_aes_128_cbc_sha1_tls_implicit_iv_init (line 396) | static int aead_aes_128_cbc_sha1_tls_implicit_iv_init(
function aead_aes_128_cbc_sha256_tls_init (line 403) | static int aead_aes_128_cbc_sha256_tls_init(EVP_AEAD_CTX *ctx,
function aead_aes_256_cbc_sha1_tls_init (line 411) | static int aead_aes_256_cbc_sha1_tls_init(EVP_AEAD_CTX *ctx, const uint8...
function aead_aes_256_cbc_sha1_tls_implicit_iv_init (line 418) | static int aead_aes_256_cbc_sha1_tls_implicit_iv_init(
function aead_des_ede3_cbc_sha1_tls_init (line 425) | static int aead_des_ede3_cbc_sha1_tls_init(EVP_AEAD_CTX *ctx,
function aead_des_ede3_cbc_sha1_tls_implicit_iv_init (line 433) | static int aead_des_ede3_cbc_sha1_tls_implicit_iv_init(
function aead_tls_get_iv (line 440) | static int aead_tls_get_iv(const EVP_AEAD_CTX *ctx, const uint8_t **out_iv,
function EVP_AEAD (line 573) | const EVP_AEAD *EVP_aead_aes_128_cbc_sha1_tls(void) {
function EVP_AEAD (line 577) | const EVP_AEAD *EVP_aead_aes_128_cbc_sha1_tls_implicit_iv(void) {
function EVP_AEAD (line 581) | const EVP_AEAD *EVP_aead_aes_128_cbc_sha256_tls(void) {
function EVP_AEAD (line 585) | const EVP_AEAD *EVP_aead_aes_256_cbc_sha1_tls(void) {
function EVP_AEAD (line 589) | const EVP_AEAD *EVP_aead_aes_256_cbc_sha1_tls_implicit_iv(void) {
function EVP_AEAD (line 593) | const EVP_AEAD *EVP_aead_des_ede3_cbc_sha1_tls(void) {
function EVP_AEAD (line 597) | const EVP_AEAD *EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv(void) {
FILE: Sources/CNIOBoringSSL/crypto/cipher/get_cipher.cc
function EVP_CIPHER (line 52) | const EVP_CIPHER *EVP_get_cipherbynid(int nid) {
function EVP_CIPHER (line 61) | const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
FILE: Sources/CNIOBoringSSL/crypto/cipher/internal.h
function chacha20_poly1305_asm_capable (line 135) | inline int chacha20_poly1305_asm_capable(void) {
function chacha20_poly1305_open (line 155) | inline void chacha20_poly1305_open(uint8_t *out_plaintext,
function chacha20_poly1305_seal (line 188) | inline void chacha20_poly1305_seal(uint8_t *out_ciphertext,
function chacha20_poly1305_asm_capable (line 211) | inline int chacha20_poly1305_asm_capable(void) { return 0; }
function chacha20_poly1305_open (line 213) | inline void chacha20_poly1305_open(uint8_t *out_plaintext,
function chacha20_poly1305_seal (line 221) | inline void chacha20_poly1305_seal(uint8_t *out_ciphertext,
FILE: Sources/CNIOBoringSSL/crypto/cipher/tls_cbc.cc
function EVP_tls_cbc_remove_padding (line 22) | int EVP_tls_cbc_remove_padding(crypto_word_t *out_padding_ok, size_t *ou...
function EVP_tls_cbc_copy_mac (line 71) | void EVP_tls_cbc_copy_mac(uint8_t *out, size_t md_size, const uint8_t *in,
function EVP_sha1_final_with_secret_suffix (line 134) | int EVP_sha1_final_with_secret_suffix(SHA_CTX *ctx,
function EVP_sha256_final_with_secret_suffix (line 227) | int EVP_sha256_final_with_secret_suffix(SHA256_CTX *ctx,
function EVP_tls_cbc_record_digest_supported (line 320) | int EVP_tls_cbc_record_digest_supported(const EVP_MD *md) {
function tls_cbc_digest_record_sha1 (line 330) | static int tls_cbc_digest_record_sha1(uint8_t *md_out, size_t *md_out_size,
function tls_cbc_digest_record_sha256 (line 388) | static int tls_cbc_digest_record_sha256(uint8_t *md_out, size_t *md_out_...
function EVP_tls_cbc_digest_record (line 447) | int EVP_tls_cbc_digest_record(const EVP_MD *md, uint8_t *md_out,
FILE: Sources/CNIOBoringSSL/crypto/conf/conf.cc
type conf_section_st (line 26) | struct conf_section_st {
function conf_section_hash (line 34) | static uint32_t conf_section_hash(const CONF_SECTION *s) {
function conf_section_cmp (line 38) | static int conf_section_cmp(const CONF_SECTION *a, const CONF_SECTION *b) {
function conf_value_hash (line 42) | static uint32_t conf_value_hash(const CONF_VALUE *v) {
function conf_value_cmp (line 48) | static int conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b) {
function CONF (line 57) | CONF *NCONF_new(void *method) {
function CONF_VALUE (line 77) | CONF_VALUE *CONF_VALUE_new(void) {
function value_free (line 81) | static void value_free(CONF_VALUE *value) {
function section_free (line 91) | static void section_free(CONF_SECTION *section) {
function value_free_arg (line 100) | static void value_free_arg(CONF_VALUE *value, void *arg) { value_free(va...
function section_free_arg (line 102) | static void section_free_arg(CONF_SECTION *section, void *arg) {
function NCONF_free (line 106) | void NCONF_free(CONF *conf) {
function CONF_SECTION (line 118) | static CONF_SECTION *NCONF_new_section(const CONF *conf, const char *sec...
function is_comment (line 142) | static int is_comment(char c) { return c == '#'; }
function is_quote (line 144) | static int is_quote(char c) { return c == '"' || c == '\'' || c == '`'; }
function is_esc (line 146) | static int is_esc(char c) { return c == '\\'; }
function is_conf_ws (line 148) | static int is_conf_ws(char c) {
function is_name_char (line 154) | static int is_name_char(char c) {
function str_copy (line 162) | static int str_copy(CONF *conf, char *section, char **pto, char *from) {
function CONF_SECTION (line 233) | static CONF_SECTION *get_section(const CONF *conf, const char *section) {
function STACK_OF (line 240) | const STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
function add_string (line 267) | static int add_string(const CONF *conf, CONF_SECTION *section,
function clear_comments (line 337) | static void clear_comments(char *p) {
function NCONF_load_bio (line 366) | int NCONF_load_bio(CONF *conf, BIO *in, long *out_error_line) {
function NCONF_load (line 558) | int NCONF_load(CONF *conf, const char *filename, long *out_error_line) {
function CONF_parse_list (line 573) | int CONF_parse_list(const char *list, char sep, int remove_whitespace,
function CONF_modules_load_file (line 617) | int CONF_modules_load_file(const char *filename, const char *appname,
function CONF_modules_free (line 622) | void CONF_modules_free(void) {}
function OPENSSL_config (line 624) | void OPENSSL_config(const char *config_name) {}
function OPENSSL_no_config (line 626) | void OPENSSL_no_config(void) {}
FILE: Sources/CNIOBoringSSL/crypto/conf/internal.h
type CONF_SECTION (line 27) | typedef struct conf_section_st CONF_SECTION;
function DEFINE_LHASH_OF (line 29) | DEFINE_LHASH_OF(CONF_SECTION)
FILE: Sources/CNIOBoringSSL/crypto/cpu_aarch64_apple.cc
function has_hw_feature (line 26) | static int has_hw_feature(const char *name) {
function OPENSSL_cpuid_setup (line 48) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_aarch64_fuchsia.cc
function OPENSSL_cpuid_setup (line 27) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_aarch64_linux.cc
function OPENSSL_cpuid_setup (line 25) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_aarch64_openbsd.cc
function OPENSSL_cpuid_setup (line 29) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_aarch64_sysreg.cc
function get_id_field (line 41) | static unsigned get_id_field(uint64_t reg, unsigned field) {
function get_signed_id_field (line 45) | static int get_signed_id_field(uint64_t reg, unsigned field) {
function read_armcap (line 54) | static uint32_t read_armcap(void) {
function OPENSSL_cpuid_setup (line 91) | void OPENSSL_cpuid_setup(void) { OPENSSL_armcap_P |= read_armcap(); }
FILE: Sources/CNIOBoringSSL/crypto/cpu_aarch64_win.cc
function OPENSSL_cpuid_setup (line 26) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_arm_freebsd.cc
function OPENSSL_cpuid_setup (line 26) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_arm_linux.cc
function open_eintr (line 30) | static int open_eintr(const char *path, int flags) {
function read_eintr (line 38) | static ssize_t read_eintr(int fd, void *out, size_t len) {
function read_file (line 49) | static int read_file(char **out_ptr, size_t *out_len, const char *path) {
function OPENSSL_cpuid_setup (line 100) | void OPENSSL_cpuid_setup(void) {
function CRYPTO_has_broken_NEON (line 144) | int CRYPTO_has_broken_NEON(void) { return 0; }
function CRYPTO_needs_hwcap2_workaround (line 146) | int CRYPTO_needs_hwcap2_workaround(void) {
FILE: Sources/CNIOBoringSSL/crypto/cpu_arm_linux.h
type STRING_PIECE (line 41) | typedef struct {
function STRING_PIECE_equals (line 46) | static int STRING_PIECE_equals(const STRING_PIECE *a, const char *b) {
function STRING_PIECE_split (line 54) | static int STRING_PIECE_split(STRING_PIECE *out_left, STRING_PIECE *out_...
function STRING_PIECE_get_delimited (line 73) | static int STRING_PIECE_get_delimited(STRING_PIECE *s, STRING_PIECE *out...
function STRING_PIECE_trim (line 87) | static void STRING_PIECE_trim(STRING_PIECE *s) {
function extract_cpuinfo_field (line 101) | static int extract_cpuinfo_field(STRING_PIECE *out, const STRING_PIECE *in,
function has_list_item (line 123) | static int has_list_item(const STRING_PIECE *list, const char *item) {
function crypto_get_arm_hwcap2_from_cpuinfo (line 135) | static unsigned long crypto_get_arm_hwcap2_from_cpuinfo(
FILE: Sources/CNIOBoringSSL/crypto/cpu_intel.cc
function OPENSSL_cpuid (line 33) | static void OPENSSL_cpuid(uint32_t *out_eax, uint32_t *out_ebx,
function OPENSSL_xgetbv (line 63) | static uint64_t OPENSSL_xgetbv(uint32_t xcr) {
function os_supports_avx512 (line 73) | static bool os_supports_avx512(uint64_t xcr0) {
function handle_cpu_env (line 91) | static void handle_cpu_env(uint32_t *out, const char *in) {
function OPENSSL_cpuid_setup (line 121) | void OPENSSL_cpuid_setup(void) {
FILE: Sources/CNIOBoringSSL/crypto/crypto.cc
function OPENSSL_get_ia32cap (line 65) | uint32_t OPENSSL_get_ia32cap(int idx) {
function OPENSSL_get_armcap (line 113) | uint32_t OPENSSL_get_armcap(void) {
function OPENSSL_init_cpuid (line 122) | void OPENSSL_init_cpuid(void) { CRYPTO_once(&once, OPENSSL_cpuid_setup); }
function CRYPTO_library_init (line 125) | void CRYPTO_library_init(void) {}
function CRYPTO_is_confidential_build (line 127) | int CRYPTO_is_confidential_build(void) {
function CRYPTO_pre_sandbox_init (line 135) | void CRYPTO_pre_sandbox_init(void) {
function SSLeay (line 163) | unsigned long SSLeay(void) { return OPENSSL_VERSION_NUMBER; }
function OpenSSL_version_num (line 165) | unsigned long OpenSSL_version_num(void) { return OPENSSL_VERSION_NUMBER; }
function CRYPTO_malloc_init (line 167) | int CRYPTO_malloc_init(void) { return 1; }
function OPENSSL_malloc_init (line 169) | int OPENSSL_malloc_init(void) { return 1; }
function ENGINE_load_builtin_engines (line 171) | void ENGINE_load_builtin_engines(void) {}
function ENGINE_register_all_complete (line 173) | int ENGINE_register_all_complete(void) { return 1; }
function OPENSSL_load_builtin_modules (line 175) | void OPENSSL_load_builtin_modules(void) {}
function OPENSSL_init_crypto (line 177) | int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *sett...
function OPENSSL_cleanup (line 181) | void OPENSSL_cleanup(void) {}
function FILE (line 183) | FILE *CRYPTO_get_stderr(void) { return stderr; }
FILE: Sources/CNIOBoringSSL/crypto/curve25519/curve25519.cc
function load_3 (line 46) | static uint64_t load_3(const uint8_t *in) {
function load_4 (line 54) | static uint64_t load_4(const uint8_t *in) {
function fe_frombytes_strict (line 151) | static void fe_frombytes_strict(fe *h, const uint8_t s[32]) {
function fe_frombytes (line 158) | static void fe_frombytes(fe *h, const uint8_t s[32]) {
function fe_tobytes (line 165) | static void fe_tobytes(uint8_t s[32], const fe *f) {
function fe_0 (line 171) | static void fe_0(fe *h) { OPENSSL_memset(h, 0, sizeof(fe)); }
function fe_loose_0 (line 173) | static void fe_loose_0(fe_loose *h) { OPENSSL_memset(h, 0, sizeof(fe_loo...
function fe_1 (line 176) | static void fe_1(fe *h) {
function fe_loose_1 (line 181) | static void fe_loose_1(fe_loose *h) {
function fe_add (line 188) | static void fe_add(fe_loose *h, const fe *f, const fe *g) {
function fe_sub (line 197) | static void fe_sub(fe_loose *h, const fe *f, const fe *g) {
function fe_carry (line 204) | static void fe_carry(fe *h, const fe_loose *f) {
function fe_mul_impl (line 210) | static void fe_mul_impl(fe_limb_t out[FE_NUM_LIMBS],
function fe_mul_ltt (line 219) | static void fe_mul_ltt(fe_loose *h, const fe *f, const fe *g) {
function fe_mul_llt (line 223) | static void fe_mul_llt(fe_loose *h, const fe_loose *f, const fe *g) {
function fe_mul_ttt (line 227) | static void fe_mul_ttt(fe *h, const fe *f, const fe *g) {
function fe_mul_tlt (line 231) | static void fe_mul_tlt(fe *h, const fe_loose *f, const fe *g) {
function fe_mul_ttl (line 235) | static void fe_mul_ttl(fe *h, const fe *f, const fe_loose *g) {
function fe_mul_tll (line 239) | static void fe_mul_tll(fe *h, const fe_loose *f, const fe_loose *g) {
function fe_sq_tl (line 243) | static void fe_sq_tl(fe *h, const fe_loose *f) {
function fe_sq_tt (line 249) | static void fe_sq_tt(fe *h, const fe *f) {
function fe_cswap (line 259) | static void fe_cswap(fe *f, fe *g, fe_limb_t b) {
function fe_mul121666 (line 269) | static void fe_mul121666(fe *h, const fe_loose *f) {
function fe_neg (line 276) | static void fe_neg(fe_loose *h, const fe *f) {
function fe_cmov (line 286) | static void fe_cmov(fe_loose *f, const fe_loose *g, fe_limb_t b) {
function fe_copy (line 302) | static void fe_copy(fe *h, const fe *f) { OPENSSL_memmove(h, f, sizeof(f...
function fe_copy_lt (line 304) | static void fe_copy_lt(fe_loose *h, const fe *f) {
function fe_loose_invert (line 309) | static void fe_loose_invert(fe *out, const fe_loose *z) {
function fe_invert (line 367) | static void fe_invert(fe *out, const fe *z) {
function fe_isnonzero (line 375) | static int fe_isnonzero(const fe_loose *f) {
function fe_isnegative (line 387) | static int fe_isnegative(const fe *f) {
function fe_sq2_tt (line 393) | static void fe_sq2_tt(fe *h, const fe *f) {
function fe_pow22523 (line 403) | static void fe_pow22523(fe *out, const fe *z) {
function x25519_ge_tobytes (line 463) | void x25519_ge_tobytes(uint8_t s[32], const ge_p2 *h) {
function ge_p3_tobytes (line 475) | static void ge_p3_tobytes(uint8_t s[32], const ge_p3 *h) {
function x25519_ge_frombytes_vartime (line 487) | int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t s[32]) {
function ge_p2_0 (line 527) | static void ge_p2_0(ge_p2 *h) {
function ge_p3_0 (line 533) | static void ge_p3_0(ge_p3 *h) {
function ge_cached_0 (line 540) | static void ge_cached_0(ge_cached *h) {
function ge_precomp_0 (line 547) | static void ge_precomp_0(ge_precomp *h) {
function ge_p3_to_p2 (line 554) | static void ge_p3_to_p2(ge_p2 *r, const ge_p3 *p) {
function x25519_ge_p3_to_cached (line 561) | void x25519_ge_p3_to_cached(ge_cached *r, const ge_p3 *p) {
function x25519_ge_p1p1_to_p2 (line 569) | void x25519_ge_p1p1_to_p2(ge_p2 *r, const ge_p1p1 *p) {
function x25519_ge_p1p1_to_p3 (line 576) | void x25519_ge_p1p1_to_p3(ge_p3 *r, const ge_p1p1 *p) {
function ge_p1p1_to_cached (line 584) | static void ge_p1p1_to_cached(ge_cached *r, const ge_p1p1 *p) {
function ge_p2_dbl (line 591) | static void ge_p2_dbl(ge_p1p1 *r, const ge_p2 *p) {
function ge_p3_dbl (line 610) | static void ge_p3_dbl(ge_p1p1 *r, const ge_p3 *p) {
function ge_madd (line 617) | static void ge_madd(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q) {
function ge_msub (line 634) | static void ge_msub(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q) {
function x25519_ge_add (line 651) | void x25519_ge_add(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q) {
function x25519_ge_sub (line 669) | void x25519_ge_sub(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q) {
function cmov (line 686) | static void cmov(ge_precomp *t, const ge_precomp *u, uint8_t b) {
function x25519_ge_scalarmult_small_precomp (line 692) | void x25519_ge_scalarmult_small_precomp(
function x25519_ge_scalarmult_base (line 748) | void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]) {
function table_select (line 754) | static void table_select(ge_precomp *t, const int pos, const signed char...
function x25519_ge_scalarmult_base (line 794) | void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]) {
function cmov_cached (line 856) | static void cmov_cached(ge_cached *t, ge_cached *u, uint8_t b) {
function x25519_ge_scalarmult (line 865) | void x25519_ge_scalarmult(ge_p2 *r, const uint8_t *scalar, const ge_p3 *...
function slide (line 917) | static void slide(signed char *r, const uint8_t *a) {
function ge_double_scalarmult_vartime (line 955) | static void ge_double_scalarmult_vartime(ge_p2 *r, const uint8_t *a,
function int64_lshift21 (line 1026) | static inline int64_t int64_lshift21(int64_t a) {
function x25519_sc_reduce (line 1040) | void x25519_sc_reduce(uint8_t s[64]) {
function sc_muladd (line 1381) | static void sc_muladd(uint8_t *s, const uint8_t *a, const uint8_t *b,
function ED25519_keypair (line 1862) | void ED25519_keypair(uint8_t out_public_key[32], uint8_t out_private_key...
function ED25519_sign (line 1868) | int ED25519_sign(uint8_t out_sig[64], const uint8_t *message,
function ED25519_verify (line 1909) | int ED25519_verify(const uint8_t *message, size_t message_len,
function ED25519_keypair_from_seed (line 1970) | void ED25519_keypair_from_seed(uint8_t out_public_key[32],
function x25519_scalar_mult_generic (line 1991) | static void x25519_scalar_mult_generic(uint8_t out[32],
function x25519_scalar_mult (line 2075) | static void x25519_scalar_mult(uint8_t out[32], const uint8_t scalar[32],
function X25519_keypair (line 2093) | void X25519_keypair(uint8_t out_public_value[32], uint8_t out_private_ke...
function X25519 (line 2116) | int X25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
function X25519_public_from_private (line 2125) | void X25519_public_from_private(uint8_t out_public_value[32],
FILE: Sources/CNIOBoringSSL/crypto/curve25519/internal.h
type fe (line 61) | typedef struct fe { uint64_t v[5]; } fe;
type fe_loose (line 65) | typedef struct fe_loose { uint64_t v[5]; } fe_loose;
type fe (line 72) | typedef struct fe { uint32_t v[10]; } fe;
type fe_loose (line 76) | typedef struct fe_loose { uint32_t v[10]; } fe_loose;
type ge_p2 (line 91) | typedef struct {
type ge_p3 (line 97) | typedef struct {
type ge_p1p1 (line 104) | typedef struct {
type ge_precomp (line 111) | typedef struct {
type ge_cached (line 117) | typedef struct {
type spake2_state_t (line 137) | enum spake2_state_t {
type spake2_ctx_st (line 143) | struct spake2_ctx_st {
FILE: Sources/CNIOBoringSSL/crypto/curve25519/spake25519.cc
function SPAKE2_CTX (line 276) | SPAKE2_CTX *SPAKE2_CTX_new(enum spake2_role_t my_role, const uint8_t *my...
function SPAKE2_CTX_free (line 299) | void SPAKE2_CTX_free(SPAKE2_CTX *ctx) {
function left_shift_3 (line 311) | static void left_shift_3(uint8_t n[32]) {
function scalar_cmov (line 334) | static void scalar_cmov(scalar *dest, const scalar *src, crypto_word_t m...
function scalar_double (line 340) | static void scalar_double(scalar *s) {
function scalar_add (line 345) | static void scalar_add(scalar *dest, const scalar *src) {
function SPAKE2_generate_msg (line 350) | int SPAKE2_generate_msg(SPAKE2_CTX *ctx, uint8_t *out, size_t *out_len,
function update_with_length_prefix (line 451) | static void update_with_length_prefix(SHA512_CTX *sha, const uint8_t *data,
function SPAKE2_process_msg (line 466) | int SPAKE2_process_msg(SPAKE2_CTX *ctx, uint8_t *out_key, size_t *out_ke...
FILE: Sources/CNIOBoringSSL/crypto/des/des.cc
function DES_set_key (line 334) | void DES_set_key(const DES_cblock *key, DES_key_schedule *schedule) {
function DES_set_key_ex (line 338) | void DES_set_key_ex(const uint8_t key[8], DES_key_schedule *schedule) {
function DES_set_odd_parity (line 415) | void DES_set_odd_parity(DES_cblock *key) {
function DES_encrypt1 (line 423) | static void DES_encrypt1(uint32_t data[2], const DES_key_schedule *ks,
function DES_encrypt2 (line 488) | static void DES_encrypt2(uint32_t data[2], const DES_key_schedule *ks,
function DES_encrypt3 (line 546) | void DES_encrypt3(uint32_t data[2], const DES_key_schedule *ks1,
function DES_decrypt3 (line 565) | void DES_decrypt3(uint32_t data[2], const DES_key_schedule *ks1,
function DES_ecb_encrypt (line 584) | void DES_ecb_encrypt(const DES_cblock *in_block, DES_cblock *out_block,
function DES_ecb_encrypt_ex (line 589) | void DES_ecb_encrypt_ex(const uint8_t in[8], uint8_t out[8],
function DES_ncbc_encrypt (line 599) | void DES_ncbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
function DES_ncbc_encrypt_ex (line 605) | void DES_ncbc_encrypt_ex(const uint8_t *in, uint8_t *out, size_t len,
function DES_ecb3_encrypt (line 681) | void DES_ecb3_encrypt(const DES_cblock *input, DES_cblock *output,
function DES_ecb3_encrypt_ex (line 687) | void DES_ecb3_encrypt_ex(const uint8_t in[8], uint8_t out[8],
function DES_ede3_cbc_encrypt (line 703) | void DES_ede3_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
function DES_ede3_cbc_encrypt_ex (line 711) | void DES_ede3_cbc_encrypt_ex(const uint8_t *in, uint8_t *out, size_t len,
function DES_ede2_cbc_encrypt (line 811) | void DES_ede2_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
function DES_set_key_unchecked (line 822) | void DES_set_key_unchecked(const DES_cblock *key, DES_key_schedule *sche...
FILE: Sources/CNIOBoringSSL/crypto/dh/dh_asn1.cc
function parse_integer (line 23) | static int parse_integer(CBS *cbs, BIGNUM **out) {
function marshal_integer (line 32) | static int marshal_integer(CBB *cbb, BIGNUM *bn) {
function DH (line 41) | DH *DH_parse_parameters(CBS *cbs) {
function DH_marshal_parameters (line 79) | int DH_marshal_parameters(CBB *cbb, const DH *dh) {
function DH (line 93) | DH *d2i_DHparams(DH **out, const uint8_t **inp, long len) {
function i2d_DHparams (line 111) | int i2d_DHparams(const DH *in, uint8_t **outp) {
FILE: Sources/CNIOBoringSSL/crypto/dh/params.cc
function BIGNUM (line 20) | static BIGNUM *get_params(BIGNUM *ret, const BN_ULONG *words, size_t num...
function BIGNUM (line 38) | BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *ret) {
function BIGNUM (line 56) | BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *ret) {
function BIGNUM (line 78) | BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *ret) {
function BIGNUM (line 108) | BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *ret) {
function BIGNUM (line 146) | BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *ret) {
function BIGNUM (line 200) | BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *ret) {
function DH_generate_parameters_ex (line 270) | int DH_generate_parameters_ex(DH *dh, int prime_bits, int generator,
function int_dh_bn_cpy (line 390) | static int int_dh_bn_cpy(BIGNUM **dst, const BIGNUM *src) {
function int_dh_param_copy (line 405) | static int int_dh_param_copy(DH *to, const DH *from, int is_x942) {
function DH (line 425) | DH *DHparams_dup(const DH *dh) {
FILE: Sources/CNIOBoringSSL/crypto/digest/digest_extra.cc
type nid_to_digest (line 26) | struct nid_to_digest {
type nid_to_digest (line 33) | struct nid_to_digest
function EVP_MD (line 63) | const EVP_MD *EVP_get_digestbynid(int nid) {
function EVP_MD (line 99) | static const EVP_MD *cbs_to_md(const CBS *cbs) {
function EVP_MD (line 111) | const EVP_MD *EVP_get_digestbyobj(const ASN1_OBJECT *obj) {
function EVP_MD (line 123) | const EVP_MD *EVP_parse_digest_algorithm(CBS *cbs) {
function EVP_marshal_digest_algorithm (line 154) | int EVP_marshal_digest_algorithm(CBB *cbb, const EVP_MD *md) {
function EVP_MD (line 187) | const EVP_MD *EVP_get_digestbyname(const char *name) {
function blake2b256_init (line 200) | static void blake2b256_init(EVP_MD_CTX *ctx) {
function blake2b256_update (line 204) | static void blake2b256_update(EVP_MD_CTX *ctx, const void *data, size_t ...
function blake2b256_final (line 208) | static void blake2b256_final(EVP_MD_CTX *ctx, uint8_t *md) {
function EVP_MD (line 218) | const EVP_MD *EVP_blake2b256(void) { return &evp_md_blake2b256; }
function md4_init (line 221) | static void md4_init(EVP_MD_CTX *ctx) {
function md4_update (line 225) | static void md4_update(EVP_MD_CTX *ctx, const void *data, size_t count) {
function md4_final (line 230) | static void md4_final(EVP_MD_CTX *ctx, uint8_t *out) {
function EVP_MD (line 245) | const EVP_MD *EVP_md4(void) { return &evp_md_md4; }
function md5_init (line 247) | static void md5_init(EVP_MD_CTX *ctx) {
function md5_update (line 251) | static void md5_update(EVP_MD_CTX *ctx, const void *data, size_t count) {
function md5_final (line 256) | static void md5_final(EVP_MD_CTX *ctx, uint8_t *out) {
function EVP_MD (line 265) | const EVP_MD *EVP_md5(void) { return &evp_md_md5; }
function md5_sha1_init (line 272) | static void md5_sha1_init(EVP_MD_CTX *md_ctx) {
function md5_sha1_update (line 277) | static void md5_sha1_update(EVP_MD_CTX *md_ctx, const void *data,
function md5_sha1_final (line 284) | static void md5_sha1_final(EVP_MD_CTX *md_ctx, uint8_t *out) {
function EVP_MD (line 301) | const EVP_MD *EVP_md5_sha1(void) { return &evp_md_md5_sha1; }
FILE: Sources/CNIOBoringSSL/crypto/dsa/dsa.cc
function DSA (line 40) | DSA *DSA_new(void) {
function DSA_free (line 52) | void DSA_free(DSA *dsa) {
function DSA_up_ref (line 74) | int DSA_up_ref(DSA *dsa) {
function DSA_bits (line 79) | unsigned DSA_bits(const DSA *dsa) { return BN_num_bits(dsa->p); }
function BIGNUM (line 81) | const BIGNUM *DSA_get0_pub_key(const DSA *dsa) { return dsa->pub_key; }
function BIGNUM (line 83) | const BIGNUM *DSA_get0_priv_key(const DSA *dsa) { return dsa->priv_key; }
function BIGNUM (line 85) | const BIGNUM *DSA_get0_p(const DSA *dsa) { return dsa->p; }
function BIGNUM (line 87) | const BIGNUM *DSA_get0_q(const DSA *dsa) { return dsa->q; }
function BIGNUM (line 89) | const BIGNUM *DSA_get0_g(const DSA *dsa) { return dsa->g; }
function DSA_get0_key (line 91) | void DSA_get0_key(const DSA *dsa, const BIGNUM **out_pub_key,
function DSA_get0_pqg (line 101) | void DSA_get0_pqg(const DSA *dsa, const BIGNUM **out_p, const BIGNUM **o...
function DSA_set0_key (line 114) | int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) {
function DSA_set0_pqg (line 131) | int DSA_set0_pqg(DSA *dsa, BIGNUM *p, BIGNUM *q, BIGNUM *g) {
function DSA_generate_parameters_ex (line 157) | int DSA_generate_parameters_ex(DSA *dsa, unsigned bits, const uint8_t *s...
function DSA (line 414) | DSA *DSAparams_dup(const DSA *dsa) {
function DSA_generate_key (line 429) | int DSA_generate_key(DSA *dsa) {
function DSA_SIG (line 487) | DSA_SIG *DSA_SIG_new(void) {
function DSA_SIG_free (line 491) | void DSA_SIG_free(DSA_SIG *sig) {
function DSA_SIG_get0 (line 501) | void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **out_r,
function DSA_SIG_set0 (line 511) | int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) {
function mod_mul_consttime (line 525) | static int mod_mul_consttime(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
function DSA_SIG (line 537) | DSA_SIG *DSA_do_sign(const uint8_t *digest, size_t digest_len, const DSA...
function DSA_do_verify (line 645) | int DSA_do_verify(const uint8_t *digest, size_t digest_len, const DSA_SI...
function DSA_do_check_signature (line 654) | int DSA_do_check_signature(int *out_valid, const uint8_t *digest,
function DSA_sign (line 753) | int DSA_sign(int type, const uint8_t *digest, size_t digest_len,
function DSA_verify (line 768) | int DSA_verify(int type, const uint8_t *digest, size_t digest_len,
function DSA_check_signature (line 777) | int DSA_check_signature(int *out_valid, const uint8_t *digest,
function der_len_len (line 813) | static size_t der_len_len(size_t len) {
function DSA_size (line 825) | int DSA_size(const DSA *dsa) {
function dsa_sign_setup (line 850) | static int dsa_sign_setup(const DSA *dsa, BN_CTX *ctx, BIGNUM **out_kinv,
function DSA_get_ex_new_index (line 905) | int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
function DSA_set_ex_data (line 910) | int DSA_set_ex_data(DSA *dsa, int idx, void *arg) {
function DH (line 918) | DH *DSA_dup_DH(const DSA *dsa) {
FILE: Sources/CNIOBoringSSL/crypto/dsa/dsa_asn1.cc
function dsa_check_key (line 26) | int dsa_check_key(const DSA *dsa) {
function parse_integer (line 86) | static int parse_integer(CBS *cbs, BIGNUM **out) {
function marshal_integer (line 95) | static int marshal_integer(CBB *cbb, BIGNUM *bn) {
function DSA_SIG (line 104) | DSA_SIG *DSA_SIG_parse(CBS *cbs) {
function DSA_SIG_marshal (line 121) | int DSA_SIG_marshal(CBB *cbb, const DSA_SIG *sig) {
function DSA (line 133) | DSA *DSA_parse_public_key(CBS *cbs) {
function DSA_marshal_public_key (line 158) | int DSA_marshal_public_key(CBB *cbb, const DSA *dsa) {
function DSA (line 172) | DSA *DSA_parse_parameters(CBS *cbs) {
function DSA_marshal_parameters (line 196) | int DSA_marshal_parameters(CBB *cbb, const DSA *dsa) {
function DSA (line 209) | DSA *DSA_parse_private_key(CBS *cbs) {
function DSA_marshal_private_key (line 248) | int DSA_marshal_private_key(CBB *cbb, const DSA *dsa) {
function DSA_SIG (line 264) | DSA_SIG *d2i_DSA_SIG(DSA_SIG **out_sig, const uint8_t **inp, long len) {
function i2d_DSA_SIG (line 282) | int i2d_DSA_SIG(const DSA_SIG *in, uint8_t **outp) {
function DSA (line 292) | DSA *d2i_DSAPublicKey(DSA **out, const uint8_t **inp, long len) {
function i2d_DSAPublicKey (line 310) | int i2d_DSAPublicKey(const DSA *in, uint8_t **outp) {
function DSA (line 320) | DSA *d2i_DSAPrivateKey(DSA **out, const uint8_t **inp, long len) {
function i2d_DSAPrivateKey (line 338) | int i2d_DSAPrivateKey(const DSA *in, uint8_t **outp) {
function DSA (line 348) | DSA *d2i_DSAparams(DSA **out, const uint8_t **inp, long len) {
function i2d_DSAparams (line 366) | int i2d_DSAparams(const DSA *in, uint8_t **outp) {
FILE: Sources/CNIOBoringSSL/crypto/dsa/internal.h
type dsa_st (line 29) | struct dsa_st {
FILE: Sources/CNIOBoringSSL/crypto/ec/ec_asn1.cc
function EC_KEY (line 41) | EC_KEY *EC_KEY_parse_private_key(CBS *cbs, const EC_GROUP *group) {
function EC_KEY_marshal_private_key (line 155) | int EC_KEY_marshal_private_key(CBB *cbb, const EC_KEY *key,
type explicit_prime_curve (line 211) | struct explicit_prime_curve {
function parse_explicit_prime_curve (line 216) | static int parse_explicit_prime_curve(CBS *in,
function integers_equal (line 279) | static int integers_equal(const CBS *bytes, const BIGNUM *bn) {
function EC_GROUP (line 300) | EC_GROUP *EC_KEY_parse_curve_name(CBS *cbs) {
function EC_KEY_marshal_curve_name (line 319) | int EC_KEY_marshal_curve_name(CBB *cbb, const EC_GROUP *group) {
function EC_GROUP (line 331) | EC_GROUP *EC_KEY_parse_parameters(CBS *cbs) {
function EC_POINT_point2cbb (line 392) | int EC_POINT_point2cbb(CBB *out, const EC_GROUP *group, const EC_POINT *...
function EC_KEY (line 403) | EC_KEY *d2i_ECPrivateKey(EC_KEY **out, const uint8_t **inp, long len) {
function i2d_ECPrivateKey (line 429) | int i2d_ECPrivateKey(const EC_KEY *key, uint8_t **outp) {
function EC_GROUP (line 439) | EC_GROUP *d2i_ECPKParameters(EC_GROUP **out, const uint8_t **inp, long l...
function i2d_ECPKParameters (line 459) | int i2d_ECPKParameters(const EC_GROUP *group, uint8_t **outp) {
function EC_KEY (line 474) | EC_KEY *d2i_ECParameters(EC_KEY **out_key, const uint8_t **inp, long len) {
function i2d_ECParameters (line 500) | int i2d_ECParameters(const EC_KEY *key, uint8_t **outp) {
function EC_KEY (line 515) | EC_KEY *o2i_ECPublicKey(EC_KEY **keyp, const uint8_t **inp, long len) {
function i2o_ECPublicKey (line 537) | int i2o_ECPublicKey(const EC_KEY *key, uint8_t **outp) {
function EC_get_builtin_curves (line 554) | size_t EC_get_builtin_curves(EC_builtin_curve *out_curves,
FILE: Sources/CNIOBoringSSL/crypto/ec/ec_derive.cc
function EC_KEY (line 28) | EC_KEY *EC_KEY_derive_from_secret(const EC_GROUP *group, const uint8_t *...
FILE: Sources/CNIOBoringSSL/crypto/ec/hash_to_curve.cc
function expand_message_xmd (line 51) | static int expand_message_xmd(const EVP_MD *md, uint8_t *out, size_t out...
function num_bytes_to_derive (line 143) | static int num_bytes_to_derive(size_t *out, const BIGNUM *modulus, unsig...
function big_endian_to_words (line 162) | static void big_endian_to_words(BN_ULONG *out, size_t num_words,
function hash_to_field2 (line 175) | static int hash_to_field2(const EC_GROUP *group, const EVP_MD *md,
function hash_to_scalar (line 196) | static int hash_to_scalar(const EC_GROUP *group, const EVP_MD *md,
function mul_A (line 214) | static inline void mul_A(const EC_GROUP *group, EC_FELEM *out,
function BN_ULONG (line 224) | static BN_ULONG sgn0(const EC_GROUP *group, const EC_FELEM *a) {
function is_3mod4 (line 231) | [[maybe_unused]] static int is_3mod4(const EC_GROUP *group) {
function BN_ULONG (line 237) | static BN_ULONG sqrt_ratio_3mod4(const EC_GROUP *group, const EC_FELEM *Z,
function map_to_curve_simple_swu (line 272) | static void map_to_curve_simple_swu(const EC_GROUP *group, const EC_FELE...
function hash_to_curve (line 343) | static int hash_to_curve(const EC_GROUP *group, const EVP_MD *md,
function felem_from_u8 (line 369) | static int felem_from_u8(const EC_GROUP *group, EC_FELEM *out, uint8_t a) {
function ec_hash_to_curve_p256_xmd_sha256_sswu (line 401) | int ec_hash_to_curve_p256_xmd_sha256_sswu(const EC_GROUP *group,
function EC_hash_to_curve_p256_xmd_sha256_sswu (line 423) | int EC_hash_to_curve_p256_xmd_sha256_sswu(const EC_GROUP *group, EC_POIN...
function ec_hash_to_curve_p384_xmd_sha384_sswu (line 434) | int ec_hash_to_curve_p384_xmd_sha384_sswu(const EC_GROUP *group,
function EC_hash_to_curve_p384_xmd_sha384_sswu (line 456) | int EC_hash_to_curve_p384_xmd_sha384_sswu(const EC_GROUP *group, EC_POIN...
function ec_hash_to_scalar_p384_xmd_sha384 (line 467) | int ec_hash_to_scalar_p384_xmd_sha384(const EC_GROUP *group, EC_SCALAR *...
function ec_hash_to_curve_p384_xmd_sha512_sswu_draft07 (line 479) | int ec_hash_to_curve_p384_xmd_sha512_sswu_draft07(
function ec_hash_to_scalar_p384_xmd_sha512_draft07 (line 500) | int ec_hash_to_scalar_p384_xmd_sha512_draft07(
FILE: Sources/CNIOBoringSSL/crypto/ecdh/ecdh.cc
function ECDH_compute_key (line 24) | int ECDH_compute_key(void *out, size_t out_len, const EC_POINT *pub_key,
FILE: Sources/CNIOBoringSSL/crypto/ecdsa/ecdsa_asn1.cc
function ECDSA_SIG (line 26) | static ECDSA_SIG *ecdsa_sig_from_fixed(const EC_KEY *key, const uint8_t ...
function ecdsa_sig_to_fixed (line 47) | static int ecdsa_sig_to_fixed(const EC_KEY *key, uint8_t *out, size_t *o...
function ECDSA_sign (line 69) | int ECDSA_sign(int type, const uint8_t *digest, size_t digest_len, uint8...
function ECDSA_verify (line 107) | int ECDSA_verify(int type, const uint8_t *digest, size_t digest_len,
function ECDSA_size (line 141) | size_t ECDSA_size(const EC_KEY *key) {
function ECDSA_SIG (line 155) | ECDSA_SIG *ECDSA_SIG_new(void) {
function ECDSA_SIG_free (line 170) | void ECDSA_SIG_free(ECDSA_SIG *sig) {
function BIGNUM (line 180) | const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig) { return sig->r; }
function BIGNUM (line 182) | const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig) { return sig->s; }
function ECDSA_SIG_get0 (line 184) | void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **out_r,
function ECDSA_SIG_set0 (line 194) | int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) {
function ECDSA_do_verify (line 205) | int ECDSA_do_verify(const uint8_t *digest, size_t digest_len,
function ECDSA_SIG (line 215) | ECDSA_SIG *ECDSA_sign_with_nonce_and_leak_private_key_for_testing(
function ECDSA_SIG (line 229) | ECDSA_SIG *ECDSA_do_sign(const uint8_t *digest, size_t digest_len,
function ECDSA_SIG (line 241) | ECDSA_SIG *ECDSA_SIG_parse(CBS *cbs) {
function ECDSA_SIG (line 257) | ECDSA_SIG *ECDSA_SIG_from_bytes(const uint8_t *in, size_t in_len) {
function ECDSA_SIG_marshal (line 269) | int ECDSA_SIG_marshal(CBB *cbb, const ECDSA_SIG *sig) {
function ECDSA_SIG_to_bytes (line 280) | int ECDSA_SIG_to_bytes(uint8_t **out_bytes, size_t *out_len,
function der_len_len (line 295) | static size_t der_len_len(size_t len) {
function ECDSA_SIG_max_len (line 307) | size_t ECDSA_SIG_max_len(size_t order_len) {
function ECDSA_SIG (line 327) | ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **out, const uint8_t **inp, long len) {
function i2d_ECDSA_SIG (line 345) | int i2d_ECDSA_SIG(const ECDSA_SIG *sig, uint8_t **outp) {
FILE: Sources/CNIOBoringSSL/crypto/engine/engine.cc
type engine_st (line 29) | struct engine_st {
function ENGINE (line 34) | ENGINE *ENGINE_new(void) {
function ENGINE_free (line 38) | int ENGINE_free(ENGINE *engine) {
function set_method (line 49) | static int set_method(void **out_member, const void *method, size_t meth...
function ENGINE_set_RSA_method (line 61) | int ENGINE_set_RSA_method(ENGINE *engine, const RSA_METHOD *method,
function RSA_METHOD (line 67) | RSA_METHOD *ENGINE_get_RSA_method(const ENGINE *engine) {
function ENGINE_set_ECDSA_method (line 71) | int ENGINE_set_ECDSA_method(ENGINE *engine, const ECDSA_METHOD *method,
function ECDSA_METHOD (line 77) | ECDSA_METHOD *ENGINE_get_ECDSA_method(const ENGINE *engine) {
function METHOD_ref (line 81) | void METHOD_ref(void *method_in) {
function METHOD_unref (line 85) | void METHOD_unref(void *method_in) {
FILE: Sources/CNIOBoringSSL/crypto/err/err.cc
type err_error_st (line 35) | struct err_error_st {
type err_state_st (line 50) | struct err_state_st {
type err_error_st (line 53) | struct err_error_st
function err_clear (line 82) | static void err_clear(struct err_error_st *error) {
function err_copy (line 87) | static void err_copy(struct err_error_st *dst, const struct err_error_st...
function err_state_free (line 107) | static void err_state_free(void *statep) {
function ERR_STATE (line 122) | static ERR_STATE *err_get_state(void) {
function get_error_values (line 140) | static uint32_t get_error_values(int inc, int top, const char **file, in...
function ERR_get_error (line 211) | uint32_t ERR_get_error(void) {
function ERR_get_error_line (line 215) | uint32_t ERR_get_error_line(const char **file, int *line) {
function ERR_get_error_line_data (line 219) | uint32_t ERR_get_error_line_data(const char **file, int *line,
function ERR_peek_error (line 224) | uint32_t ERR_peek_error(void) {
function ERR_peek_error_line (line 228) | uint32_t ERR_peek_error_line(const char **file, int *line) {
function ERR_peek_error_line_data (line 232) | uint32_t ERR_peek_error_line_data(const char **file, int *line,
function ERR_peek_last_error (line 238) | uint32_t ERR_peek_last_error(void) {
function ERR_peek_last_error_line (line 242) | uint32_t ERR_peek_last_error_line(const char **file, int *line) {
function ERR_peek_last_error_line_data (line 246) | uint32_t ERR_peek_last_error_line_data(const char **file, int *line,
function ERR_clear_error (line 251) | void ERR_clear_error(void) {
function ERR_remove_thread_state (line 268) | void ERR_remove_thread_state(const CRYPTO_THREADID *tid) {
function ERR_get_next_error_library (line 277) | int ERR_get_next_error_library(void) {
function ERR_remove_state (line 287) | void ERR_remove_state(unsigned long pid) { ERR_clear_error(); }
function ERR_clear_system_error (line 289) | void ERR_clear_system_error(void) { errno = 0; }
function err_string_cmp (line 293) | static int err_string_cmp(const void *a, const void *b) {
type library_name_st (line 338) | struct library_name_st {
function ERR_print_errors_cb (line 527) | void ERR_print_errors_cb(ERR_print_errors_callback_t callback, void *ctx) {
function print_errors_to_file (line 553) | static int print_errors_to_file(const char *msg, size_t msg_len, void *c...
function ERR_print_errors_fp (line 560) | void ERR_print_errors_fp(FILE *file) {
function err_set_error_data (line 565) | static void err_set_error_data(char *data) {
function ERR_put_error (line 580) | void ERR_put_error(int library, int unused, int reason, const char *file,
function err_add_error_vdata (line 612) | static void err_add_error_vdata(unsigned num, va_list args) {
function ERR_add_error_data (line 651) | void ERR_add_error_data(unsigned count, ...) {
function ERR_add_error_dataf (line 658) | void ERR_add_error_dataf(const char *format, ...) {
function ERR_set_error_data (line 671) | void ERR_set_error_data(char *data, int flags) {
function ERR_set_mark (line 690) | int ERR_set_mark(void) {
function ERR_pop_to_mark (line 700) | int ERR_pop_to_mark(void) {
function ERR_load_crypto_strings (line 726) | void ERR_load_crypto_strings(void) {}
function ERR_free_strings (line 728) | void ERR_free_strings(void) {}
function ERR_load_BIO_strings (line 730) | void ERR_load_BIO_strings(void) {}
function ERR_load_ERR_strings (line 732) | void ERR_load_ERR_strings(void) {}
function ERR_load_RAND_strings (line 734) | void ERR_load_RAND_strings(void) {}
type err_save_state_st (line 736) | struct err_save_state_st {
type err_error_st (line 737) | struct err_error_st
function ERR_SAVE_STATE_free (line 741) | void ERR_SAVE_STATE_free(ERR_SAVE_STATE *state) {
function ERR_SAVE_STATE (line 752) | ERR_SAVE_STATE *ERR_save_state(void) {
function ERR_restore_state (line 785) | void ERR_restore_state(const ERR_SAVE_STATE *state) {
FILE: Sources/CNIOBoringSSL/crypto/err/internal.h
type ERR_SAVE_STATE (line 30) | typedef struct err_save_state_st ERR_SAVE_STATE;
FILE: Sources/CNIOBoringSSL/crypto/evp/evp.cc
function EVP_PKEY (line 33) | EVP_PKEY *EVP_PKEY_new(void) {
function free_it (line 45) | static void free_it(EVP_PKEY *pkey) {
function EVP_PKEY_free (line 53) | void EVP_PKEY_free(EVP_PKEY *pkey) {
function EVP_PKEY_up_ref (line 66) | int EVP_PKEY_up_ref(EVP_PKEY *pkey) {
function EVP_PKEY_is_opaque (line 71) | int EVP_PKEY_is_opaque(const EVP_PKEY *pkey) {
function EVP_PKEY_cmp (line 78) | int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function EVP_PKEY_copy_parameters (line 101) | int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) {
function EVP_PKEY_missing_parameters (line 132) | int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) {
function EVP_PKEY_size (line 139) | int EVP_PKEY_size(const EVP_PKEY *pkey) {
function EVP_PKEY_bits (line 146) | int EVP_PKEY_bits(const EVP_PKEY *pkey) {
function EVP_PKEY_id (line 153) | int EVP_PKEY_id(const EVP_PKEY *pkey) { return pkey->type; }
function EVP_PKEY_ASN1_METHOD (line 158) | static const EVP_PKEY_ASN1_METHOD *evp_pkey_asn1_find(int nid) {
function evp_pkey_set_method (line 175) | void evp_pkey_set_method(EVP_PKEY *pkey, const EVP_PKEY_ASN1_METHOD *met...
function EVP_PKEY_type (line 181) | int EVP_PKEY_type(int nid) {
function EVP_PKEY_assign (line 187) | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) {
function EVP_PKEY_set_type (line 207) | int EVP_PKEY_set_type(EVP_PKEY *pkey, int type) {
function EVP_PKEY (line 229) | EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *unused,
function EVP_PKEY (line 259) | EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *unused,
function EVP_PKEY_get_raw_private_key (line 289) | int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, uint8_t *out,
function EVP_PKEY_get_raw_public_key (line 299) | int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, uint8_t *out,
function EVP_PKEY_cmp_parameters (line 309) | int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) {
function EVP_PKEY_CTX_set_signature_md (line 321) | int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) {
function EVP_PKEY_CTX_get_signature_md (line 326) | int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **out_...
function OpenSSL_add_all_algorithms (line 340) | void OpenSSL_add_all_algorithms(void) {}
function OPENSSL_add_all_algorithms_conf (line 342) | void OPENSSL_add_all_algorithms_conf(void) {}
function OpenSSL_add_all_ciphers (line 344) | void OpenSSL_add_all_ciphers(void) {}
function OpenSSL_add_all_digests (line 346) | void OpenSSL_add_all_digests(void) {}
function EVP_cleanup (line 348) | void EVP_cleanup(void) {}
function EVP_PKEY_set1_tls_encodedpoint (line 350) | int EVP_PKEY_set1_tls_encodedpoint(EVP_PKEY *pkey, const uint8_t *in,
function EVP_PKEY_get1_tls_encodedpoint (line 360) | size_t EVP_PKEY_get1_tls_encodedpoint(const EVP_PKEY *pkey, uint8_t **ou...
function EVP_PKEY_base_id (line 369) | int EVP_PKEY_base_id(const EVP_PKEY *pkey) {
FILE: Sources/CNIOBoringSSL/crypto/evp/evp_asn1.cc
function EVP_PKEY_ASN1_METHOD (line 34) | static const EVP_PKEY_ASN1_METHOD *parse_key_type(CBS *cbs) {
function EVP_PKEY (line 51) | EVP_PKEY *EVP_parse_public_key(CBS *cbs) {
function EVP_marshal_public_key (line 94) | int EVP_marshal_public_key(CBB *cbb, const EVP_PKEY *key) {
function EVP_PKEY (line 103) | EVP_PKEY *EVP_parse_private_key(CBS *cbs) {
function EVP_marshal_private_key (line 142) | int EVP_marshal_private_key(CBB *cbb, const EVP_PKEY *key) {
function old_priv_decode (line 151) | static bssl::UniquePtr<EVP_PKEY> old_priv_decode(CBS *cbs, int type) {
function EVP_PKEY (line 188) | EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **out, const uint8_t **inp,
function num_elements (line 223) | static size_t num_elements(const uint8_t *in, size_t in_len) {
function EVP_PKEY (line 243) | EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **out, const uint8_t **inp, long l...
function i2d_PublicKey (line 276) | int i2d_PublicKey(const EVP_PKEY *key, uint8_t **outp) {
function EVP_PKEY (line 290) | EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **out, const uint8_t **inp,
function EVP_PKEY (line 327) | EVP_PKEY *d2i_PUBKEY(EVP_PKEY **out, const uint8_t **inp, long len) {
function i2d_PUBKEY (line 345) | int i2d_PUBKEY(const EVP_PKEY *pkey, uint8_t **outp) {
function RSA (line 359) | RSA *d2i_RSA_PUBKEY(RSA **out, const uint8_t **inp, long len) {
function i2d_RSA_PUBKEY (line 381) | int i2d_RSA_PUBKEY(const RSA *rsa, uint8_t **outp) {
function DSA (line 395) | DSA *d2i_DSA_PUBKEY(DSA **out, const uint8_t **inp, long len) {
function i2d_DSA_PUBKEY (line 417) | int i2d_DSA_PUBKEY(const DSA *dsa, uint8_t **outp) {
function EC_KEY (line 431) | EC_KEY *d2i_EC_PUBKEY(EC_KEY **out, const uint8_t **inp, long len) {
function i2d_EC_PUBKEY (line 454) | int i2d_EC_PUBKEY(const EC_KEY *ec_key, uint8_t **outp) {
FILE: Sources/CNIOBoringSSL/crypto/evp/evp_ctx.cc
function EVP_PKEY_METHOD (line 27) | static const EVP_PKEY_METHOD *evp_pkey_meth_find(int type) {
function EVP_PKEY_CTX (line 37) | static EVP_PKEY_CTX *evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *e,
function EVP_PKEY_CTX (line 65) | EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e) {
function EVP_PKEY_CTX (line 81) | EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e) {
function EVP_PKEY_CTX_free (line 92) | void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_CTX (line 104) | EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx) {
function EVP_PKEY (line 139) | EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx) { return ctx->pkey; }
function EVP_PKEY_CTX_ctrl (line 141) | int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd,
function EVP_PKEY_sign_init (line 165) | int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_sign (line 176) | int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *sig_len,
function EVP_PKEY_verify_init (line 189) | int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_verify (line 199) | int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t sig_len,
function EVP_PKEY_encrypt_init (line 212) | int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_encrypt (line 221) | int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen,
function EVP_PKEY_decrypt_init (line 234) | int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_decrypt (line 243) | int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *outlen,
function EVP_PKEY_verify_recover_init (line 256) | int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_verify_recover (line 265) | int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out...
function EVP_PKEY_derive_init (line 278) | int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_derive_set_peer (line 287) | int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer) {
function EVP_PKEY_derive (line 347) | int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, uint8_t *key, size_t *out_key_len) {
function EVP_PKEY_keygen_init (line 359) | int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_keygen (line 368) | int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **out_pkey) {
function EVP_PKEY_paramgen_init (line 398) | int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx) {
function EVP_PKEY_paramgen (line 407) | int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **out_pkey) {
FILE: Sources/CNIOBoringSSL/crypto/evp/internal.h
type EVP_PKEY_ASN1_METHOD (line 22) | typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
type EVP_PKEY_METHOD (line 23) | typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
type evp_pkey_asn1_method_st (line 25) | struct evp_pkey_asn1_method_st {
type evp_pkey_st (line 87) | struct evp_pkey_st {
type evp_pkey_ctx_st (line 171) | struct evp_pkey_ctx_st {
type evp_pkey_method_st (line 186) | struct evp_pkey_method_st {
type ED25519_KEY (line 223) | typedef struct {
type X25519_KEY (line 234) | typedef struct {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_dh.cc
type dh_pkey_ctx_st (line 22) | struct dh_pkey_ctx_st {
function pkey_dh_init (line 27) | static int pkey_dh_init(EVP_PKEY_CTX *ctx) {
function pkey_dh_copy (line 38) | static int pkey_dh_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) {
function pkey_dh_cleanup (line 49) | static void pkey_dh_cleanup(EVP_PKEY_CTX *ctx) {
function pkey_dh_keygen (line 54) | static int pkey_dh_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
function pkey_dh_derive (line 68) | static int pkey_dh_derive(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out_l...
function pkey_dh_ctrl (line 109) | static int pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) {
function EVP_PKEY_CTX_set_dh_pad (line 145) | int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad) {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_dh_asn1.cc
function dh_free (line 20) | static void dh_free(EVP_PKEY *pkey) {
function dh_size (line 25) | static int dh_size(const EVP_PKEY *pkey) {
function dh_bits (line 29) | static int dh_bits(const EVP_PKEY *pkey) {
function dh_param_missing (line 33) | static int dh_param_missing(const EVP_PKEY *pkey) {
function dh_param_copy (line 38) | static int dh_param_copy(EVP_PKEY *to, const EVP_PKEY *from) {
function dh_param_cmp (line 61) | static int dh_param_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function dh_pub_cmp (line 74) | static int dh_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function EVP_PKEY_set1_DH (line 109) | int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) {
function EVP_PKEY_assign_DH (line 117) | int EVP_PKEY_assign_DH(EVP_PKEY *pkey, DH *key) {
function DH (line 123) | DH *EVP_PKEY_get0_DH(const EVP_PKEY *pkey) {
function DH (line 131) | DH *EVP_PKEY_get1_DH(const EVP_PKEY *pkey) {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_dsa_asn1.cc
function dsa_pub_decode (line 22) | static int dsa_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function dsa_pub_encode (line 54) | static int dsa_pub_encode(CBB *out, const EVP_PKEY *key) {
function dsa_priv_decode (line 76) | static int dsa_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function dsa_priv_encode (line 116) | static int dsa_priv_encode(CBB *out, const EVP_PKEY *key) {
function int_dsa_size (line 140) | static int int_dsa_size(const EVP_PKEY *pkey) {
function dsa_bits (line 145) | static int dsa_bits(const EVP_PKEY *pkey) {
function dsa_missing_parameters (line 150) | static int dsa_missing_parameters(const EVP_PKEY *pkey) {
function dup_bn_into (line 159) | static int dup_bn_into(BIGNUM **out, BIGNUM *src) {
function dsa_copy_parameters (line 169) | static int dsa_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) {
function dsa_cmp_parameters (line 181) | static int dsa_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) {
function dsa_pub_cmp (line 189) | static int dsa_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function int_dsa_free (line 195) | static void int_dsa_free(EVP_PKEY *pkey) {
function EVP_PKEY_CTX_set_dsa_paramgen_bits (line 234) | int EVP_PKEY_CTX_set_dsa_paramgen_bits(EVP_PKEY_CTX *ctx, int nbits) {
function EVP_PKEY_CTX_set_dsa_paramgen_q_bits (line 240) | int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(EVP_PKEY_CTX *ctx, int qbits) {
function EVP_PKEY_set1_DSA (line 246) | int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) {
function EVP_PKEY_assign_DSA (line 254) | int EVP_PKEY_assign_DSA(EVP_PKEY *pkey, DSA *key) {
function DSA (line 260) | DSA *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey) {
function DSA (line 268) | DSA *EVP_PKEY_get1_DSA(const EVP_PKEY *pkey) {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_ec.cc
function pkey_ec_init (line 36) | static int pkey_ec_init(EVP_PKEY_CTX *ctx) {
function pkey_ec_copy (line 47) | static int pkey_ec_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) {
function pkey_ec_cleanup (line 59) | static void pkey_ec_cleanup(EVP_PKEY_CTX *ctx) {
function pkey_ec_sign (line 68) | static int pkey_ec_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *siglen,
function pkey_ec_verify (line 87) | static int pkey_ec_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t ...
function pkey_ec_derive (line 93) | static int pkey_ec_derive(EVP_PKEY_CTX *ctx, uint8_t *key, size_t *keyle...
function pkey_ec_ctrl (line 121) | static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) {
function pkey_ec_keygen (line 161) | static int pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
function pkey_ec_paramgen (line 180) | static int pkey_ec_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
function EVP_PKEY_CTX_set_ec_paramgen_curve_nid (line 213) | int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid) {
function EVP_PKEY_CTX_set_ec_param_enc (line 218) | int EVP_PKEY_CTX_set_ec_param_enc(EVP_PKEY_CTX *ctx, int encoding) {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_ec_asn1.cc
function eckey_pub_encode (line 22) | static int eckey_pub_encode(CBB *out, const EVP_PKEY *key) {
function eckey_pub_decode (line 46) | static int eckey_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function eckey_pub_cmp (line 67) | static int eckey_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function eckey_priv_decode (line 83) | static int eckey_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function eckey_priv_encode (line 102) | static int eckey_priv_encode(CBB *out, const EVP_PKEY *key) {
function eckey_set1_tls_encodedpoint (line 129) | static int eckey_set1_tls_encodedpoint(EVP_PKEY *pkey, const uint8_t *in,
function eckey_get1_tls_encodedpoint (line 140) | static size_t eckey_get1_tls_encodedpoint(const EVP_PKEY *pkey,
function int_ec_size (line 151) | static int int_ec_size(const EVP_PKEY *pkey) {
function ec_bits (line 156) | static int ec_bits(const EVP_PKEY *pkey) {
function ec_missing_parameters (line 166) | static int ec_missing_parameters(const EVP_PKEY *pkey) {
function ec_copy_parameters (line 171) | static int ec_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) {
function ec_cmp_parameters (line 191) | static int ec_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) {
function int_ec_free (line 209) | static void int_ec_free(EVP_PKEY *pkey) {
function eckey_opaque (line 214) | static int eckey_opaque(const EVP_PKEY *pkey) {
function EVP_PKEY_set1_EC_KEY (line 253) | int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) {
function EVP_PKEY_assign_EC_KEY (line 261) | int EVP_PKEY_assign_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) {
function EC_KEY (line 267) | EC_KEY *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey) {
function EC_KEY (line 275) | EC_KEY *EVP_PKEY_get1_EC_KEY(const EVP_PKEY *pkey) {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_ed25519.cc
function pkey_ed25519_copy (line 25) | static int pkey_ed25519_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) { ret...
function pkey_ed25519_keygen (line 27) | static int pkey_ed25519_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
function pkey_ed25519_sign_message (line 45) | static int pkey_ed25519_sign_message(EVP_PKEY_CTX *ctx, uint8_t *sig,
function pkey_ed25519_verify_message (line 73) | static int pkey_ed25519_verify_message(EVP_PKEY_CTX *ctx, const uint8_t ...
FILE: Sources/CNIOBoringSSL/crypto/evp/p_ed25519_asn1.cc
function ed25519_free (line 26) | static void ed25519_free(EVP_PKEY *pkey) {
function ed25519_set_priv_raw (line 31) | static int ed25519_set_priv_raw(EVP_PKEY *pkey, const uint8_t *in, size_...
function ed25519_set_pub_raw (line 54) | static int ed25519_set_pub_raw(EVP_PKEY *pkey, const uint8_t *in, size_t...
function ed25519_get_priv_raw (line 74) | static int ed25519_get_priv_raw(const EVP_PKEY *pkey, uint8_t *out,
function ed25519_get_pub_raw (line 98) | static int ed25519_get_pub_raw(const EVP_PKEY *pkey, uint8_t *out,
function ed25519_pub_decode (line 116) | static int ed25519_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function ed25519_pub_encode (line 128) | static int ed25519_pub_encode(CBB *out, const EVP_PKEY *pkey) {
function ed25519_pub_cmp (line 149) | static int ed25519_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function ed25519_priv_decode (line 156) | static int ed25519_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function ed25519_priv_encode (line 171) | static int ed25519_priv_encode(CBB *out, const EVP_PKEY *pkey) {
function ed25519_size (line 198) | static int ed25519_size(const EVP_PKEY *pkey) { return 64; }
function ed25519_bits (line 200) | static int ed25519_bits(const EVP_PKEY *pkey) { return 253; }
FILE: Sources/CNIOBoringSSL/crypto/evp/p_hkdf.cc
function pkey_hkdf_init (line 37) | static int pkey_hkdf_init(EVP_PKEY_CTX *ctx) {
function pkey_hkdf_copy (line 53) | static int pkey_hkdf_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) {
function pkey_hkdf_cleanup (line 90) | static void pkey_hkdf_cleanup(EVP_PKEY_CTX *ctx) {
function pkey_hkdf_derive (line 101) | static int pkey_hkdf_derive(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out...
function pkey_hkdf_ctrl (line 142) | static int pkey_hkdf_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) {
function EVP_PKEY_CTX_hkdf_mode (line 204) | int EVP_PKEY_CTX_hkdf_mode(EVP_PKEY_CTX *ctx, int mode) {
function EVP_PKEY_CTX_set_hkdf_md (line 209) | int EVP_PKEY_CTX_set_hkdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) {
function EVP_PKEY_CTX_set1_hkdf_key (line 214) | int EVP_PKEY_CTX_set1_hkdf_key(EVP_PKEY_CTX *ctx, const uint8_t *key,
function EVP_PKEY_CTX_set1_hkdf_salt (line 222) | int EVP_PKEY_CTX_set1_hkdf_salt(EVP_PKEY_CTX *ctx, const uint8_t *salt,
function EVP_PKEY_CTX_add1_hkdf_info (line 230) | int EVP_PKEY_CTX_add1_hkdf_info(EVP_PKEY_CTX *ctx, const uint8_t *info,
FILE: Sources/CNIOBoringSSL/crypto/evp/p_rsa.cc
function pkey_rsa_init (line 53) | static int pkey_rsa_init(EVP_PKEY_CTX *ctx) {
function pkey_rsa_copy (line 69) | static int pkey_rsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) {
function pkey_rsa_cleanup (line 101) | static void pkey_rsa_cleanup(EVP_PKEY_CTX *ctx) {
function setup_tbuf (line 114) | static int setup_tbuf(RSA_PKEY_CTX *ctx, EVP_PKEY_CTX *pk) {
function pkey_rsa_sign (line 126) | static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *siglen,
function pkey_rsa_verify (line 164) | static int pkey_rsa_verify(EVP_PKEY_CTX *ctx, const uint8_t *sig, size_t...
function pkey_rsa_verify_recover (line 198) | static int pkey_rsa_verify_recover(EVP_PKEY_CTX *ctx, uint8_t *out,
function pkey_rsa_encrypt (line 263) | static int pkey_rsa_encrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out...
function pkey_rsa_decrypt (line 294) | static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx, uint8_t *out, size_t *out...
function check_padding_md (line 326) | static int check_padding_md(const EVP_MD *md, int padding) {
function is_known_padding (line 339) | static int is_known_padding(int padding_mode) {
function pkey_rsa_ctrl (line 351) | static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) {
function pkey_rsa_keygen (line 475) | static int pkey_rsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
function EVP_PKEY_CTX_set_rsa_padding (line 517) | int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int padding) {
function EVP_PKEY_CTX_get_rsa_padding (line 522) | int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *out_padding) {
function EVP_PKEY_CTX_set_rsa_pss_keygen_md (line 527) | int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *ctx, const EVP_MD *...
function EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen (line 531) | int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *ctx, int salt_...
function EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md (line 535) | int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *ctx,
function EVP_PKEY_CTX_set_rsa_pss_saltlen (line 540) | int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int salt_len) {
function EVP_PKEY_CTX_get_rsa_pss_saltlen (line 546) | int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *out_salt_le...
function EVP_PKEY_CTX_set_rsa_keygen_bits (line 552) | int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int bits) {
function EVP_PKEY_CTX_set_rsa_keygen_pubexp (line 557) | int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *e) {
function EVP_PKEY_CTX_set_rsa_oaep_md (line 562) | int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) {
function EVP_PKEY_CTX_get_rsa_oaep_md (line 567) | int EVP_PKEY_CTX_get_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD **out_m...
function EVP_PKEY_CTX_set_rsa_mgf1_md (line 572) | int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) {
function EVP_PKEY_CTX_get_rsa_mgf1_md (line 578) | int EVP_PKEY_CTX_get_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD **out_m...
function EVP_PKEY_CTX_set0_rsa_oaep_label (line 584) | int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, uint8_t *label,
function EVP_PKEY_CTX_get0_rsa_oaep_label (line 591) | int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx,
FILE: Sources/CNIOBoringSSL/crypto/evp/p_rsa_asn1.cc
function rsa_pub_encode (line 23) | static int rsa_pub_encode(CBB *out, const EVP_PKEY *key) {
function rsa_pub_decode (line 43) | static int rsa_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function rsa_pub_cmp (line 65) | static int rsa_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function rsa_priv_encode (line 72) | static int rsa_priv_encode(CBB *out, const EVP_PKEY *key) {
function rsa_priv_decode (line 91) | static int rsa_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function rsa_opaque (line 111) | static int rsa_opaque(const EVP_PKEY *pkey) {
function int_rsa_size (line 116) | static int int_rsa_size(const EVP_PKEY *pkey) {
function rsa_bits (line 121) | static int rsa_bits(const EVP_PKEY *pkey) {
function int_rsa_free (line 126) | static void int_rsa_free(EVP_PKEY *pkey) {
function EVP_PKEY_set1_RSA (line 165) | int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) {
function EVP_PKEY_assign_RSA (line 173) | int EVP_PKEY_assign_RSA(EVP_PKEY *pkey, RSA *key) {
function RSA (line 179) | RSA *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey) {
function RSA (line 187) | RSA *EVP_PKEY_get1_RSA(const EVP_PKEY *pkey) {
FILE: Sources/CNIOBoringSSL/crypto/evp/p_x25519.cc
function pkey_x25519_copy (line 25) | static int pkey_x25519_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) { retu...
function pkey_x25519_keygen (line 27) | static int pkey_x25519_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) {
function pkey_x25519_derive (line 44) | static int pkey_x25519_derive(EVP_PKEY_CTX *ctx, uint8_t *out,
function pkey_x25519_ctrl (line 80) | static int pkey_x25519_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p...
FILE: Sources/CNIOBoringSSL/crypto/evp/p_x25519_asn1.cc
function x25519_free (line 26) | static void x25519_free(EVP_PKEY *pkey) {
function x25519_set_priv_raw (line 31) | static int x25519_set_priv_raw(EVP_PKEY *pkey, const uint8_t *in, size_t...
function x25519_set_pub_raw (line 52) | static int x25519_set_pub_raw(EVP_PKEY *pkey, const uint8_t *in, size_t ...
function x25519_get_priv_raw (line 72) | static int x25519_get_priv_raw(const EVP_PKEY *pkey, uint8_t *out,
function x25519_get_pub_raw (line 95) | static int x25519_get_pub_raw(const EVP_PKEY *pkey, uint8_t *out,
function x25519_set1_tls_encodedpoint (line 113) | static int x25519_set1_tls_encodedpoint(EVP_PKEY *pkey, const uint8_t *in,
function x25519_get1_tls_encodedpoint (line 118) | static size_t x25519_get1_tls_encodedpoint(const EVP_PKEY *pkey,
function x25519_pub_decode (line 130) | static int x25519_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function x25519_pub_encode (line 142) | static int x25519_pub_encode(CBB *out, const EVP_PKEY *pkey) {
function x25519_pub_cmp (line 162) | static int x25519_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
function x25519_priv_decode (line 168) | static int x25519_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) {
function x25519_priv_encode (line 183) | static int x25519_priv_encode(CBB *out, const EVP_PKEY *pkey) {
function x25519_size (line 210) | static int x25519_size(const EVP_PKEY *pkey) { return 32; }
function x25519_bits (line 212) | static int x25519_bits(const EVP_PKEY *pkey) { return 253; }
FILE: Sources/CNIOBoringSSL/crypto/evp/pbkdf.cc
function PKCS5_PBKDF2_HMAC (line 19) | int PKCS5_PBKDF2_HMAC(const char *password, size_t password_len,
function PKCS5_PBKDF2_HMAC_SHA1 (line 87) | int PKCS5_PBKDF2_HMAC_SHA1(const char *password, size_t password_len,
FILE: Sources/CNIOBoringSSL/crypto/evp/print.cc
function print_hex (line 26) | static int print_hex(BIO *bp, const uint8_t *data, size_t len, int off) {
function bn_print (line 44) | static int bn_print(BIO *bp, const char *name, const BIGNUM *num, int of...
function do_rsa_print (line 98) | static int do_rsa_print(BIO *out, const RSA *rsa, int off,
function rsa_pub_print (line 141) | static int rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function rsa_priv_print (line 145) | static int rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function do_dsa_print (line 152) | static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype) {
function dsa_param_print (line 186) | static int dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function dsa_pub_print (line 190) | static int dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function dsa_priv_print (line 194) | static int dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function do_EC_KEY_print (line 201) | static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype) {
function eckey_param_print (line 254) | static int eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function eckey_pub_print (line 258) | static int eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function eckey_priv_print (line 263) | static int eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent) {
function EVP_PKEY_PRINT_METHOD (line 298) | static EVP_PKEY_PRINT_METHOD *find_method(int type) {
function print_unsupported (line 307) | static int print_unsupported(BIO *out, const EVP_PKEY *pkey, int indent,
function EVP_PKEY_print_public (line 314) | int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent,
function EVP_PKEY_print_private (line 323) | int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent,
function EVP_PKEY_print_params (line 332) | int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent,
FILE: Sources/CNIOBoringSSL/crypto/evp/scrypt.cc
function salsa208_word_specification (line 39) | static void salsa208_word_specification(block_t *inout) {
function xor_block (line 84) | static void xor_block(block_t *out, const block_t *a, const block_t *b) {
function scryptBlockMix (line 93) | static void scryptBlockMix(block_t *out, const block_t *B, uint64_t r) {
function scryptROMix (line 112) | static void scryptROMix(block_t *B, uint64_t r, uint64_t N, block_t *T,
function EVP_PBE_scrypt (line 145) | int EVP_PBE_scrypt(const char *password, size_t password_len,
FILE: Sources/CNIOBoringSSL/crypto/evp/sign.cc
function EVP_SignInit_ex (line 20) | int EVP_SignInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) {
function EVP_SignInit (line 24) | int EVP_SignInit(EVP_MD_CTX *ctx, const EVP_MD *type) {
function EVP_SignUpdate (line 28) | int EVP_SignUpdate(EVP_MD_CTX *ctx, const void *data, size_t len) {
function EVP_SignFinal (line 32) | int EVP_SignFinal(const EVP_MD_CTX *ctx, uint8_t *sig, unsigned *out_sig...
function EVP_VerifyInit_ex (line 69) | int EVP_VerifyInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) {
function EVP_VerifyInit (line 73) | int EVP_VerifyInit(EVP_MD_CTX *ctx, const EVP_MD *type) {
function EVP_VerifyUpdate (line 77) | int EVP_VerifyUpdate(EVP_MD_CTX *ctx, const void *data, size_t len) {
function EVP_VerifyFinal (line 81) | int EVP_VerifyFinal(EVP_MD_CTX *ctx, const uint8_t *sig, size_t sig_len,
FILE: Sources/CNIOBoringSSL/crypto/ex_data.cc
type crypto_ex_data_func_st (line 27) | struct crypto_ex_data_func_st {
function CRYPTO_get_ex_new_index_ex (line 36) | int CRYPTO_get_ex_new_index_ex(CRYPTO_EX_DATA_CLASS *ex_data_class, long...
function CRYPTO_set_ex_data (line 74) | int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int index, void *val) {
function CRYPTO_new_ex_data (line 107) | void CRYPTO_new_ex_data(CRYPTO_EX_DATA *ad) { ad->sk = NULL; }
function CRYPTO_free_ex_data (line 109) | void CRYPTO_free_ex_data(CRYPTO_EX_DATA_CLASS *ex_data_class, void *obj,
function CRYPTO_cleanup_all_ex_data (line 136) | void CRYPTO_cleanup_all_ex_data(void) {}
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/aes/internal.h
function hwaes_capable (line 61) | inline int hwaes_capable(void) { return CRYPTO_is_AESNI_capable(); }
function vpaes_capable (line 65) | inline int vpaes_capable(void) { return CRYPTO_is_SSSE3_capable(); }
function hwaes_capable (line 70) | inline int hwaes_capable(void) { return CRYPTO_is_ARMv8_AES_capable(); }
function bsaes_capable (line 75) | inline int bsaes_capable(void) { return CRYPTO_is_NEON_capable(); }
function vpaes_capable (line 76) | inline int vpaes_capable(void) { return CRYPTO_is_NEON_capable(); }
function vpaes_capable (line 82) | inline int vpaes_capable(void) { return CRYPTO_is_NEON_capable(); }
function aes_hw_set_encrypt_key_alt_capable (line 116) | inline int aes_hw_set_encrypt_key_alt_capable(void) {
function aes_hw_set_encrypt_key_alt_preferred (line 119) | inline int aes_hw_set_encrypt_key_alt_preferred(void) {
function hwaes_capable (line 131) | inline int hwaes_capable(void) { return 0; }
function aes_hw_set_encrypt_key (line 133) | inline int aes_hw_set_encrypt_key(const uint8_t *user_key, int bits,
function aes_hw_set_decrypt_key (line 138) | inline int aes_hw_set_decrypt_key(const uint8_t *user_key, int bits,
function aes_hw_encrypt (line 143) | inline void aes_hw_encrypt(const uint8_t *in, uint8_t *out,
function aes_hw_decrypt (line 148) | inline void aes_hw_decrypt(const uint8_t *in, uint8_t *out,
function aes_hw_cbc_encrypt (line 153) | inline void aes_hw_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t l...
function aes_hw_ctr32_encrypt_blocks (line 158) | inline void aes_hw_ctr32_encrypt_blocks(const uint8_t *in, uint8_t *out,
function bsaes_capable (line 186) | inline int bsaes_capable(void) { return 0; }
function bsaes_cbc_encrypt (line 190) | inline void bsaes_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t le...
function bsaes_ctr32_encrypt_blocks (line 195) | inline void bsaes_ctr32_encrypt_blocks(const uint8_t *in, uint8_t *out,
function vpaes_encrypt_key_to_bsaes (line 201) | inline void vpaes_encrypt_key_to_bsaes(AES_KEY *out_bsaes,
function vpaes_decrypt_key_to_bsaes (line 206) | inline void vpaes_decrypt_key_to_bsaes(AES_KEY *out_bsaes,
function vpaes_capable (line 229) | inline int vpaes_capable(void) { return 0; }
function vpaes_set_encrypt_key (line 233) | inline int vpaes_set_encrypt_key(const uint8_t *userKey, int bits,
function vpaes_set_decrypt_key (line 237) | inline int vpaes_set_decrypt_key(const uint8_t *userKey, int bits,
function vpaes_encrypt (line 241) | inline void vpaes_encrypt(const uint8_t *in, uint8_t *out, const AES_KEY...
function vpaes_decrypt (line 244) | inline void vpaes_decrypt(const uint8_t *in, uint8_t *out, const AES_KEY...
function vpaes_cbc_encrypt (line 247) | inline void vpaes_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t le...
function vpaes_ctr32_encrypt_blocks (line 251) | inline void vpaes_ctr32_encrypt_blocks(const uint8_t *in, uint8_t *out,
function CRYPTO_xor16 (line 273) | inline void CRYPTO_xor16(uint8_t out[16], const uint8_t a[16],
type gcm_impl_t (line 313) | enum gcm_impl_t {
type u128 (line 321) | typedef struct { uint64_t hi,lo; } u128;
type GCM128_KEY (line 333) | typedef struct gcm128_key_st {
type GCM128_CONTEXT (line 346) | typedef struct {
function gcm_pmull_capable (line 482) | inline int gcm_pmull_capable(void) { return CRYPTO_is_ARMv8_PMULL_capabl...
function gcm_neon_capable (line 489) | inline int gcm_neon_capable(void) { return CRYPTO_is_NEON_capable(); }
type polyval_ctx (line 581) | struct polyval_ctx {
type polyval_ctx (line 589) | struct polyval_ctx
type polyval_ctx (line 594) | struct polyval_ctx
type polyval_ctx (line 598) | struct polyval_ctx
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/bcm.cc
function assert_within (line 137) | static void assert_within(const void *start, const void *symbol,
function BORINGSSL_maybe_set_module_text_permissions (line 154) | static void BORINGSSL_maybe_set_module_text_permissions(int permission) {
function BORINGSSL_maybe_set_module_text_permissions (line 171) | static void BORINGSSL_maybe_set_module_text_permissions(int permission) {}
function BORINGSSL_bcm_power_on_self_test (line 176) | static void __attribute__((constructor))
function BORINGSSL_integrity_test (line 197) | int BORINGSSL_integrity_test(void) {
function BORINGSSL_FIPS_abort (line 275) | void BORINGSSL_FIPS_abort(void) {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/bcm_interface.h
type class (line 37) | enum class
type class (line 42) | enum class
type bcm_status (line 47) | typedef enum bcm_status_t bcm_status;
type bcm_infallible (line 48) | typedef enum bcm_infallible_t bcm_infallible;
function bcm_success (line 50) | inline int bcm_success(bcm_status status) {
function bcm_status_t (line 54) | inline bcm_status_t bcm_as_approved_status(int result) {
type BCM_mldsa65_private_key (line 266) | struct BCM_mldsa65_private_key {
type BCM_mldsa65_public_key (line 273) | struct BCM_mldsa65_public_key {
type BCM_mldsa65_private_key (line 283) | struct BCM_mldsa65_private_key
type BCM_mldsa65_private_key (line 286) | struct BCM_mldsa65_private_key
type BCM_mldsa65_public_key (line 290) | struct BCM_mldsa65_public_key
type BCM_mldsa65_private_key (line 291) | struct BCM_mldsa65_private_key
type BCM_mldsa65_private_key (line 295) | struct BCM_mldsa65_private_key
type BCM_mldsa65_public_key (line 299) | struct BCM_mldsa65_public_key
type BCM_mldsa65_public_key (line 304) | struct BCM_mldsa65_public_key
type BCM_mldsa65_public_key (line 307) | struct BCM_mldsa65_public_key
type BCM_mldsa65_private_key (line 310) | struct BCM_mldsa65_private_key
type BCM_mldsa65_private_key (line 317) | struct BCM_mldsa65_private_key
type BCM_mldsa65_private_key (line 327) | struct BCM_mldsa65_private_key
type BCM_mldsa65_public_key (line 336) | struct BCM_mldsa65_public_key
type BCM_mldsa65_private_key (line 344) | struct BCM_mldsa65_private_key
type BCM_mldsa87_private_key (line 359) | struct BCM_mldsa87_private_key {
type BCM_mldsa87_public_key (line 366) | struct BCM_mldsa87_public_key {
type BCM_mldsa87_private_key (line 376) | struct BCM_mldsa87_private_key
type BCM_mldsa87_private_key (line 379) | struct BCM_mldsa87_private_key
type BCM_mldsa87_public_key (line 383) | struct BCM_mldsa87_public_key
type BCM_mldsa87_private_key (line 384) | struct BCM_mldsa87_private_key
type BCM_mldsa87_private_key (line 388) | struct BCM_mldsa87_private_key
type BCM_mldsa87_public_key (line 392) | struct BCM_mldsa87_public_key
type BCM_mldsa87_public_key (line 397) | struct BCM_mldsa87_public_key
type BCM_mldsa87_public_key (line 400) | struct BCM_mldsa87_public_key
type BCM_mldsa87_private_key (line 403) | struct BCM_mldsa87_private_key
type BCM_mldsa87_private_key (line 410) | struct BCM_mldsa87_private_key
type BCM_mldsa87_private_key (line 420) | struct BCM_mldsa87_private_key
type BCM_mldsa87_public_key (line 429) | struct BCM_mldsa87_public_key
type BCM_mldsa87_private_key (line 437) | struct BCM_mldsa87_private_key
type BCM_mlkem768_public_key (line 481) | struct BCM_mlkem768_public_key {
type BCM_mlkem768_private_key (line 488) | struct BCM_mlkem768_private_key {
type BCM_mlkem768_private_key (line 498) | struct BCM_mlkem768_private_key
type BCM_mlkem768_private_key (line 501) | struct BCM_mlkem768_private_key
type BCM_mlkem768_public_key (line 505) | struct BCM_mlkem768_public_key
type BCM_mlkem768_private_key (line 506) | struct BCM_mlkem768_private_key
type BCM_mlkem768_public_key (line 511) | struct BCM_mlkem768_public_key
type BCM_mlkem768_private_key (line 516) | struct BCM_mlkem768_private_key
type BCM_mlkem768_public_key (line 519) | struct BCM_mlkem768_public_key
type BCM_mlkem768_public_key (line 522) | struct BCM_mlkem768_public_key
type BCM_mlkem768_private_key (line 530) | struct BCM_mlkem768_private_key
type BCM_mlkem768_private_key (line 539) | struct BCM_mlkem768_private_key
type BCM_mlkem768_public_key (line 550) | struct BCM_mlkem768_public_key
type BCM_mlkem768_private_key (line 558) | struct BCM_mlkem768_private_key
type BCM_mlkem1024_public_key (line 560) | struct BCM_mlkem1024_public_key {
type BCM_mlkem1024_private_key (line 567) | struct BCM_mlkem1024_private_key {
type BCM_mlkem1024_private_key (line 577) | struct BCM_mlkem1024_private_key
type BCM_mlkem1024_private_key (line 580) | struct BCM_mlkem1024_private_key
type BCM_mlkem1024_public_key (line 584) | struct BCM_mlkem1024_public_key
type BCM_mlkem1024_private_key (line 585) | struct BCM_mlkem1024_private_key
type BCM_mlkem1024_public_key (line 590) | struct BCM_mlkem1024_public_key
type BCM_mlkem1024_private_key (line 595) | struct BCM_mlkem1024_private_key
type BCM_mlkem1024_public_key (line 598) | struct BCM_mlkem1024_public_key
type BCM_mlkem1024_public_key (line 601) | struct BCM_mlkem1024_public_key
type BCM_mlkem1024_private_key (line 609) | struct BCM_mlkem1024_private_key
type BCM_mlkem1024_private_key (line 618) | struct BCM_mlkem1024_private_key
type BCM_mlkem1024_public_key (line 629) | struct BCM_mlkem1024_public_key
type BCM_mlkem1024_private_key (line 637) | struct BCM_mlkem1024_private_key
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/bn/internal.h
function bn_secret (line 164) | inline void bn_secret(BIGNUM *bn) {
function bn_declassify (line 170) | inline void bn_declassify(BIGNUM *bn) {
function bn_mulx_adx_capable (line 293) | inline int bn_mulx_adx_capable(void) {
function bn_mul4x_mont_capable (line 299) | inline int bn_mul4x_mont_capable(size_t num) {
function bn_mulx4x_mont_capable (line 304) | inline int bn_mulx4x_mont_capable(size_t num) {
function bn_sqr8x_mont_capable (line 309) | inline int bn_sqr8x_mont_capable(size_t num) {
function bn_mul8x_mont_neon_capable (line 315) | inline int bn_mul8x_mont_neon_capable(size_t num) {
function bn_mul4x_mont_gather5_capable (line 331) | inline int bn_mul4x_mont_gather5_capable(int num) { return (num & 7) == ...
function bn_mulx4x_mont_gather5_capable (line 336) | inline int bn_mulx4x_mont_gather5_capable(int num) {
function bn_power5_capable (line 364) | inline int bn_power5_capable(int num) { return (num & 7) == 0; }
function bn_powerx5_capable (line 366) | inline int bn_powerx5_capable(int num) {
type BN_MILLER_RABIN (line 430) | typedef struct {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/bn/rsaz_exp.h
function rsaz_avx2_capable (line 42) | inline int rsaz_avx2_capable(void) { return CRYPTO_is_AVX2_capable(); }
function rsaz_avx2_preferred (line 44) | inline int rsaz_avx2_preferred(void) {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/cipher/internal.h
type evp_aead_st (line 30) | struct evp_aead_st {
type evp_cipher_st (line 68) | struct evp_cipher_st {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/dh/internal.h
type dh_st (line 29) | struct dh_st {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/digest/internal.h
type env_md_st (line 20) | struct env_md_st {
type evp_md_pctx_ops (line 50) | struct evp_md_pctx_ops {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/digest/md32_common.h
function crypto_md32_update (line 59) | static inline void crypto_md32_update(crypto_md32_block_func block_func,
function crypto_md32_final (line 118) | static inline void crypto_md32_final(crypto_md32_block_func block_func,
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/ec/internal.h
type EC_SCALAR (line 49) | typedef struct {
type EC_FELEM (line 144) | typedef struct {
type EC_JACOBIAN (line 208) | typedef struct {
type EC_AFFINE (line 217) | typedef struct {
type EC_PRECOMP (line 297) | typedef union {
type ec_method_st (line 425) | struct ec_method_st {
type ec_point_st (line 537) | struct ec_point_st {
type ec_group_st (line 548) | struct ec_group_st {
type EC_WRAPPED_SCALAR (line 675) | typedef struct {
type ec_key_st (line 680) | struct ec_key_st {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/ec/p256-nistz.h
type P256_POINT (line 122) | typedef struct {
type P256_POINT_AFFINE (line 130) | typedef struct {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/keccak/internal.h
type boringssl_keccak_config_t (line 25) | enum boringssl_keccak_config_t {
type boringssl_keccak_phase_t (line 32) | enum boringssl_keccak_phase_t {
type BORINGSSL_keccak_st (line 37) | struct BORINGSSL_keccak_st {
type boringssl_keccak_config_t (line 51) | enum boringssl_keccak_config_t
type BORINGSSL_keccak_st (line 56) | struct BORINGSSL_keccak_st
type boringssl_keccak_config_t (line 56) | enum boringssl_keccak_config_t
type BORINGSSL_keccak_st (line 59) | struct BORINGSSL_keccak_st
type BORINGSSL_keccak_st (line 63) | struct BORINGSSL_keccak_st
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/rand/internal.h
type ctr_drbg_state_st (line 34) | struct ctr_drbg_state_st {
function have_rdrand (line 53) | inline int have_rdrand(void) { return CRYPTO_is_RDRAND_capable(); }
function have_fast_rdrand (line 58) | inline int have_fast_rdrand(void) {
function have_rdrand (line 73) | inline int have_rdrand(void) { return 0; }
function have_fast_rdrand (line 75) | inline int have_fast_rdrand(void) { return 0; }
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/rsa/internal.h
type BN_BLINDING (line 25) | typedef struct bn_blinding_st BN_BLINDING;
type rsa_st (line 27) | struct rsa_st {
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/service_indicator/internal.h
function FIPS_service_indicator_update_state (line 56) | inline void FIPS_service_indicator_update_state(void) {}
function FIPS_service_indicator_lock_state (line 57) | inline void FIPS_service_indicator_lock_state(void) {}
function FIPS_service_indicator_unlock_state (line 58) | inline void FIPS_service_indicator_unlock_state(void) {}
function AEAD_GCM_verify_service_indicator (line 60) | inline void AEAD_GCM_verify_service_indicator(
function AEAD_CCM_verify_service_indicator (line 63) | inline void AEAD_CCM_verify_service_indicator(
function EC_KEY_keygen_verify_service_indicator (line 66) | inline void EC_KEY_keygen_verify_service_indicator(
function ECDH_verify_service_indicator (line 69) | inline void ECDH_verify_service_indicator(
function EVP_Cipher_verify_service_indicator (line 72) | inline void EVP_Cipher_verify_service_indicator(
function EVP_DigestSign_verify_service_indicator (line 75) | inline void EVP_DigestSign_verify_service_indicator(
function EVP_DigestVerify_verify_service_indicator (line 78) | inline void EVP_DigestVerify_verify_service_indicator(
function HMAC_verify_service_indicator (line 81) | inline void HMAC_verify_service_indicator(
function TLSKDF_verify_service_indicator (line 84) | inline void TLSKDF_verify_service_indicator(
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/sha/internal.h
function sha1_hw_capable (line 36) | inline int sha1_hw_capable(void) { return CRYPTO_is_ARMv8_SHA1_capable(); }
function sha256_hw_capable (line 43) | inline int sha256_hw_capable(void) { return CRYPTO_is_ARMv8_SHA256_capab...
function sha1_hw_capable (line 61) | inline int sha1_hw_capable(void) { return CRYPTO_is_ARMv8_SHA1_capable(); }
function sha256_hw_capable (line 64) | inline int sha256_hw_capable(void) { return CRYPTO_is_ARMv8_SHA256_capab...
function sha512_hw_capable (line 67) | inline int sha512_hw_capable(void) { return CRYPTO_is_ARMv8_SHA512_capab...
function sha1_ssse3_capable (line 76) | inline int sha1_ssse3_capable(void) {
function sha1_avx_capable (line 85) | inline int sha1_avx_capable(void) {
function sha256_ssse3_capable (line 99) | inline int sha256_ssse3_capable(void) {
function sha256_avx_capable (line 108) | inline int sha256_avx_capable(void) {
function sha512_ssse3_capable (line 122) | inline int sha512_ssse3_capable(void) {
function sha1_hw_capable (line 137) | inline int sha1_hw_capable(void) {
function sha1_avx2_capable (line 142) | inline int sha1_avx2_capable(void) {
function sha1_avx_capable (line 150) | inline int sha1_avx_capable(void) {
function sha1_ssse3_capable (line 159) | inline int sha1_ssse3_capable(void) { return CRYPTO_is_SSSE3_capable(); }
function sha256_hw_capable (line 164) | inline int sha256_hw_capable(void) {
function sha256_avx_capable (line 170) | inline int sha256_avx_capable(void) {
function sha256_ssse3_capable (line 179) | inline int sha256_ssse3_capable(void) { return CRYPTO_is_SSSE3_capable(); }
function sha512_avx_capable (line 184) | inline int sha512_avx_capable(void) { return CRYPTO_is_AVX_capable(); }
FILE: Sources/CNIOBoringSSL/crypto/fipsmodule/slhdsa/address.h
function slhdsa_set_chain_addr (line 58) | inline void slhdsa_set_chain_addr(uint8_t addr[32], uint32_t chain) {
function slhdsa_set_hash_addr (line 62) | inline void slhdsa_set_hash_addr(uint8_t addr[32], uint32_t hash) {
function slhdsa_set_keypair_addr (line 66) | inline void slhdsa_set_keypair_addr(uint8_t addr[32], uint32_t keypair) {
function slhdsa_copy_keypair_addr (line 71) | inline void slhdsa_copy_keypair_addr(uint8_t out[32], const uint8_t in[3...
function slhdsa_set_layer_addr (line 77) | inline void slhdsa_set_layer_addr(uint8_t addr[32], uint32_t layer) {
function slhdsa_set_tree_addr (line 81) | inline void slhdsa_set_tree_addr(uint8_t addr[32], uint64_t tree) {
function slhdsa_set_type (line 93) | inline void slhdsa_set_type(uint8_t addr[32], uint32_t type) {
function slhdsa_set_tree_height (line 102) | inline void slhdsa_set_tree_height(uint8_t addr[32], uint32_t tree_heigh...
function slhdsa_set_tree_index (line 106) | inline void slhdsa_set_tree_index(uint8_t addr[32], uint32_t tree_index) {
function slhdsa_get_tree_index (line 110) | inline uint32_t slhdsa_get_tree_index(uint8_t addr[32]) {
FILE: Sources/CNIOBoringSSL/crypto/hpke/hpke.cc
type evp_hpke_kem_st (line 41) | struct evp_hpke_kem_st {
type evp_hpke_kdf_st (line 72) | struct evp_hpke_kdf_st {
type evp_hpke_aead_st (line 78) | struct evp_hpke_aead_st {
function add_label_string (line 88) | static int add_label_string(CBB *cbb, const char *label) {
function hpke_labeled_extract (line 92) | static int hpke_labeled_extract(const EVP_MD *hkdf_md, uint8_t *out_key,
function hpke_labeled_expand (line 110) | static int hpke_labeled_expand(const EVP_MD *hkdf_md, uint8_t *out_key,
function dhkem_extract_and_expand (line 134) | static int dhkem_extract_and_expand(uint16_t kem_id, const EVP_MD *hkdf_md,
function x25519_init_key (line 151) | static int x25519_init_key(EVP_HPKE_KEY *key, const uint8_t *priv_key,
function x25519_generate_key (line 163) | static int x25519_generate_key(EVP_HPKE_KEY *key) {
function x25519_encap_with_seed (line 168) | static int x25519_encap_with_seed(
function x25519_decap (line 205) | static int x25519_decap(const EVP_HPKE_KEY *key, uint8_t *out_shared_sec...
function x25519_auth_encap_with_seed (line 229) | static int x25519_auth_encap_with_seed(
function x25519_auth_decap (line 269) | static int x25519_auth_decap(const EVP_HPKE_KEY *key,
function EVP_HPKE_KEM (line 299) | const EVP_HPKE_KEM *EVP_hpke_x25519_hkdf_sha256(void) {
function p256_public_from_private (line 322) | static int p256_public_from_private(uint8_t out_pub[P256_PUBLIC_VALUE_LEN],
function p256_init_key (line 349) | static int p256_init_key(EVP_HPKE_KEY *key, const uint8_t *priv_key,
function p256_private_key_from_seed (line 364) | static int p256_private_key_from_seed(uint8_t out_priv[P256_PRIVATE_KEY_...
function p256_generate_key (line 404) | static int p256_generate_key(EVP_HPKE_KEY *key) {
function p256 (line 414) | static int p256(uint8_t out_dh[P256_SHARED_KEY_LEN],
function p256_encap_with_seed (line 447) | static int p256_encap_with_seed(const EVP_HPKE_KEM *kem,
function p256_decap (line 490) | static int p256_decap(const EVP_HPKE_KEY *key, uint8_t *out_shared_secret,
function p256_auth_encap_with_seed (line 514) | static int p256_auth_encap_with_seed(
function p256_auth_decap (line 558) | static int p256_auth_decap(const EVP_HPKE_KEY *key, uint8_t *out_shared_...
function EVP_HPKE_KEM (line 587) | const EVP_HPKE_KEM *EVP_hpke_p256_hkdf_sha256(void) {
function EVP_HPKE_KEM_id (line 604) | uint16_t EVP_HPKE_KEM_id(const EVP_HPKE_KEM *kem) { return kem->id; }
function EVP_HPKE_KEM_public_key_len (line 606) | size_t EVP_HPKE_KEM_public_key_len(const EVP_HPKE_KEM *kem) {
function EVP_HPKE_KEM_private_key_len (line 610) | size_t EVP_HPKE_KEM_private_key_len(const EVP_HPKE_KEM *kem) {
function EVP_HPKE_KEM_enc_len (line 614) | size_t EVP_HPKE_KEM_enc_len(const EVP_HPKE_KEM *kem) { return kem->enc_l...
function EVP_HPKE_KEY_zero (line 616) | void EVP_HPKE_KEY_zero(EVP_HPKE_KEY *key) {
function EVP_HPKE_KEY_cleanup (line 620) | void EVP_HPKE_KEY_cleanup(EVP_HPKE_KEY *key) {
function EVP_HPKE_KEY (line 625) | EVP_HPKE_KEY *EVP_HPKE_KEY_new(void) {
function EVP_HPKE_KEY_free (line 635) | void EVP_HPKE_KEY_free(EVP_HPKE_KEY *key) {
function EVP_HPKE_KEY_copy (line 642) | int EVP_HPKE_KEY_copy(EVP_HPKE_KEY *dst, const EVP_HPKE_KEY *src) {
function EVP_HPKE_KEY_move (line 648) | void EVP_HPKE_KEY_move(EVP_HPKE_KEY *out, EVP_HPKE_KEY *in) {
function EVP_HPKE_KEY_init (line 657) | int EVP_HPKE_KEY_init(EVP_HPKE_KEY *key, const EVP_HPKE_KEM *kem,
function EVP_HPKE_KEY_generate (line 668) | int EVP_HPKE_KEY_generate(EVP_HPKE_KEY *key, const EVP_HPKE_KEM *kem) {
function EVP_HPKE_KEM (line 678) | const EVP_HPKE_KEM *EVP_HPKE_KEY_kem(const EVP_HPKE_KEY *key) {
function EVP_HPKE_KEY_public_key (line 682) | int EVP_HPKE_KEY_public_key(const EVP_HPKE_KEY *key, uint8_t *out,
function EVP_HPKE_KEY_private_key (line 693) | int EVP_HPKE_KEY_private_key(const EVP_HPKE_KEY *key, uint8_t *out,
function EVP_HPKE_KDF (line 707) | const EVP_HPKE_KDF *EVP_hpke_hkdf_sha256(void) {
function EVP_HPKE_KDF_id (line 712) | uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf) { return kdf->id; }
function EVP_MD (line 714) | const EVP_MD *EVP_HPKE_KDF_hkdf_md(const EVP_HPKE_KDF *kdf) {
function EVP_HPKE_AEAD (line 718) | const EVP_HPKE_AEAD *EVP_hpke_aes_128_gcm(void) {
function EVP_HPKE_AEAD (line 724) | const EVP_HPKE_AEAD *EVP_hpke_aes_256_gcm(void) {
function EVP_HPKE_AEAD (line 730) | const EVP_HPKE_AEAD *EVP_hpke_chacha20_poly1305(void) {
function EVP_HPKE_AEAD_id (line 736) | uint16_t EVP_HPKE_AEAD_id(const EVP_HPKE_AEAD *aead) { return aead->id; }
function EVP_AEAD (line 738) | const EVP_AEAD *EVP_HPKE_AEAD_aead(const EVP_HPKE_AEAD *aead) {
function hpke_build_suite_id (line 750) | static int hpke_build_suite_id(const EVP_HPKE_CTX *ctx,
function hpke_key_schedule (line 763) | static int hpke_key_schedule(EVP_HPKE_CTX *ctx, uint8_t mode,
function EVP_HPKE_CTX_zero (line 842) | void EVP_HPKE_CTX_zero(EVP_HPKE_CTX *ctx) {
function EVP_HPKE_CTX_cleanup (line 847) | void EVP_HPKE_CTX_cleanup(EVP_HPKE_CTX *ctx) {
function EVP_HPKE_CTX (line 851) | EVP_HPKE_CTX *EVP_HPKE_CTX_new(void) {
function EVP_HPKE_CTX_free (line 861) | void EVP_HPKE_CTX_free(EVP_HPKE_CTX *ctx) {
function EVP_HPKE_CTX_setup_sender (line 868) | int EVP_HPKE_CTX_setup_sender(EVP_HPKE_CTX *ctx, uint8_t *out_enc,
function EVP_HPKE_CTX_setup_sender_with_seed_for_testing (line 882) | int EVP_HPKE_CTX_setup_sender_with_seed_for_testing(
function EVP_HPKE_CTX_setup_recipient (line 906) | int EVP_HPKE_CTX_setup_recipient(EVP_HPKE_CTX *ctx, const EVP_HPKE_KEY *...
function EVP_HPKE_CTX_setup_auth_sender (line 928) | int EVP_HPKE_CTX_setup_auth_sender(
function EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing (line 940) | int EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing(
function EVP_HPKE_CTX_setup_auth_recipient (line 970) | int EVP_HPKE_CTX_setup_auth_recipient(
function hpke_nonce (line 998) | static void hpke_nonce(const EVP_HPKE_CTX *ctx, uint8_t *out_nonce,
function EVP_HPKE_CTX_open (line 1016) | int EVP_HPKE_CTX_open(EVP_HPKE_CTX *ctx, uint8_t *out, size_t *out_len,
function EVP_HPKE_CTX_seal (line 1040) | int EVP_HPKE_CTX_seal(EVP_HPKE_CTX *ctx, uint8_t *out, size_t *out_len,
function EVP_HPKE_CTX_export (line 1064) | int EVP_HPKE_CTX_export(const EVP_HPKE_CTX *ctx, uint8_t *out,
function EVP_HPKE_CTX_max_overhead (line 1080) | size_t EVP_HPKE_CTX_max_overhead(const EVP_HPKE_CTX *ctx) {
function EVP_HPKE_KEM (line 1085) | const EVP_HPKE_KEM *EVP_HPKE_CTX_kem(const EVP_HPKE_CTX *ctx) {
function EVP_HPKE_AEAD (line 1089) | const EVP_HPKE_AEAD *EVP_HPKE_CTX_aead(const EVP_HPKE_CTX *ctx) {
function EVP_HPKE_KDF (line 1093) | const EVP_HPKE_KDF *EVP_HPKE_CTX_kdf(const EVP_HPKE_CTX *ctx) {
FILE: Sources/CNIOBoringSSL/crypto/hrss/hrss.cc
function vec_capable (line 69) | static int vec_capable(void) { return 1; }
function vec_t (line 72) | static inline vec_t vec_add(vec_t a, vec_t b) { return _mm_add_epi16(a, ...
function vec_t (line 75) | static inline vec_t vec_sub(vec_t a, vec_t b) { return _mm_sub_epi16(a, ...
function vec_t (line 79) | static inline vec_t vec_mul(vec_t a, uint16_t b) {
function vec_t (line 85) | static inline vec_t vec_fma(vec_t a, vec_t b, uint16_t c) {
function vec3_rshift_word (line 90) | static inline void vec3_rshift_word(vec_t v[3]) {
function vec4_rshift_word (line 107) | static inline void vec4_rshift_word(vec_t v[4]) {
function vec_t (line 129) | static inline vec_t vec_merge_3_5(vec_t left, vec_t right) {
function poly3_vec_lshift1 (line 135) | static inline void poly3_vec_lshift1(vec_t a_s[6], vec_t a_a[6]) {
function poly3_vec_rshift1 (line 156) | static inline void poly3_vec_rshift1(vec_t a_s[6], vec_t a_a[6]) {
function vec_t (line 177) | static inline vec_t vec_broadcast_bit(vec_t a) {
function vec_capable (line 194) | static int vec_capable(void) { return CRYPTO_is_NEON_capable(); }
function vec_t (line 196) | static inline vec_t vec_add(vec_t a, vec_t b) { return a + b; }
function vec_t (line 198) | static inline vec_t vec_sub(vec_t a, vec_t b) { return a - b; }
function vec_t (line 200) | static inline vec_t vec_mul(vec_t a, uint16_t b) { return vmulq_n_u16(a,...
function vec_t (line 202) | static inline vec_t vec_fma(vec_t a, vec_t b, uint16_t c) {
function vec3_rshift_word (line 206) | static inline void vec3_rshift_word(vec_t v[3]) {
function vec4_rshift_word (line 213) | static inline void vec4_rshift_word(vec_t v[4]) {
function vec_t (line 221) | static inline vec_t vec_merge_3_5(vec_t left, vec_t right) {
function vec_get_word (line 225) | static inline uint16_t vec_get_word(vec_t v, unsigned i) { return v[i]; }
function vec_t (line 229) | static inline vec_t vec_broadcast_bit(vec_t a) {
function poly3_vec_lshift1 (line 234) | static inline void poly3_vec_lshift1(vec_t a_s[6], vec_t a_a[6]) {
function poly3_vec_rshift1 (line 254) | static inline void poly3_vec_rshift1(vec_t a_s[6], vec_t a_a[6]) {
function poly2_zero (line 295) | static void poly2_zero(struct poly2 *p) {
function crypto_word_t (line 300) | static crypto_word_t word_reverse(crypto_word_t in) {
function crypto_word_t (line 323) | static crypto_word_t lsb_to_all(crypto_word_t v) { return 0u - (v & 1); }
function poly2_mod_phiN (line 326) | static void poly2_mod_phiN(struct poly2 *p) {
function poly2_reverse_700 (line 338) | static void poly2_reverse_700(struct poly2 *out, const struct poly2 *in) {
function poly2_cswap (line 353) | static void poly2_cswap(struct poly2 *a, struct poly2 *b, crypto_word_t ...
function poly2_fmadd (line 363) | static void poly2_fmadd(struct poly2 *out, const struct poly2 *in,
function poly2_lshift1 (line 371) | static void poly2_lshift1(struct poly2 *p) {
function poly2_rshift1 (line 382) | static void poly2_rshift1(struct poly2 *p) {
function poly2_clear_top_bits (line 394) | static void poly2_clear_top_bits(struct poly2 *p) {
function poly3_zero (line 435) | static void poly3_zero(struct poly3 *p) {
function poly3_reverse_700 (line 442) | static void poly3_reverse_700(struct poly3 *out, const struct poly3 *in) {
function poly3_word_mul (line 448) | static void poly3_word_mul(crypto_word_t *out_s, crypto_word_t *out_a,
function poly3_word_add (line 456) | static void poly3_word_add(crypto_word_t *out_s, crypto_word_t *out_a,
function poly3_word_sub (line 465) | static void poly3_word_sub(crypto_word_t *out_s, crypto_word_t *out_a,
function poly3_mul_const (line 474) | static void poly3_mul_const(struct poly3 *p, crypto_word_t ms,
function poly3_fmsub (line 485) | static void poly3_fmsub(struct poly3 *out, const struct poly3 *in,
function crypto_word_t (line 497) | static crypto_word_t final_bit_to_all(crypto_word_t v) {
function poly3_mod_phiN (line 502) | static void poly3_mod_phiN(struct poly3 *p) {
function poly3_cswap (line 517) | static void poly3_cswap(struct poly3 *a, struct poly3 *b, crypto_word_t ...
function poly3_lshift1 (line 522) | static void poly3_lshift1(struct poly3 *p) {
function poly3_rshift1 (line 527) | static void poly3_rshift1(struct poly3 *p) {
type poly3_span (line 533) | struct poly3_span {
function poly3_span_add (line 540) | static void poly3_span_add(const struct poly3_span *out,
function poly3_span_sub (line 549) | static void poly3_span_sub(const struct poly3_span *a,
function poly3_mul_aux (line 561) | static void poly3_mul_aux(const struct poly3_span *out,
function HRSS_poly3_mul (line 649) | void HRSS_poly3_mul(struct poly3 *out, const struct poly3 *x,
function poly3_vec_cswap (line 684) | static inline void poly3_vec_cswap(vec_t a_s[6], vec_t a_a[6], vec_t b_s...
function poly3_vec_fmsub (line 698) | static inline void poly3_vec_fmsub(vec_t a_s[6], vec_t a_a[6], vec_t b_s...
function poly3_invert_vec (line 718) | static void poly3_invert_vec(struct poly3 *out, const struct poly3 *in) {
function HRSS_poly3_invert (line 784) | void HRSS_poly3_invert(struct poly3 *out, const struct poly3 *in) {
type poly (line 858) | struct poly {
function poly_normalize (line 876) | static void poly_normalize(struct poly *x) {
function poly_assert_normalized (line 882) | static void poly_assert_normalized(const struct poly *x) {
type POLY_MUL_SCRATCH (line 894) | struct POLY_MUL_SCRATCH {
function poly_mul_vec_aux (line 925) | static void poly_mul_vec_aux(vec_t *out, vec_t *scratch, const vec_t *a,
function poly_mul_vec (line 1162) | static void poly_mul_vec(struct POLY_MUL_SCRATCH *scratch, struct poly *...
function poly_mul_novec_aux (line 1197) | static void poly_mul_novec_aux(uint16_t *out, uint16_t *scratch,
function poly_mul_novec (line 1250) | static void poly_mul_novec(struct POLY_MUL_SCRATCH *scratch, struct poly...
function poly_mul (line 1262) | static void poly_mul(struct POLY_MUL_SCRATCH *scratch, struct poly *r,
function poly_mul_x_minus_1 (line 1286) | static void poly_mul_x_minus_1(struct poly *p) {
function poly_mod_phiN (line 1298) | static void poly_mod_phiN(struct poly *p) {
function poly_clamp (line 1307) | static void poly_clamp(struct poly *p) {
function poly2_from_poly (line 1318) | static void poly2_from_poly(struct poly2 *out, const struct poly *in) {
function mod3 (line 1341) | static uint16_t mod3(int16_t a) {
function poly3_from_poly (line 1350) | static void poly3_from_poly(struct poly3 *out, const struct poly *in) {
function crypto_word_t (line 1388) | static crypto_word_t poly3_from_poly_checked(struct poly3 *out,
function poly_from_poly2 (line 1431) | static void poly_from_poly2(struct poly *out, const struct poly2 *in) {
function poly_from_poly3 (line 1451) | static void poly_from_poly3(struct poly *out, const struct poly3 *in) {
function poly_invert_mod2 (line 1483) | static void poly_invert_mod2(struct poly *out, const struct poly *in) {
function poly_invert (line 1532) | static void poly_invert(struct POLY_MUL_SCRATCH *scratch, struct poly *out,
function poly_marshal (line 1565) | static void poly_marshal(uint8_t out[POLY_BYTES], const struct poly *in) {
function poly_unmarshal (line 1601) | static int poly_unmarshal(struct poly *out, const uint8_t in[POLY_BYTES]) {
function mod3_from_modQ (line 1653) | static uint16_t mod3_from_modQ(uint16_t v) {
function poly_marshal_mod3 (line 1661) | static void poly_marshal_mod3(uint8_t out[HRSS_POLY3_BYTES],
function poly_short_sample (line 1687) | static void poly_short_sample(struct poly *out,
function poly_short_sample_plus (line 1702) | static void poly_short_sample_plus(struct poly *out,
function poly_lift (line 1724) | static void poly_lift(struct poly *out, const struct poly *a) {
type public_key (line 1841) | struct public_key {
type poly (line 1842) | struct poly
type private_key (line 1845) | struct private_key {
type poly3 (line 1846) | struct poly3
type poly (line 1847) | struct poly
type public_key (line 1860) | struct public_key
type poly (line 1842) | struct poly
type HRSS_public_key (line 1861) | struct HRSS_public_key
type HRSS_public_key (line 1863) | struct HRSS_public_key
type public_key (line 1863) | struct public_key
type poly (line 1842) | struct poly
type private_key (line 1872) | struct private_key
type poly3 (line 1846) | struct poly3
type poly (line 1847) | struct poly
type HRSS_private_key (line 1873) | struct HRSS_private_key
type HRSS_private_key (line 1875) | struct HRSS_private_key
type private_key (line 1875) | struct private_key
type poly3 (line 1846) | struct poly3
type poly (line 1847) | struct poly
function HRSS_generate_key (line 1895) | int HRSS_generate_key(
function HRSS_encap (line 1958) | int HRSS_encap(uint8_t out_ciphertext[POLY_BYTES], uint8_t out_shared_ke...
function HRSS_decap (line 2014) | int HRSS_decap(uint8_t out_shared_key[HRSS_KEY_BYTES],
function HRSS_marshal_public_key (line 2171) | void HRSS_marshal_public_key(uint8_t out[HRSS_PUBLIC_KEY_BYTES],
function HRSS_parse_public_key (line 2178) | int HRSS_parse_public_key(struct HRSS_public_key *out,
FILE: Sources/CNIOBoringSSL/crypto/hrss/internal.h
type poly2 (line 31) | struct poly2 {
type poly3 (line 35) | struct poly3 {
type poly3 (line 39) | struct poly3
type poly3 (line 39) | struct poly3
type poly3 (line 40) | struct poly3
type poly3 (line 41) | struct poly3
type poly3 (line 42) | struct poly3
FILE: Sources/CNIOBoringSSL/crypto/internal.h
function OPENSSL_init_cpuid (line 71) | inline void OPENSSL_init_cpuid(void) {}
type __int128_t (line 87) | typedef __int128_t int128_t;
type __uint128_t (line 88) | typedef __uint128_t uint128_t;
function OPENSSL_reset_malloc_counter_for_testing (line 156) | inline void OPENSSL_reset_malloc_counter_for_testing(void) {}
function OPENSSL_disable_malloc_failures_for_testing (line 157) | inline void OPENSSL_disable_malloc_failures_for_testing(void) {}
function OPENSSL_enable_malloc_failures_for_testing (line 158) | inline void OPENSSL_enable_malloc_failures_for_testing(void) {}
function buffers_alias (line 171) | static inline int buffers_alias(const void *a, size_t a_bytes, const voi...
type crypto_word_t (line 224) | typedef uint64_t crypto_word_t;
type crypto_word_t (line 226) | typedef uint32_t crypto_word_t;
function crypto_word_t (line 243) | static inline crypto_word_t value_barrier_w(crypto_word_t a) {
function value_barrier_u32 (line 251) | static inline uint32_t value_barrier_u32(uint32_t a) {
function value_barrier_u64 (line 259) | static inline uint64_t value_barrier_u64(uint64_t a) {
function crypto_word_t (line 271) | static inline crypto_word_t constant_time_msb_w(crypto_word_t a) {
function crypto_word_t (line 276) | static inline crypto_word_t constant_time_lt_w(crypto_word_t a,
function constant_time_lt_8 (line 313) | static inline uint8_t constant_time_lt_8(crypto_word_t a, crypto_word_t ...
function crypto_word_t (line 318) | static inline crypto_word_t constant_time_ge_w(crypto_word_t a,
function constant_time_ge_8 (line 325) | static inline uint8_t constant_time_ge_8(crypto_word_t a, crypto_word_t ...
function crypto_word_t (line 330) | static inline crypto_word_t constant_time_is_zero_w(crypto_word_t a) {
function constant_time_is_zero_8 (line 346) | static inline uint8_t constant_time_is_zero_8(crypto_word_t a) {
function crypto_word_t (line 351) | static inline crypto_word_t constant_time_eq_w(crypto_word_t a,
function constant_time_eq_8 (line 358) | static inline uint8_t constant_time_eq_8(crypto_word_t a, crypto_word_t ...
function crypto_word_t (line 364) | static inline crypto_word_t constant_time_eq_int(int a, int b) {
function constant_time_eq_int_8 (line 370) | static inline uint8_t constant_time_eq_int_8(int a, int b) {
function crypto_word_t (line 377) | static inline crypto_word_t constant_time_select_w(crypto_word_t mask,
function constant_time_select_8 (line 391) | static inline uint8_t constant_time_select_8(crypto_word_t mask, uint8_t a,
function constant_time_select_int (line 405) | static inline int constant_time_select_int(crypto_word_t mask, int a, in...
function constant_time_conditional_memcpy (line 413) | static inline void constant_time_conditional_memcpy(void *dst, const voi...
function constant_time_conditional_memxor (line 427) | static inline void constant_time_conditional_memxor(void *dst, const voi...
function crypto_word_t (line 469) | static inline crypto_word_t constant_time_declassify_w(crypto_word_t v) {
function constant_time_declassify_int (line 485) | static inline int constant_time_declassify_int(int v) {
type CRYPTO_once_t (line 503) | typedef uint32_t CRYPTO_once_t;
type INIT_ONCE (line 506) | typedef INIT_ONCE CRYPTO_once_t;
type pthread_once_t (line 509) | typedef pthread_once_t CRYPTO_once_t;
function CRYPTO_atomic_load_u32 (line 536) | inline uint32_t CRYPTO_atomic_load_u32(const CRYPTO_atomic_u32 *val) {
function CRYPTO_atomic_compare_exchange_weak_u32 (line 540) | inline bool CRYPTO_atomic_compare_exchange_weak_u32(CRYPTO_atomic_u32 *val,
function CRYPTO_atomic_store_u32 (line 547) | inline void CRYPTO_atomic_store_u32(CRYPTO_atomic_u32 *val, uint32_t des...
type CRYPTO_atomic_u32 (line 553) | typedef uint32_t CRYPTO_atomic_u32;
function CRYPTO_atomic_load_u32 (line 555) | inline uint32_t CRYPTO_atomic_load_u32(CRYPTO_atomic_u32 *val) { return ...
function CRYPTO_atomic_compare_exchange_weak_u32 (line 557) | inline int CRYPTO_atomic_compare_exchange_weak_u32(CRYPTO_atomic_u32 *val,
function CRYPTO_atomic_store_u32 (line 568) | inline void CRYPTO_atomic_store_u32(CRYPTO_atomic_u32 *val, uint32_t des...
type CRYPTO_MUTEX (line 606) | typedef struct crypto_mutex_st {
type SRWLOCK (line 612) | typedef SRWLOCK CRYPTO_MUTEX;
type pthread_rwlock_t (line 615) | typedef pthread_rwlock_t CRYPTO_MUTEX;
function BSSL_NAMESPACE_BEGIN (line 645) | BSSL_NAMESPACE_BEGIN
type thread_local_data_t (line 683) | typedef enum {
type CRYPTO_EX_DATA_FUNCS (line 721) | typedef struct crypto_ex_data_func_st CRYPTO_EX_DATA_FUNCS;
type CRYPTO_EX_DATA_CLASS (line 726) | typedef struct {
function CRYPTO_bswap2 (line 772) | static inline uint16_t CRYPTO_bswap2(uint16_t x) {
function CRYPTO_bswap4 (line 776) | static inline uint32_t CRYPTO_bswap4(uint32_t x) {
function CRYPTO_bswap8 (line 780) | static inline uint64_t CRYPTO_bswap8(uint64_t x) {
function CRYPTO_bswap2 (line 788) | static inline uint16_t CRYPTO_bswap2(uint16_t x) { return _byteswap_usho...
function CRYPTO_bswap4 (line 790) | static inline uint32_t CRYPTO_bswap4(uint32_t x) { return _byteswap_ulon...
function CRYPTO_bswap8 (line 792) | static inline uint64_t CRYPTO_bswap8(uint64_t x) { return _byteswap_uint...
function CRYPTO_bswap2 (line 794) | static inline uint16_t CRYPTO_bswap2(uint16_t x) { return (x >> 8) | (x ...
function CRYPTO_bswap4 (line 796) | static inline uint32_t CRYPTO_bswap4(uint32_t x) {
function CRYPTO_bswap8 (line 802) | static inline uint64_t CRYPTO_bswap8(uint64_t x) {
function OPENSSL_memcmp (line 854) | static inline int OPENSSL_memcmp(const void *s1, const void *s2, size_t ...
function CRYPTO_load_u16_be (line 893) | static inline uint16_t CRYPTO_load_u16_be(const void *in) {
function CRYPTO_store_u16_be (line 899) | static inline void CRYPTO_store_u16_be(void *out, uint16_t v) {
function CRYPTO_load_u32_le (line 904) | static inline uint32_t CRYPTO_load_u32_le(const void *in) {
function CRYPTO_store_u32_le (line 910) | static inline void CRYPTO_store_u32_le(void *out, uint32_t v) {
function CRYPTO_load_u32_be (line 914) | static inline uint32_t CRYPTO_load_u32_be(const void *in) {
function CRYPTO_store_u32_be (line 920) | static inline void CRYPTO_store_u32_be(void *out, uint32_t v) {
function CRYPTO_load_u64_le (line 925) | static inline uint64_t CRYPTO_load_u64_le(const void *in) {
function CRYPTO_store_u64_le (line 931) | static inline void CRYPTO_store_u64_le(void *out, uint64_t v) {
function CRYPTO_load_u64_be (line 935) | static inline uint64_t CRYPTO_load_u64_be(const void *ptr) {
function CRYPTO_store_u64_be (line 941) | static inline void CRYPTO_store_u64_be(void *out, uint64_t v) {
function crypto_word_t (line 946) | static inline crypto_word_t CRYPTO_load_word_le(const void *in) {
function CRYPTO_store_word_le (line 952) | static inline void CRYPTO_store_word_le(void *out, crypto_word_t v) {
function crypto_word_t (line 956) | static inline crypto_word_t CRYPTO_load_word_be(const void *in) {
function CRYPTO_rotl_u32 (line 975) | static inline uint32_t CRYPTO_rotl_u32(uint32_t value, int shift) {
function CRYPTO_rotr_u32 (line 983) | static inline uint32_t CRYPTO_rotr_u32(uint32_t value, int shift) {
function CRYPTO_rotl_u64 (line 991) | static inline uint64_t CRYPTO_rotl_u64(uint64_t value, int shift) {
function CRYPTO_rotr_u64 (line 999) | static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
function boringssl_ensure_rsa_self_test (line 1041) | inline void boringssl_ensure_rsa_self_test(void) {}
function boringssl_ensure_ecc_self_test (line 1042) | inline void boringssl_ensure_ecc_self_test(void) {}
function boringssl_ensure_ffdh_self_test (line 1043) | inline void boringssl_ensure_ffdh_self_test(void) {}
type fips_counter_t (line 1057) | enum fips_counter_t
function boringssl_fips_inc_counter (line 1059) | inline void boringssl_fips_inc_counter(enum fips_counter_t counter) {}
function boringssl_fips_break_test (line 1063) | inline int boringssl_fips_break_test(const char *test) {
function boringssl_fips_break_test (line 1068) | inline int boringssl_fips_break_test(const char *test) { return 0; }
function CRYPTO_is_FXSR_capable (line 1108) | inline int CRYPTO_is_FXSR_capable(void) {
function CRYPTO_is_intel_cpu (line 1116) | inline int CRYPTO_is_intel_cpu(void) {
function CRYPTO_is_PCLMUL_capable (line 1123) | inline int CRYPTO_is_PCLMUL_capable(void) {
function CRYPTO_is_SSSE3_capable (line 1131) | inline int CRYPTO_is_SSSE3_capable(void) {
function CRYPTO_is_SSE4_1_capable (line 1139) | inline int CRYPTO_is_SSE4_1_capable(void) {
function CRYPTO_is_MOVBE_capable (line 1147) | inline int CRYPTO_is_MOVBE_capable(void) {
function CRYPTO_is_AESNI_capable (line 1155) | inline int CRYPTO_is_AESNI_capable(void) {
function CRYPTO_is_AVX_capable (line 1166) | inline int CRYPTO_is_AVX_capable(void) {
function CRYPTO_is_RDRAND_capable (line 1174) | inline int CRYPTO_is_RDRAND_capable(void) {
function CRYPTO_is_BMI1_capable (line 1183) | inline int CRYPTO_is_BMI1_capable(void) {
function CRYPTO_is_AVX2_capable (line 1191) | inline int CRYPTO_is_AVX2_capable(void) {
function CRYPTO_is_BMI2_capable (line 1199) | inline int CRYPTO_is_BMI2_capable(void) {
function CRYPTO_is_ADX_capable (line 1207) | inline int CRYPTO_is_ADX_capable(void) {
function CRYPTO_is_x86_SHA_capable (line 1216) | inline int CRYPTO_is_x86_SHA_capable(void) {
function CRYPTO_cpu_perf_is_like_silvermont (line 1250) | inline int CRYPTO_cpu_perf_is_like_silvermont(void) {
function CRYPTO_is_AVX512BW_capable (line 1264) | inline int CRYPTO_is_AVX512BW_capable(void) {
function CRYPTO_is_AVX512VL_capable (line 1272) | inline int CRYPTO_is_AVX512VL_capable(void) {
function CRYPTO_cpu_avoid_zmm_registers (line 1284) | inline int CRYPTO_cpu_avoid_zmm_registers(void) {
function CRYPTO_is_VAES_capable (line 1288) | inline int CRYPTO_is_VAES_capable(void) {
function CRYPTO_is_VPCLMULQDQ_capable (line 1296) | inline int CRYPTO_is_VPCLMULQDQ_capable(void) {
function CRYPTO_is_NEON_capable (line 1333) | inline int CRYPTO_is_NEON_capable(void) {
function CRYPTO_is_ARMv8_AES_capable (line 1343) | inline int CRYPTO_is_ARMv8_AES_capable(void) {
function CRYPTO_is_ARMv8_PMULL_capable (line 1353) | inline int CRYPTO_is_ARMv8_PMULL_capable(void) {
function CRYPTO_is_ARMv8_SHA1_capable (line 1363) | inline int CRYPTO_is_ARMv8_SHA1_capable(void) {
function CRYPTO_is_ARMv8_SHA256_capable (line 1375) | inline int CRYPTO_is_ARMv8_SHA256_capable(void) {
function CRYPTO_is_ARMv8_SHA512_capable (line 1387) | inline int CRYPTO_is_ARMv8_SHA512_capable(void) {
function CRYPTO_addc_impl (line 1435) | inline unsigned int CRYPTO_addc_impl(unsigned int x, unsigned int y,
function CRYPTO_addc_impl (line 1441) | inline unsigned long CRYPTO_addc_impl(unsigned long x, unsigned long y,
function CRYPTO_addc_impl (line 1447) | inline unsigned long long CRYPTO_addc_impl(unsigned long long x,
function CRYPTO_addc_u32 (line 1454) | inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t carry,
function CRYPTO_addc_u64 (line 1459) | inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
function CRYPTO_addc_u32 (line 1466) | static inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t ...
function CRYPTO_addc_u64 (line 1475) | static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t ...
function CRYPTO_subc_impl (line 1499) | inline unsigned int CRYPTO_subc_impl(unsigned int x, unsigned int y,
function CRYPTO_subc_impl (line 1505) | inline unsigned long CRYPTO_subc_impl(unsigned long x, unsigned long y,
function CRYPTO_subc_impl (line 1511) | inline unsigned long long CRYPTO_subc_impl(unsigned long long x,
function CRYPTO_subc_u32 (line 1518) | inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t borrow,
function CRYPTO_subc_u64 (line 1523) | inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
function CRYPTO_subc_u32 (line 1530) | static inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t ...
function CRYPTO_subc_u64 (line 1538) | static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t ...
FILE: Sources/CNIOBoringSSL/crypto/kyber/internal.h
type KYBER_private_key (line 42) | struct KYBER_private_key
type KYBER_public_key (line 53) | struct KYBER_public_key
FILE: Sources/CNIOBoringSSL/crypto/kyber/kyber.cc
function prf (line 32) | static void prf(uint8_t *out, size_t out_len, const uint8_t in[33]) {
function hash_h (line 36) | static void hash_h(uint8_t out[32], const uint8_t *in, size_t len) {
function hash_g (line 40) | static void hash_g(uint8_t out[64], const uint8_t *in, size_t len) {
function kdf (line 44) | static void kdf(uint8_t *out, size_t out_len, const uint8_t *in, size_t ...
type scalar (line 65) | struct scalar {
type vector (line 70) | struct vector {
type matrix (line 74) | struct matrix {
function reduce_once (line 137) | static uint16_t reduce_once(uint16_t x) {
function reduce (line 155) | static uint16_t reduce(uint32_t x) {
function scalar_zero (line 163) | static void scalar_zero(scalar *out) { OPENSSL_memset(out, 0, sizeof(*ou...
function vector_zero (line 165) | static void vector_zero(vector *out) { OPENSSL_memset(out, 0, sizeof(*ou...
function scalar_ntt (line 173) | static void scalar_ntt(scalar *s) {
function vector_ntt (line 193) | static void vector_ntt(vector *a) {
function scalar_inverse_ntt (line 204) | static void scalar_inverse_ntt(scalar *s) {
function vector_inverse_ntt (line 227) | static void vector_inverse_ntt(vector *a) {
function scalar_add (line 233) | static void scalar_add(scalar *lhs, const scalar *rhs) {
function scalar_sub (line 239) | static void scalar_sub(scalar *lhs, const scalar *rhs) {
function scalar_mult (line 253) | static void scalar_mult(scalar *out, const scalar *lhs, const scalar *rh...
function vector_add (line 265) | static void vector_add(vector *lhs, const vector *rhs) {
function matrix_mult (line 271) | static void matrix_mult(vector *out, const matrix *m, const vector *a) {
function matrix_mult_transpose (line 282) | static void matrix_mult_transpose(vector *out, const matrix *m,
function scalar_inner_product (line 294) | static void scalar_inner_product(scalar *out, const vector *lhs,
function scalar_from_keccak_vartime (line 307) | static void scalar_from_keccak_vartime(scalar *out,
function scalar_centered_binomial_distribution_eta_2_with_prf (line 336) | static void scalar_centered_binomial_distribution_eta_2_with_prf(
function vector_generate_secret_eta_2 (line 366) | static void vector_generate_secret_eta_2(vector *out, uint8_t *counter,
function matrix_expand (line 377) | static void matrix_expand(matrix *out, const uint8_t rho[32]) {
function scalar_encode (line 395) | static void scalar_encode(uint8_t *out, const scalar *s, int bits) {
function scalar_encode_1 (line 431) | static void scalar_encode_1(uint8_t out[32], const scalar *s) {
function vector_encode (line 445) | static void vector_encode(uint8_t *out, const vector *a, int bits) {
function scalar_decode (line 454) | static int scalar_decode(scalar *out, const uint8_t *in, int bits) {
function scalar_decode_1 (line 495) | static void scalar_decode_1(scalar *out, const uint8_t in[32]) {
function vector_decode (line 508) | static int vector_decode(vector *out, const uint8_t *in, int bits) {
function compress (line 523) | static uint16_t compress(uint16_t x, int bits) {
function decompress (line 542) | static uint16_t decompress(uint16_t x, int bits) {
function scalar_compress (line 556) | static void scalar_compress(scalar *s, int bits) {
function scalar_decompress (line 562) | static void scalar_decompress(scalar *s, int bits) {
function vector_compress (line 568) | static void vector_compress(vector *a, int bits) {
function vector_decompress (line 574) | static void vector_decompress(vector *a, int bits) {
type public_key (line 582) | struct public_key {
type public_key (line 589) | struct public_key
type KYBER_public_key (line 590) | struct KYBER_public_key
type KYBER_public_key (line 591) | struct KYBER_public_key
type public_key (line 591) | struct public_key
type KYBER_public_key (line 593) | struct KYBER_public_key
type public_key (line 593) | struct public_key
type public_key (line 595) | struct public_key
type private_key (line 598) | struct private_key {
type public_key (line 599) | struct public_key
type private_key (line 604) | struct private_key
type public_key (line 599) | struct public_key
type KYBER_private_key (line 605) | struct KYBER_private_key
type KYBER_private_key (line 606) | struct KYBER_private_key
type private_key (line 606) | struct private_key
type public_key (line 599) | struct public_key
type KYBER_private_key (line 609) | struct KYBER_private_key
type private_key (line 609) | struct private_key
type public_key (line 599) | struct public_key
type private_key (line 611) | struct private_key
type public_key (line 599) | struct public_key
function KYBER_generate_key (line 618) | void KYBER_generate_key(uint8_t out_encoded_public_key[KYBER_PUBLIC_KEY_...
function kyber_marshal_public_key (line 627) | static int kyber_marshal_public_key(CBB *out, const struct public_key *p...
function KYBER_generate_key_external_entropy (line 642) | void KYBER_generate_key_external_entropy(
function KYBER_public_from_private (line 677) | void KYBER_public_from_private(struct KYBER_public_key *out_public_key,
function encrypt_cpa (line 688) | static void encrypt_cpa(uint8_t out[KYBER_CIPHERTEXT_BYTES],
function KYBER_encap (line 721) | void KYBER_encap(uint8_t out_ciphertext[KYBER_CIPHERTEXT_BYTES],
function KYBER_encap_external_entropy (line 737) | void KYBER_encap_external_entropy(
function decrypt_cpa (line 758) | static void decrypt_cpa(uint8_t out[32], const struct private_key *priv,
function KYBER_decap (line 780) | void KYBER_decap(uint8_t out_shared_secret[KYBER_SHARED_SECRET_BYTES],
function KYBER_marshal_public_key (line 806) | int KYBER_marshal_public_key(CBB *out,
function kyber_parse_public_key_no_hash (line 813) | static int kyber_parse_public_key_no_hash(struct public_key *pub, CBS *i...
function KYBER_parse_public_key (line 824) | int KYBER_parse_public_key(struct KYBER_public_key *public_key, CBS *in) {
function KYBER_marshal_private_key (line 835) | int KYBER_marshal_private_key(CBB *out,
function KYBER_parse_private_key (line 853) | int KYBER_parse_private_key(struct KYBER_private_key *out_private_key,
FILE: Sources/CNIOBoringSSL/crypto/lhash/internal.h
type _LHASH (line 61) | typedef struct lhash_st _LHASH;
FILE: Sources/CNIOBoringSSL/crypto/lhash/lhash.cc
type lhash_item_st (line 33) | struct lhash_item_st {
type lhash_item_st (line 35) | struct lhash_item_st
type lhash_st (line 40) | struct lhash_st {
function _LHASH (line 59) | _LHASH *OPENSSL_lh_new(lhash_hash_func hash, lhash_cmp_func comp) {
function OPENSSL_lh_free (line 78) | void OPENSSL_lh_free(_LHASH *lh) {
function OPENSSL_lh_num_items (line 95) | size_t OPENSSL_lh_num_items(const _LHASH *lh) { return lh->num_items; }
function LHASH_ITEM (line 104) | static LHASH_ITEM **get_next_ptr_and_hash(const _LHASH *lh, uint32_t *ou...
function LHASH_ITEM (line 126) | static LHASH_ITEM **get_next_ptr_by_key(const _LHASH *lh, const void *key,
function lh_rebucket (line 160) | static void lh_rebucket(_LHASH *lh, const size_t new_num_buckets) {
function lh_maybe_resize (line 190) | static void lh_maybe_resize(_LHASH *lh) {
function OPENSSL_lh_insert (line 219) | int OPENSSL_lh_insert(_LHASH *lh, void **old_data, void *data,
function OPENSSL_lh_doall_arg (line 278) | void OPENSSL_lh_doall_arg(_LHASH *lh, void (*func)(void *, void *), void...
FILE: Sources/CNIOBoringSSL/crypto/md4/md4.cc
function MD4_Init (line 30) | int MD4_Init(MD4_CTX *md4) {
function MD4_Transform (line 42) | void MD4_Transform(MD4_CTX *c, const uint8_t data[MD4_CBLOCK]) {
function MD4_Update (line 46) | int MD4_Update(MD4_CTX *c, const void *data, size_t len) {
function MD4_Final (line 53) | int MD4_Final(uint8_t out[MD4_DIGEST_LENGTH], MD4_CTX *c) {
function md4_block_data_order (line 89) | static void md4_block_data_order(uint32_t *state, const uint8_t *data,
FILE: Sources/CNIOBoringSSL/crypto/md5/md5.cc
function MD5_Init (line 30) | int MD5_Init(MD5_CTX *md5) {
function MD5_Transform (line 46) | void MD5_Transform(MD5_CTX *c, const uint8_t data[MD5_CBLOCK]) {
function MD5_Update (line 50) | int MD5_Update(MD5_CTX *c, const void *data, size_t len) {
function MD5_Final (line 57) | int MD5_Final(uint8_t out[MD5_DIGEST_LENGTH], MD5_CTX *c) {
function md5_block_data_order (line 108) | static void md5_block_data_order(uint32_t *state, const uint8_t *data,
FILE: Sources/CNIOBoringSSL/crypto/mem.cc
function __asan_poison_memory_region (line 45) | static void __asan_poison_memory_region(const void *addr, size_t size) {}
function __asan_unpoison_memory_region (line 46) | static void __asan_unpoison_memory_region(const void *addr, size_t size) {}
function malloc_exit_handler (line 109) | static void malloc_exit_handler(void) {
function init_malloc_failure (line 119) | static void init_malloc_failure(void) {
function should_fail_allocation (line 134) | static int should_fail_allocation() {
function OPENSSL_reset_malloc_counter_for_testing (line 158) | void OPENSSL_reset_malloc_counter_for_testing(void) {
function OPENSSL_disable_malloc_failures_for_testing (line 164) | void OPENSSL_disable_malloc_failures_for_testing(void) {
function OPENSSL_enable_malloc_failures_for_testing (line 171) | void OPENSSL_enable_malloc_failures_for_testing(void) {
function should_fail_allocation (line 179) | static int should_fail_allocation(void) { return 0; }
function OPENSSL_free (line 235) | void OPENSSL_free(void *orig_ptr) {
function OPENSSL_cleanse (line 295) | void OPENSSL_cleanse(void *ptr, size_t len) {
function OPENSSL_clear_free (line 310) | void OPENSSL_clear_free(void *ptr, size_t unused) { OPENSSL_free(ptr); }
function CRYPTO_secure_malloc_init (line 312) | int CRYPTO_secure_malloc_init(size_t size, size_t min_size) { return 0; }
function CRYPTO_secure_malloc_initialized (line 314) | int CRYPTO_secure_malloc_initialized(void) { return 0; }
function CRYPTO_secure_used (line 316) | size_t CRYPTO_secure_used(void) { return 0; }
function OPENSSL_secure_clear_free (line 320) | void OPENSSL_secure_clear_free(void *ptr, size_t len) {
function CRYPTO_memcmp (line 324) | int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len) {
function OPENSSL_hash32 (line 336) | uint32_t OPENSSL_hash32(const void *ptr, size_t len) {
function OPENSSL_strhash (line 352) | uint32_t OPENSSL_strhash(const char *s) { return OPENSSL_hash32(s, strle...
function OPENSSL_strnlen (line 354) | size_t OPENSSL_strnlen(const char *s, size_t len) {
function OPENSSL_isalpha (line 372) | int OPENSSL_isalpha(int c) {
function OPENSSL_isdigit (line 376) | int OPENSSL_isdigit(int c) { return c >= '0' && c <= '9'; }
function OPENSSL_isxdigit (line 378) | int OPENSSL_isxdigit(int c) {
function OPENSSL_fromxdigit (line 382) | int OPENSSL_fromxdigit(uint8_t *out, int c) {
function OPENSSL_isalnum (line 398) | int OPENSSL_isalnum(int c) { return OPENSSL_isalpha(c) || OPENSSL_isdigi...
function OPENSSL_tolower (line 400) | int OPENSSL_tolower(int c) {
function OPENSSL_isspace (line 407) | int OPENSSL_isspace(int c) {
function OPENSSL_strcasecmp (line 412) | int OPENSSL_strcasecmp(const char *a, const char *b) {
function OPENSSL_strncasecmp (line 427) | int OPENSSL_strncasecmp(const char *a, const char *b, size_t n) {
function BIO_snprintf (line 444) | int BIO_snprintf(char *buf, size_t n, const char *format, ...) {
function BIO_vsnprintf (line 452) | int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) {
function OPENSSL_vasprintf_internal (line 456) | int OPENSSL_vasprintf_internal(char **str, const char *format, va_list a...
function OPENSSL_vasprintf (line 502) | int OPENSSL_vasprintf(char **str, const char *format, va_list args) {
function OPENSSL_asprintf (line 506) | int OPENSSL_asprintf(char **str, const char *format, ...) {
function OPENSSL_strlcpy (line 533) | size_t OPENSSL_strlcpy(char *dst, const char *src, size_t dst_size) {
function OPENSSL_strlcat (line 548) | size_t OPENSSL_strlcat(char *dst, const char *src, size_t dst_size) {
function CRYPTO_free (line 578) | void CRYPTO_free(void *ptr, const char *file, int line) { OPENSSL_free(p...
FILE: Sources/CNIOBoringSSL/crypto/mldsa/mldsa.cc
function MLDSA65_generate_key (line 31) | int MLDSA65_generate_key(
function MLDSA65_private_key_from_seed (line 40) | int MLDSA65_private_key_from_seed(struct MLDSA65_private_key *out_privat...
function MLDSA65_public_from_private (line 49) | int MLDSA65_public_from_private(struct MLDSA65_public_key *out_public_key,
function MLDSA65_sign (line 56) | int MLDSA65_sign(uint8_t out_encoded_signature[MLDSA65_SIGNATURE_BYTES],
function MLDSA65_verify (line 69) | int MLDSA65_verify(const struct MLDSA65_public_key *public_key,
function MLDSA65_marshal_public_key (line 81) | int MLDSA65_marshal_public_key(CBB *out,
function MLDSA65_parse_public_key (line 87) | int MLDSA65_parse_public_key(struct MLDSA65_public_key *public_key, CBS ...
FILE: Sources/CNIOBoringSSL/crypto/mlkem/mlkem.cc
function MLKEM768_generate_key (line 36) | void MLKEM768_generate_key(
function MLKEM768_private_key_from_seed (line 45) | int MLKEM768_private_key_from_seed(struct MLKEM768_private_key *out_priv...
function MLKEM768_public_from_private (line 52) | void MLKEM768_public_from_private(
function MLKEM768_encap (line 60) | void MLKEM768_encap(uint8_t out_ciphertext[MLKEM768_CIPHERTEXT_BYTES],
function MLKEM768_decap (line 68) | int MLKEM768_decap(uint8_t out_shared_secret[MLKEM_SHARED_SECRET_BYTES],
function MLKEM768_marshal_public_key (line 76) | int MLKEM768_marshal_public_key(CBB *out,
function MLKEM768_parse_public_key (line 82) | int MLKEM768_parse_public_key(struct MLKEM768_public_key *out_public_key,
function MLKEM1024_generate_key (line 101) | void MLKEM1024_generate_key(
function MLKEM1024_private_key_from_seed (line 110) | int MLKEM1024_private_key_from_seed(
function MLKEM1024_public_from_private (line 118) | void MLKEM1024_public_from_private(
function MLKEM1024_encap (line 126) | void MLKEM1024_encap(uint8_t out_ciphertext[MLKEM1024_CIPHERTEXT_BYTES],
function MLKEM1024_decap (line 134) | int MLKEM1024_decap(uint8_t out_shared_secret[MLKEM_SHARED_SECRET_BYTES],
function MLKEM1024_marshal_public_key (line 142) | int MLKEM1024_marshal_public_key(
function MLKEM1024_parse_public_key (line 148) | int MLKEM1024_parse_public_key(struct MLKEM1024_public_key *out_public_key,
FILE: Sources/CNIOBoringSSL/crypto/obj/obj.cc
function obj_next_nid (line 43) | static int obj_next_nid(void) {
function ASN1_OBJECT (line 50) | ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o) {
function OBJ_cmp (line 110) | int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b) {
function OBJ_length (line 127) | size_t OBJ_length(const ASN1_OBJECT *obj) {
function ASN1_OBJECT (line 135) | static const ASN1_OBJECT *get_builtin_object(int nid) {
function obj_cmp (line 145) | static int obj_cmp(const void *key, const void *element) {
function OBJ_obj2nid (line 151) | int OBJ_obj2nid(const ASN1_OBJECT *obj) {
function OBJ_cbs2nid (line 182) | int OBJ_cbs2nid(const CBS *cbs) {
function short_name_cmp (line 198) | static int short_name_cmp(const void *key, const void *element) {
function OBJ_sn2nid (line 205) | int OBJ_sn2nid(const char *short_name) {
function long_name_cmp (line 233) | static int long_name_cmp(const void *key, const void *element) {
function OBJ_ln2nid (line 240) | int OBJ_ln2nid(const char *long_name) {
function OBJ_txt2nid (line 264) | int OBJ_txt2nid(const char *s) {
function OPENSSL_EXPORT (line 274) | OPENSSL_EXPORT int OBJ_nid2cbb(CBB *out, int nid) {
function ASN1_OBJECT (line 286) | const ASN1_OBJECT *OBJ_get_undef(void) {
function ASN1_OBJECT (line 298) | ASN1_OBJECT *OBJ_nid2obj(int nid) {
function ASN1_OBJECT (line 347) | static ASN1_OBJECT *create_object_with_text_oid(int (*get_nid)(void),
function ASN1_OBJECT (line 368) | ASN1_OBJECT *OBJ_txt2obj(const char *s, int dont_search_names) {
function strlcpy_int (line 383) | static int strlcpy_int(char *dst, const char *src, int dst_size) {
function OBJ_obj2txt (line 392) | int OBJ_obj2txt(char *out, int out_len, const ASN1_OBJECT *obj,
function hash_nid (line 428) | static uint32_t hash_nid(const ASN1_OBJECT *obj) { return obj->nid; }
function cmp_nid (line 430) | static int cmp_nid(const ASN1_OBJECT *a, const ASN1_OBJECT *b) {
function hash_data (line 434) | static uint32_t hash_data(const ASN1_OBJECT *obj) {
function hash_short_name (line 438) | static uint32_t hash_short_name(const ASN1_OBJECT *obj) {
function cmp_short_name (line 442) | static int cmp_short_name(const ASN1_OBJECT *a, const ASN1_OBJECT *b) {
function hash_long_name (line 446) | static uint32_t hash_long_name(const ASN1_OBJECT *obj) {
function cmp_long_name (line 450) | static int cmp_long_name(const ASN1_OBJECT *a, const ASN1_OBJECT *b) {
function obj_add_object (line 456) | static int obj_add_object(ASN1_OBJECT *obj) {
function OBJ_create (line 505) | int OBJ_create(const char *oid, const char *short_name, const char *long...
function OBJ_cleanup (line 514) | void OBJ_cleanup(void) {}
FILE: Sources/CNIOBoringSSL/crypto/obj/obj_xref.cc
function OBJ_find_sigid_algs (line 47) | int OBJ_find_sigid_algs(int sign_nid, int *out_digest_nid, int *out_pkey...
function OBJ_find_sigid_by_algs (line 63) | int OBJ_find_sigid_by_algs(int *out_sign_nid, int digest_nid, int pkey_n...
FILE: Sources/CNIOBoringSSL/crypto/pem/pem_all.cc
function RSA (line 35) | static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa) {
function RSA (line 52) | RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb,
function RSA (line 59) | RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, vo...
function DSA (line 71) | static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa) {
function DSA (line 88) | DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,
function DSA (line 98) | DSA *PEM_r
Copy disabled (too large)
Download .json
Condensed preview — 769 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (15,953K chars).
[
{
"path": ".editorconfig",
"chars": 130,
"preview": "root = true\n\n[*]\nindent_style = space\nindent_size = 4\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitesp"
},
{
"path": ".gitattributes",
"chars": 42,
"preview": "Sources/CNIOBoringSSL/* linguist-vendored\n"
},
{
"path": ".github/release.yml",
"chars": 284,
"preview": "changelog:\n categories:\n - title: SemVer Major\n labels:\n - ⚠️ semver/major\n - title: SemVer Minor\n "
},
{
"path": ".github/workflows/main.yml",
"chars": 3151,
"preview": "name: Main\n\npermissions:\n contents: read\n\non:\n push:\n branches: [main]\n schedule:\n - cron: \"0 8,2"
},
{
"path": ".github/workflows/pull_request.yml",
"chars": 3813,
"preview": "name: PR\n\npermissions:\n contents: read\n\non:\n pull_request:\n types: [opened, reopened, synchronize]\n\njobs:\n "
},
{
"path": ".github/workflows/pull_request_label.yml",
"chars": 510,
"preview": "name: PR label\n\npermissions:\n contents: read\n\non:\n pull_request:\n types: [labeled, unlabeled, opened, reopened, syn"
},
{
"path": ".gitignore",
"chars": 111,
"preview": ".DS_Store\n/.build\n/Packages\n/*.xcodeproj\nPackage.pins\nPackage.resolved\n*.pem\n/docs\nDerivedData\n/.idea\n.swiftpm\n"
},
{
"path": ".licenseignore",
"chars": 766,
"preview": ".gitignore\n**/.gitignore\n.licenseignore\n.gitattributes\n.git-blame-ignore-revs\n.mailfilter\n.mailmap\n.spi.yml\n.swift-forma"
},
{
"path": ".spi.yml",
"chars": 69,
"preview": "version: 1\nbuilder:\n configs:\n - documentation_targets: [NIOSSL]\n"
},
{
"path": ".swift-format",
"chars": 2253,
"preview": "{\n \"version\" : 1,\n \"indentation\" : {\n \"spaces\" : 4\n },\n \"tabWidth\" : 4,\n \"fileScopedDeclarationPrivacy\" : {\n "
},
{
"path": ".unacceptablelanguageignore",
"chars": 35,
"preview": "Sources/CNIOBoringSSL/*\nNOTICE.txt\n"
},
{
"path": "Benchmarks/Benchmarks/NIOSSLBenchmarks/Benchmarks.swift",
"chars": 1546,
"preview": "//===----------------------------------------------------------------------===//\n//\n// This source file is part of the S"
},
{
"path": "Benchmarks/Benchmarks/NIOSSLBenchmarks/ManyWrites.swift",
"chars": 2216,
"preview": "//===----------------------------------------------------------------------===//\n//\n// This source file is part of the S"
},
{
"path": "Benchmarks/Benchmarks/NIOSSLBenchmarks/Shared.swift",
"chars": 2908,
"preview": "//===----------------------------------------------------------------------===//\n//\n// This source file is part of the S"
},
{
"path": "Benchmarks/Benchmarks/NIOSSLBenchmarks/SimpleHandshake.swift",
"chars": 1974,
"preview": "//===----------------------------------------------------------------------===//\n//\n// This source file is part of the S"
},
{
"path": "Benchmarks/Package.swift",
"chars": 961,
"preview": "// swift-tools-version:6.1\n\nimport PackageDescription\n\nlet package = Package(\n name: \"benchmarks\",\n platforms: [\n "
},
{
"path": "Benchmarks/Thresholds/6.1/NIOSSLBenchmarks.ManyWrites.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 201941\n}\n"
},
{
"path": "Benchmarks/Thresholds/6.1/NIOSSLBenchmarks.SimpleHandshake.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 631864\n}\n"
},
{
"path": "Benchmarks/Thresholds/6.2/NIOSSLBenchmarks.ManyWrites.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 201942\n}\n"
},
{
"path": "Benchmarks/Thresholds/6.2/NIOSSLBenchmarks.SimpleHandshake.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 632870\n}\n"
},
{
"path": "Benchmarks/Thresholds/6.3/NIOSSLBenchmarks.ManyWrites.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 201942\n}\n"
},
{
"path": "Benchmarks/Thresholds/6.3/NIOSSLBenchmarks.SimpleHandshake.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 631892\n}\n"
},
{
"path": "Benchmarks/Thresholds/nightly-main/NIOSSLBenchmarks.ManyWrites.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 201942\n}\n"
},
{
"path": "Benchmarks/Thresholds/nightly-main/NIOSSLBenchmarks.SimpleHandshake.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 631873\n}\n"
},
{
"path": "Benchmarks/Thresholds/nightly-next/NIOSSLBenchmarks.ManyWrites.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 201942\n}\n"
},
{
"path": "Benchmarks/Thresholds/nightly-next/NIOSSLBenchmarks.SimpleHandshake.p90.json",
"chars": 33,
"preview": "{\n \"mallocCountTotal\": 631864\n}\n"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 198,
"preview": "# Code of Conduct\n\nThe code of conduct for this project can be found at https://swift.org/code-of-conduct.\n\n<!-- Copyrig"
},
{
"path": "CONTRIBUTING.md",
"chars": 2573,
"preview": "## Legal\n\nBy submitting a pull request, you represent that you have the right to license\nyour contribution to Apple and "
},
{
"path": "CONTRIBUTORS.txt",
"chars": 557,
"preview": "For the purpose of tracking copyright, this is the list of individuals and\norganizations who have contributed source cod"
},
{
"path": "IntegrationTests/plugin_echo.sh",
"chars": 1246,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/plugin_junit_xml.sh",
"chars": 3312,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/run-single-test.sh",
"chars": 1076,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/run-tests.sh",
"chars": 3733,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/test_functions.sh",
"chars": 2011,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/tests_01_general/defines.sh",
"chars": 598,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/tests_01_general/test_01_renegotiation.sh",
"chars": 2300,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "IntegrationTests/tests_01_general/test_02_execstack.sh",
"chars": 1049,
"preview": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is p"
},
{
"path": "LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "NOTICE.txt",
"chars": 1984,
"preview": "\n The SwiftNIO Project\n ====================\n\nPlease visit the Swi"
},
{
"path": "Package.swift",
"chars": 6665,
"preview": "// swift-tools-version:6.1\n//===----------------------------------------------------------------------===//\n//\n// This s"
},
{
"path": "README.md",
"chars": 3066,
"preview": "# SwiftNIO SSL\n\nSwiftNIO SSL is a Swift package that contains an implementation of TLS based on BoringSSL. This package "
},
{
"path": "SECURITY.md",
"chars": 192,
"preview": "# Security\n\nPlease refer to the security guidelines set out in the\n[apple/swift-nio](https://github.com/apple/swift-nio)"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_bitstr.cc",
"chars": 5819,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_bool.cc",
"chars": 1223,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_d2i_fp.cc",
"chars": 1203,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_dup.cc",
"chars": 1019,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_gentm.cc",
"chars": 2926,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_i2d_fp.cc",
"chars": 991,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_int.cc",
"chars": 10940,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_mbstr.cc",
"chars": 6840,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_object.cc",
"chars": 4683,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_octet.cc",
"chars": 826,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_strex.cc",
"chars": 11798,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_strnid.cc",
"chars": 6482,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_time.cc",
"chars": 6263,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_type.cc",
"chars": 4364,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/a_utctm.cc",
"chars": 2819,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/asn1_lib.cc",
"chars": 9635,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/asn1_par.cc",
"chars": 1242,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/asn_pack.cc",
"chars": 1375,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/f_int.cc",
"chars": 1292,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/f_string.cc",
"chars": 1094,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/internal.h",
"chars": 9350,
"preview": "/*\n * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/posix_time.cc",
"chars": 8110,
"preview": "/* Copyright 2022 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/tasn_dec.cc",
"chars": 28129,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/tasn_enc.cc",
"chars": 21587,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/tasn_fre.cc",
"chars": 4336,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/tasn_new.cc",
"chars": 6682,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/tasn_typ.cc",
"chars": 3268,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/asn1/tasn_utl.cc",
"chars": 6175,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/base64/base64.cc",
"chars": 10973,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bcm_support.h",
"chars": 4798,
"preview": "/* Copyright 2024 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/bio.cc",
"chars": 16399,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/bio_mem.cc",
"chars": 6071,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/connect.cc",
"chars": 12837,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/errno.cc",
"chars": 872,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/fd.cc",
"chars": 3888,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/file.cc",
"chars": 7531,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/hexdump.cc",
"chars": 3576,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/internal.h",
"chars": 2311,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/pair.cc",
"chars": 10051,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/printf.cc",
"chars": 1418,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/socket.cc",
"chars": 2884,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bio/socket_helper.cc",
"chars": 3458,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/blake2/blake2.cc",
"chars": 6013,
"preview": "/* Copyright 2021 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bn/bn_asn1.cc",
"chars": 1900,
"preview": "/* Copyright 2015 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bn/convert.cc",
"chars": 8673,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/buf/buf.cc",
"chars": 2568,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/bytestring/asn1_compat.cc",
"chars": 1472,
"preview": "/* Copyright 2016 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bytestring/ber.cc",
"chars": 8030,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bytestring/cbb.cc",
"chars": 19025,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bytestring/cbs.cc",
"chars": 23221,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bytestring/internal.h",
"chars": 3503,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/bytestring/unicode.cc",
"chars": 4308,
"preview": "/* Copyright 2018 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/chacha/chacha.cc",
"chars": 7019,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/chacha/internal.h",
"chars": 3898,
"preview": "/* Copyright 2018 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/derive_key.cc",
"chars": 2298,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_aesctrhmac.cc",
"chars": 9823,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_aesgcmsiv.cc",
"chars": 31399,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_chacha20poly1305.cc",
"chars": 12389,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_des.cc",
"chars": 5521,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_null.cc",
"chars": 1142,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_rc2.cc",
"chars": 12693,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_rc4.cc",
"chars": 1314,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/e_tls.cc",
"chars": 21269,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/get_cipher.cc",
"chars": 2559,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/internal.h",
"chars": 9817,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cipher/tls_cbc.cc",
"chars": 17558,
"preview": "/*\n * Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/conf/conf.cc",
"chars": 14186,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/conf/internal.h",
"chars": 1965,
"preview": "/* Copyright 2015 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_aarch64_apple.cc",
"chars": 3001,
"preview": "/* Copyright 2021 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_aarch64_fuchsia.cc",
"chars": 1935,
"preview": "/* Copyright 2018 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_aarch64_linux.cc",
"chars": 2004,
"preview": "/* Copyright 2016 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_aarch64_openbsd.cc",
"chars": 1928,
"preview": "/* Copyright (c) 2022, Robert Nagy <robert.nagy@gmail.com>\n *\n * Permission to use, copy, modify, and/or distribute this"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_aarch64_sysreg.cc",
"chars": 2998,
"preview": "/* Copyright 2023 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_aarch64_win.cc",
"chars": 1640,
"preview": "/* Copyright 2018 The BoringSSL Authors\n * Copyright (c) 2020, Arm Ltd.\n *\n * Permission to use, copy, modify, and/or di"
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_arm_freebsd.cc",
"chars": 1903,
"preview": "/* Copyright 2022 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_arm_linux.cc",
"chars": 4287,
"preview": "/* Copyright 2016 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_arm_linux.h",
"chars": 5129,
"preview": "/* Copyright 2018 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/cpu_intel.cc",
"chars": 10774,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/crypto.cc",
"chars": 5620,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/curve25519/asm/x25519-asm-arm.S",
"chars": 41842,
"preview": "#define BORINGSSL_PREFIX CNIOBoringSSL\n#if defined(__arm__) && defined(__linux__)\n/* Copyright 2015 The BoringSSL Author"
},
{
"path": "Sources/CNIOBoringSSL/crypto/curve25519/curve25519.cc",
"chars": 58079,
"preview": "/* Copyright 2020 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/curve25519/curve25519_64_adx.cc",
"chars": 894,
"preview": "/* Copyright 2023 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/curve25519/curve25519_tables.h",
"chars": 199489,
"preview": "/* Copyright 2020 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/curve25519/internal.h",
"chars": 5303,
"preview": "/* Copyright 2020 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/curve25519/spake25519.cc",
"chars": 24377,
"preview": "/* Copyright 2016 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/des/des.cc",
"chars": 32171,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/des/internal.h",
"chars": 6115,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/dh/dh_asn1.cc",
"chars": 2619,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/dh/params.cc",
"chars": 18444,
"preview": "/*\n * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/digest/digest_extra.cc",
"chars": 9354,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/dsa/dsa.cc",
"chars": 22872,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/dsa/dsa_asn1.cc",
"chars": 9478,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/dsa/internal.h",
"chars": 1555,
"preview": "/* Copyright 2020 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/ec/ec_asn1.cc",
"chars": 16999,
"preview": "/*\n * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/ec/ec_derive.cc",
"chars": 3853,
"preview": "/* Copyright 2019 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/ec/hash_to_curve.cc",
"chars": 20199,
"preview": "/* Copyright 2020 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/ec/internal.h",
"chars": 3518,
"preview": "/* Copyright 2020 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/ecdh/ecdh.cc",
"chars": 2029,
"preview": "/*\n * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.\n * Copyright (c) 2002, Oracle and/or its aff"
},
{
"path": "Sources/CNIOBoringSSL/crypto/ecdsa/ecdsa_asn1.cc",
"chars": 9581,
"preview": "/*\n * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/engine/engine.cc",
"chars": 3082,
"preview": "/* Copyright 2014 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/err/err.cc",
"chars": 23145,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/err/internal.h",
"chars": 1992,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/evp.cc",
"chars": 10268,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/evp_asn1.cc",
"chars": 11935,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/evp_ctx.cc",
"chars": 11840,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/internal.h",
"chars": 10323,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_dh.cc",
"chars": 3697,
"preview": "/*\n * Copyright 2006-2019 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_dh_asn1.cc",
"chars": 3825,
"preview": "/*\n * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_dsa_asn1.cc",
"chars": 7791,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_ec.cc",
"chars": 6063,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_ec_asn1.cc",
"chars": 8273,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_ed25519.cc",
"chars": 3089,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_ed25519_asn1.cc",
"chars": 6877,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_hkdf.cc",
"chars": 7228,
"preview": "/* Copyright 2022 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_rsa.cc",
"chars": 17192,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_rsa_asn1.cc",
"chars": 5267,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_x25519.cc",
"chars": 3141,
"preview": "/* Copyright 2019 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/p_x25519_asn1.cc",
"chars": 6993,
"preview": "/* Copyright 2019 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/pbkdf.cc",
"chars": 3007,
"preview": "/*\n * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/print.cc",
"chars": 9070,
"preview": "/*\n * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/scrypt.cc",
"chars": 8059,
"preview": "/*\n * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/evp/sign.cc",
"chars": 2759,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/ex_data.cc",
"chars": 4102,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/aes.cc.inc",
"chars": 5897,
"preview": "/*\n * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/aes_nohw.cc.inc",
"chars": 50855,
"preview": "/* Copyright 2019 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/cbc.cc.inc",
"chars": 3196,
"preview": "/*\n * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/cfb.cc.inc",
"chars": 4512,
"preview": "/*\n * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/ctr.cc.inc",
"chars": 2562,
"preview": "/*\n * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/gcm.cc.inc",
"chars": 17821,
"preview": "/*\n * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/gcm_nohw.cc.inc",
"chars": 11169,
"preview": "/* Copyright 2019 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/internal.h",
"chars": 24891,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/key_wrap.cc.inc",
"chars": 5900,
"preview": "/*\n * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/mode_wrappers.cc.inc",
"chars": 2801,
"preview": "/*\n * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/ofb.cc.inc",
"chars": 1176,
"preview": "/*\n * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/aes/polyval.cc.inc",
"chars": 2929,
"preview": "/* Copyright 2016 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bcm.cc",
"chars": 9250,
"preview": "/* Copyright 2017 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bcm_interface.h",
"chars": 31234,
"preview": "/* Copyright 2024 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/add.cc.inc",
"chars": 4716,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc",
"chars": 16425,
"preview": "/*\n * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/bn.cc.inc",
"chars": 8151,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/bytes.cc.inc",
"chars": 5583,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/cmp.cc.inc",
"chars": 3882,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/ctx.cc.inc",
"chars": 4927,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/div.cc.inc",
"chars": 24776,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/div_extra.cc.inc",
"chars": 3209,
"preview": "/* Copyright 2018 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/exponentiation.cc.inc",
"chars": 34475,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/gcd.cc.inc",
"chars": 7520,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/gcd_extra.cc.inc",
"chars": 11923,
"preview": "/* Copyright 2018 The BoringSSL Authors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n "
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/generic.cc.inc",
"chars": 14769,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/internal.h",
"chars": 32909,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n * Copyright (c) 2002, Oracle and/or its aff"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/jacobi.cc.inc",
"chars": 2334,
"preview": "/*\n * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/montgomery.cc.inc",
"chars": 12157,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/montgomery_inv.cc.inc",
"chars": 8966,
"preview": "/* Copyright 2016 Brian Smith.\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/mul.cc.inc",
"chars": 20767,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/prime.cc.inc",
"chars": 32384,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/random.cc.inc",
"chars": 7995,
"preview": "/*\n * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.\n *\n * Licensed under the OpenSSL license (th"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/rsaz_exp.cc.inc",
"chars": 4883,
"preview": "/*\n * Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved.\n * Copyright (c) 2012, Intel Corporation. Al"
},
{
"path": "Sources/CNIOBoringSSL/crypto/fipsmodule/bn/rsaz_exp.h",
"chars": 4339,
"preview": "/*\n * Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved.\n * Copyright (c) 2012, Intel Corporation. Al"
}
]
// ... and 569 more files (download for full content)
About this extraction
This page contains the full source code of the apple/swift-nio-ssl GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 769 files (14.3 MB), approximately 3.8M tokens, and a symbol index with 4966 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.