visaljs 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/cli.js +545 -86
- package/node/include/js_node.h +30 -5
- package/node/include/js_uv.h +36 -0
- package/node/prelude/async_hooks.js +0 -0
- package/node/prelude/buffer.js +0 -0
- package/node/prelude/crypto.js +7 -10
- package/node/prelude/dns.js +99 -0
- package/node/prelude/dns_promises.js +10 -0
- package/node/prelude/events.js +0 -0
- package/node/prelude/fs.js +0 -0
- package/node/prelude/http.js +1039 -195
- package/node/prelude/http2.js +0 -0
- package/node/prelude/internal/crypto/asym.js +39 -12
- package/node/prelude/internal/crypto/cipher.js +0 -0
- package/node/prelude/internal/crypto/dh_groups.js +12 -0
- package/node/prelude/internal/crypto/diffiehellman.js +354 -0
- package/node/prelude/internal/crypto/hash.js +1 -1
- package/node/prelude/internal/crypto/kdf.js +0 -0
- package/node/prelude/internal/crypto/key_type.js +3 -0
- package/node/prelude/internal/crypto/keys.js +39 -9
- package/node/prelude/internal/crypto/random.js +0 -0
- package/node/prelude/internal/crypto/util.js +0 -0
- package/node/prelude/internal/errors.js +0 -0
- package/node/prelude/internal/http_agent.js +249 -0
- package/node/prelude/internal/net.js +33 -0
- package/node/prelude/internal/querystring.js +0 -0
- package/node/prelude/internal/socketaddress.js +249 -0
- package/node/prelude/internal/tls/common.js +306 -0
- package/node/prelude/internal/tls/wrap.js +1220 -0
- package/node/prelude/internal/tls/x509.js +394 -0
- package/node/prelude/module.js +0 -0
- package/node/prelude/net.js +1082 -50
- package/node/prelude/os.js +2 -2
- package/node/prelude/path.js +0 -0
- package/node/prelude/process.js +0 -0
- package/node/prelude/querystring.js +0 -0
- package/node/prelude/stream.js +6 -0
- package/node/prelude/stream_promises.js +0 -0
- package/node/prelude/stream_web.js +0 -0
- package/node/prelude/string_decoder.js +0 -0
- package/node/prelude/tls.js +141 -0
- package/node/prelude/tty.js +0 -0
- package/node/prelude/url.js +0 -0
- package/node/prelude/util.js +5 -2
- package/node/prelude/util_types.js +85 -0
- package/node/prelude/zlib.js +0 -0
- package/node/src/host_fs.c +10 -2
- package/node/src/host_http.c +268 -270
- package/node/src/host_loop.c +84 -0
- package/node/src/host_net.c +495 -0
- package/node/src/host_os.c +0 -0
- package/node/src/host_sys.c +54 -26
- package/node/third_party/libuv/LICENSE +0 -0
- package/node/third_party/libuv/include/uv/aix.h +0 -0
- package/node/third_party/libuv/include/uv/bsd.h +0 -0
- package/node/third_party/libuv/include/uv/darwin.h +0 -0
- package/node/third_party/libuv/include/uv/errno.h +0 -0
- package/node/third_party/libuv/include/uv/linux.h +0 -0
- package/node/third_party/libuv/include/uv/os390.h +0 -0
- package/node/third_party/libuv/include/uv/posix.h +0 -0
- package/node/third_party/libuv/include/uv/sunos.h +0 -0
- package/node/third_party/libuv/include/uv/threadpool.h +0 -0
- package/node/third_party/libuv/include/uv/tree.h +0 -0
- package/node/third_party/libuv/include/uv/unix.h +0 -0
- package/node/third_party/libuv/include/uv/version.h +0 -0
- package/node/third_party/libuv/include/uv/win.h +0 -0
- package/node/third_party/libuv/include/uv.h +0 -0
- package/node/third_party/libuv/src/fs-poll.c +0 -0
- package/node/third_party/libuv/src/heap-inl.h +0 -0
- package/node/third_party/libuv/src/idna.c +0 -0
- package/node/third_party/libuv/src/idna.h +0 -0
- package/node/third_party/libuv/src/inet.c +0 -0
- package/node/third_party/libuv/src/queue.h +0 -0
- package/node/third_party/libuv/src/random.c +0 -0
- package/node/third_party/libuv/src/strscpy.c +0 -0
- package/node/third_party/libuv/src/strscpy.h +0 -0
- package/node/third_party/libuv/src/strtok.c +0 -0
- package/node/third_party/libuv/src/strtok.h +0 -0
- package/node/third_party/libuv/src/thread-common.c +0 -0
- package/node/third_party/libuv/src/threadpool.c +0 -0
- package/node/third_party/libuv/src/timer.c +0 -0
- package/node/third_party/libuv/src/unix/async.c +0 -0
- package/node/third_party/libuv/src/unix/bsd-ifaddrs.c +0 -0
- package/node/third_party/libuv/src/unix/core.c +0 -0
- package/node/third_party/libuv/src/unix/darwin-proctitle.c +0 -0
- package/node/third_party/libuv/src/unix/darwin-stub.h +0 -0
- package/node/third_party/libuv/src/unix/darwin-syscalls.h +0 -0
- package/node/third_party/libuv/src/unix/darwin.c +0 -0
- package/node/third_party/libuv/src/unix/dl.c +0 -0
- package/node/third_party/libuv/src/unix/fs.c +0 -0
- package/node/third_party/libuv/src/unix/fsevents.c +0 -0
- package/node/third_party/libuv/src/unix/getaddrinfo.c +0 -0
- package/node/third_party/libuv/src/unix/getnameinfo.c +0 -0
- package/node/third_party/libuv/src/unix/internal.h +0 -0
- package/node/third_party/libuv/src/unix/kqueue.c +0 -0
- package/node/third_party/libuv/src/unix/linux.c +0 -0
- package/node/third_party/libuv/src/unix/loop-watcher.c +0 -0
- package/node/third_party/libuv/src/unix/loop.c +0 -0
- package/node/third_party/libuv/src/unix/pipe.c +0 -0
- package/node/third_party/libuv/src/unix/poll.c +0 -0
- package/node/third_party/libuv/src/unix/process.c +0 -0
- package/node/third_party/libuv/src/unix/procfs-exepath.c +0 -0
- package/node/third_party/libuv/src/unix/proctitle.c +0 -0
- package/node/third_party/libuv/src/unix/random-devurandom.c +0 -0
- package/node/third_party/libuv/src/unix/random-getentropy.c +0 -0
- package/node/third_party/libuv/src/unix/random-getrandom.c +0 -0
- package/node/third_party/libuv/src/unix/random-sysctl-linux.c +0 -0
- package/node/third_party/libuv/src/unix/signal.c +0 -0
- package/node/third_party/libuv/src/unix/stream.c +0 -0
- package/node/third_party/libuv/src/unix/tcp.c +0 -0
- package/node/third_party/libuv/src/unix/thread.c +0 -0
- package/node/third_party/libuv/src/unix/tty.c +0 -0
- package/node/third_party/libuv/src/unix/udp.c +0 -0
- package/node/third_party/libuv/src/uv-common.c +0 -0
- package/node/third_party/libuv/src/uv-common.h +0 -0
- package/node/third_party/libuv/src/uv-data-getter-setters.c +0 -0
- package/node/third_party/libuv/src/version.c +0 -0
- package/node/third_party/libuv/src/win/async.c +98 -0
- package/node/third_party/libuv/src/win/atomicops-inl.h +61 -0
- package/node/third_party/libuv/src/win/core.c +683 -0
- package/node/third_party/libuv/src/win/detect-wakeup.c +56 -0
- package/node/third_party/libuv/src/win/dl.c +135 -0
- package/node/third_party/libuv/src/win/error.c +183 -0
- package/node/third_party/libuv/src/win/fs-event.c +620 -0
- package/node/third_party/libuv/src/win/fs-fd-hash-inl.h +200 -0
- package/node/third_party/libuv/src/win/fs.c +3774 -0
- package/node/third_party/libuv/src/win/getaddrinfo.c +388 -0
- package/node/third_party/libuv/src/win/getnameinfo.c +146 -0
- package/node/third_party/libuv/src/win/handle-inl.h +180 -0
- package/node/third_party/libuv/src/win/handle.c +162 -0
- package/node/third_party/libuv/src/win/internal.h +335 -0
- package/node/third_party/libuv/src/win/loop-watcher.c +122 -0
- package/node/third_party/libuv/src/win/pipe.c +2725 -0
- package/node/third_party/libuv/src/win/poll.c +586 -0
- package/node/third_party/libuv/src/win/process-stdio.c +419 -0
- package/node/third_party/libuv/src/win/process.c +1407 -0
- package/node/third_party/libuv/src/win/req-inl.h +214 -0
- package/node/third_party/libuv/src/win/signal.c +282 -0
- package/node/third_party/libuv/src/win/snprintf.c +42 -0
- package/node/third_party/libuv/src/win/stream-inl.h +54 -0
- package/node/third_party/libuv/src/win/stream.c +252 -0
- package/node/third_party/libuv/src/win/tcp.c +1674 -0
- package/node/third_party/libuv/src/win/thread.c +568 -0
- package/node/third_party/libuv/src/win/tty.c +2460 -0
- package/node/third_party/libuv/src/win/udp.c +1162 -0
- package/node/third_party/libuv/src/win/util.c +1750 -0
- package/node/third_party/libuv/src/win/winapi.c +144 -0
- package/node/third_party/libuv/src/win/winapi.h +4831 -0
- package/node/third_party/libuv/src/win/winsock.c +575 -0
- package/node/third_party/libuv/src/win/winsock.h +160 -0
- package/node/third_party/llhttp/LICENSE +0 -0
- package/node/third_party/llhttp/api.c +0 -0
- package/node/third_party/llhttp/http.c +0 -0
- package/node/third_party/llhttp/llhttp.c +0 -0
- package/node/third_party/llhttp/llhttp.h +0 -0
- package/package.json +1 -1
- package/runtime/include/js_atoms.gen.h +0 -0
- package/runtime/include/js_atoms.h +0 -0
- package/runtime/include/js_bigint.h +0 -0
- package/runtime/include/js_buffer.h +0 -0
- package/runtime/include/js_builtins.h +16 -0
- package/runtime/include/js_console.h +2 -0
- package/runtime/include/js_convert.h +0 -0
- package/runtime/include/js_core.def +23 -0
- package/runtime/include/js_crypto.h +23 -0
- package/runtime/include/js_error.h +0 -0
- package/runtime/include/js_exception.h +0 -0
- package/runtime/include/js_function.h +0 -0
- package/runtime/include/js_gc.h +0 -0
- package/runtime/include/js_generator.h +2 -3
- package/runtime/include/js_host.h +0 -0
- package/runtime/include/js_jobs.h +0 -0
- package/runtime/include/js_module.h +0 -0
- package/runtime/include/js_object.h +0 -0
- package/runtime/include/js_ops.h +0 -0
- package/runtime/include/js_promise.h +0 -2
- package/runtime/include/js_regexp.h +0 -0
- package/runtime/include/js_runtime.h +0 -0
- package/runtime/include/js_symbol.h +0 -0
- package/runtime/include/js_web.h +0 -0
- package/runtime/include/jscell.h +0 -0
- package/runtime/include/jscontext.h +0 -0
- package/runtime/include/jsnum.h +0 -0
- package/runtime/include/jsstring.h +0 -0
- package/runtime/include/jsvalue.h +0 -0
- package/runtime/src/arguments.c +0 -0
- package/runtime/src/array.c +0 -0
- package/runtime/src/arraybuffer.c +0 -0
- package/runtime/src/async_iter.c +4 -1
- package/runtime/src/atoms.c +0 -0
- package/runtime/src/base64.c +0 -0
- package/runtime/src/bigint.c +0 -0
- package/runtime/src/blob.c +0 -0
- package/runtime/src/boringssl_support.cc +37 -0
- package/runtime/src/buffer.c +0 -0
- package/runtime/src/builtin_table.c +8 -0
- package/runtime/src/builtins.c +0 -0
- package/runtime/src/builtins_util.h +0 -0
- package/runtime/src/collections.c +0 -0
- package/runtime/src/components.c +10 -0
- package/runtime/src/console.c +6 -18
- package/runtime/src/convert.c +0 -0
- package/runtime/src/core_all.c +1 -0
- package/runtime/src/crypto.c +0 -0
- package/runtime/src/crypto_asym.c +450 -241
- package/runtime/src/crypto_bn.c +91 -0
- package/runtime/src/crypto_cipher.c +153 -75
- package/runtime/src/crypto_hash.c +68 -53
- package/runtime/src/crypto_host.c +0 -0
- package/runtime/src/crypto_internal.h +55 -26
- package/runtime/src/crypto_kdf.c +0 -0
- package/runtime/src/crypto_key.c +0 -0
- package/runtime/src/crypto_pkey.c +198 -61
- package/runtime/src/crypto_subtle.c +42 -16
- package/runtime/src/crypto_tls.c +678 -0
- package/runtime/src/date.c +0 -0
- package/runtime/src/domexception.c +0 -0
- package/runtime/src/elements.c +0 -0
- package/runtime/src/elements.h +0 -0
- package/runtime/src/encoding.c +0 -0
- package/runtime/src/error.c +0 -0
- package/runtime/src/events.c +0 -0
- package/runtime/src/exception.c +0 -0
- package/runtime/src/fetch.c +0 -0
- package/runtime/src/function.c +0 -0
- package/runtime/src/gc.c +0 -0
- package/runtime/src/generator.c +8 -1
- package/runtime/src/global.c +2 -4
- package/runtime/src/headers.c +0 -0
- package/runtime/src/inspect.c +0 -0
- package/runtime/src/internal.h +0 -1
- package/runtime/src/iterate.c +0 -0
- package/runtime/src/iterator.c +0 -0
- package/runtime/src/jobs.c +2 -1
- package/runtime/src/jsnum.c +0 -0
- package/runtime/src/json.c +0 -0
- package/runtime/src/math.c +0 -0
- package/runtime/src/module.c +0 -0
- package/runtime/src/number.c +0 -0
- package/runtime/src/object.c +0 -0
- package/runtime/src/ops.c +0 -0
- package/runtime/src/os.c +0 -0
- package/runtime/src/os.h +0 -0
- package/runtime/src/process.c +7 -0
- package/runtime/src/promise.c +4 -1
- package/runtime/src/proxy.c +0 -0
- package/runtime/src/reflect.c +0 -0
- package/runtime/src/regexp.c +0 -0
- package/runtime/src/regexp_anchor.h +0 -0
- package/runtime/src/regexp_message.h +0 -0
- package/runtime/src/shape.c +0 -0
- package/runtime/src/shape.h +0 -0
- package/runtime/src/streams.c +0 -0
- package/runtime/src/streams.h +0 -0
- package/runtime/src/string.c +0 -0
- package/runtime/src/string_builtins.c +0 -0
- package/runtime/src/symbol.c +0 -0
- package/runtime/src/test_host.c +0 -0
- package/runtime/src/tls_roots.gen.h +3215 -0
- package/runtime/src/typedarray.c +0 -0
- package/runtime/src/tznames.gen.h +0 -0
- package/runtime/src/uri.c +0 -0
- package/runtime/src/url.c +0 -0
- package/runtime/src/util_types.c +52 -0
- package/runtime/src/weak.c +2 -1
- package/runtime/src/web.c +0 -0
- package/runtime/src/wrapper.c +0 -0
- package/runtime/src/writable.c +0 -0
- package/runtime/third_party/ada-idna/LICENSE-MIT +0 -0
- package/runtime/third_party/ada-idna/README.md +0 -0
- package/runtime/third_party/ada-idna/convert.mjs +0 -0
- package/runtime/third_party/ada-idna/idna.c +0 -0
- package/runtime/third_party/ada-idna/idna.h +0 -0
- package/runtime/third_party/ada-idna/idna_tables.h +0 -0
- package/runtime/third_party/boringssl/LICENSE +238 -0
- package/runtime/third_party/boringssl/README.md +46 -0
- package/runtime/third_party/boringssl/VERSION +1 -0
- package/runtime/third_party/boringssl/crypto/aes/aes.cc +44 -0
- package/runtime/third_party/boringssl/crypto/armv8_feature_parsing.h +67 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_bitstr.cc +297 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_bool.cc +50 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_d2i_fp.cc +47 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_dup.cc +42 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_gentm.cc +130 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_i2d_fp.cc +44 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_int.cc +467 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_mbstr.cc +242 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_object.cc +191 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_octet.cc +32 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_strex.cc +411 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_strnid.cc +208 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_time.cc +248 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_type.cc +467 -0
- package/runtime/third_party/boringssl/crypto/asn1/a_utctm.cc +128 -0
- package/runtime/third_party/boringssl/crypto/asn1/asn1_lib.cc +453 -0
- package/runtime/third_party/boringssl/crypto/asn1/asn1_par.cc +61 -0
- package/runtime/third_party/boringssl/crypto/asn1/asn_pack.cc +56 -0
- package/runtime/third_party/boringssl/crypto/asn1/f_int.cc +63 -0
- package/runtime/third_party/boringssl/crypto/asn1/f_string.cc +52 -0
- package/runtime/third_party/boringssl/crypto/asn1/internal.h +430 -0
- package/runtime/third_party/boringssl/crypto/asn1/posix_time.cc +244 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_dec.cc +611 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_enc.cc +348 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_fre.cc +163 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_new.cc +274 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_typ.cc +92 -0
- package/runtime/third_party/boringssl/crypto/asn1/tasn_utl.cc +218 -0
- package/runtime/third_party/boringssl/crypto/base64/base64.cc +433 -0
- package/runtime/third_party/boringssl/crypto/bcm_support.h +62 -0
- package/runtime/third_party/boringssl/crypto/bio/bio.cc +715 -0
- package/runtime/third_party/boringssl/crypto/bio/bio_mem.cc +260 -0
- package/runtime/third_party/boringssl/crypto/bio/connect.cc +463 -0
- package/runtime/third_party/boringssl/crypto/bio/errno.cc +52 -0
- package/runtime/third_party/boringssl/crypto/bio/fd.cc +193 -0
- package/runtime/third_party/boringssl/crypto/bio/file.cc +283 -0
- package/runtime/third_party/boringssl/crypto/bio/hexdump.cc +154 -0
- package/runtime/third_party/boringssl/crypto/bio/internal.h +128 -0
- package/runtime/third_party/boringssl/crypto/bio/pair.cc +426 -0
- package/runtime/third_party/boringssl/crypto/bio/printf.cc +59 -0
- package/runtime/third_party/boringssl/crypto/bio/socket.cc +210 -0
- package/runtime/third_party/boringssl/crypto/bio/socket_helper.cc +179 -0
- package/runtime/third_party/boringssl/crypto/blake2/blake2.cc +173 -0
- package/runtime/third_party/boringssl/crypto/bn/bn_asn1.cc +57 -0
- package/runtime/third_party/boringssl/crypto/bn/convert.cc +409 -0
- package/runtime/third_party/boringssl/crypto/bn/div.cc +102 -0
- package/runtime/third_party/boringssl/crypto/bn/exponentiation.cc +168 -0
- package/runtime/third_party/boringssl/crypto/bn/sqrt.cc +93 -0
- package/runtime/third_party/boringssl/crypto/buf/buf.cc +119 -0
- package/runtime/third_party/boringssl/crypto/bytestring/asn1_compat.cc +54 -0
- package/runtime/third_party/boringssl/crypto/bytestring/ber.cc +268 -0
- package/runtime/third_party/boringssl/crypto/bytestring/cbb.cc +787 -0
- package/runtime/third_party/boringssl/crypto/bytestring/cbs.cc +977 -0
- package/runtime/third_party/boringssl/crypto/bytestring/internal.h +134 -0
- package/runtime/third_party/boringssl/crypto/bytestring/unicode.cc +156 -0
- package/runtime/third_party/boringssl/crypto/chacha/chacha.cc +226 -0
- package/runtime/third_party/boringssl/crypto/chacha/internal.h +103 -0
- package/runtime/third_party/boringssl/crypto/cipher/derive_key.cc +106 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_aesctrhmac.cc +294 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_aeseax.cc +351 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_aesgcmsiv.cc +918 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_chacha20poly1305.cc +404 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_des.cc +214 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_null.cc +55 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_rc2.cc +432 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_rc4.cc +56 -0
- package/runtime/third_party/boringssl/crypto/cipher/e_tls.cc +615 -0
- package/runtime/third_party/boringssl/crypto/cipher/get_cipher.cc +85 -0
- package/runtime/third_party/boringssl/crypto/cipher/internal.h +399 -0
- package/runtime/third_party/boringssl/crypto/cipher/tls_cbc.cc +476 -0
- package/runtime/third_party/boringssl/crypto/cms/cms.cc +178 -0
- package/runtime/third_party/boringssl/crypto/conf/conf.cc +637 -0
- package/runtime/third_party/boringssl/crypto/conf/internal.h +54 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_apple.cc +76 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_fuchsia.cc +58 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_linux.cc +66 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_openbsd.cc +45 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_sysreg.cc +66 -0
- package/runtime/third_party/boringssl/crypto/cpu_aarch64_win.cc +52 -0
- package/runtime/third_party/boringssl/crypto/cpu_arm_freebsd.cc +55 -0
- package/runtime/third_party/boringssl/crypto/cpu_arm_linux.cc +173 -0
- package/runtime/third_party/boringssl/crypto/cpu_arm_linux.h +141 -0
- package/runtime/third_party/boringssl/crypto/cpu_intel.cc +287 -0
- package/runtime/third_party/boringssl/crypto/crypto.cc +152 -0
- package/runtime/third_party/boringssl/crypto/curve25519/asm/x25519-asm-arm.S +2124 -0
- package/runtime/third_party/boringssl/crypto/curve25519/cpace.cc +227 -0
- package/runtime/third_party/boringssl/crypto/curve25519/curve25519.cc +2436 -0
- package/runtime/third_party/boringssl/crypto/curve25519/curve25519_64_adx.cc +18 -0
- package/runtime/third_party/boringssl/crypto/curve25519/curve25519_tables.h +3264 -0
- package/runtime/third_party/boringssl/crypto/curve25519/internal.h +202 -0
- package/runtime/third_party/boringssl/crypto/curve25519/spake25519.cc +532 -0
- package/runtime/third_party/boringssl/crypto/des/des.cc +837 -0
- package/runtime/third_party/boringssl/crypto/des/internal.h +144 -0
- package/runtime/third_party/boringssl/crypto/dh/dh_asn1.cc +109 -0
- package/runtime/third_party/boringssl/crypto/dh/params.cc +411 -0
- package/runtime/third_party/boringssl/crypto/digest/digest_extra.cc +361 -0
- package/runtime/third_party/boringssl/crypto/dsa/dsa.cc +922 -0
- package/runtime/third_party/boringssl/crypto/dsa/dsa_asn1.cc +306 -0
- package/runtime/third_party/boringssl/crypto/dsa/internal.h +56 -0
- package/runtime/third_party/boringssl/crypto/ec/ec_asn1.cc +542 -0
- package/runtime/third_party/boringssl/crypto/ec/ec_derive.cc +94 -0
- package/runtime/third_party/boringssl/crypto/ec/hash_to_curve.cc +773 -0
- package/runtime/third_party/boringssl/crypto/ec/internal.h +114 -0
- package/runtime/third_party/boringssl/crypto/ecdh/ecdh.cc +75 -0
- package/runtime/third_party/boringssl/crypto/ecdsa/ecdsa_asn1.cc +337 -0
- package/runtime/third_party/boringssl/crypto/ecdsa/ecdsa_p1363.cc +54 -0
- package/runtime/third_party/boringssl/crypto/engine/engine.cc +95 -0
- package/runtime/third_party/boringssl/crypto/err/err.cc +820 -0
- package/runtime/third_party/boringssl/crypto/err/internal.h +45 -0
- package/runtime/third_party/boringssl/crypto/evp/evp.cc +454 -0
- package/runtime/third_party/boringssl/crypto/evp/evp_asn1.cc +439 -0
- package/runtime/third_party/boringssl/crypto/evp/evp_ctx.cc +541 -0
- package/runtime/third_party/boringssl/crypto/evp/evp_kem.cc +101 -0
- package/runtime/third_party/boringssl/crypto/evp/internal.h +427 -0
- package/runtime/third_party/boringssl/crypto/evp/p_dh.cc +326 -0
- package/runtime/third_party/boringssl/crypto/evp/p_dsa.cc +333 -0
- package/runtime/third_party/boringssl/crypto/evp/p_ec.cc +736 -0
- package/runtime/third_party/boringssl/crypto/evp/p_ed25519.cc +359 -0
- package/runtime/third_party/boringssl/crypto/evp/p_hkdf.cc +204 -0
- package/runtime/third_party/boringssl/crypto/evp/p_mldsa.cc +549 -0
- package/runtime/third_party/boringssl/crypto/evp/p_mlkem.cc +510 -0
- package/runtime/third_party/boringssl/crypto/evp/p_rsa.cc +1185 -0
- package/runtime/third_party/boringssl/crypto/evp/p_x25519.cc +371 -0
- package/runtime/third_party/boringssl/crypto/evp/p_xwing.cc +300 -0
- package/runtime/third_party/boringssl/crypto/evp/pbkdf.cc +105 -0
- package/runtime/third_party/boringssl/crypto/evp/print.cc +287 -0
- package/runtime/third_party/boringssl/crypto/evp/scrypt.cc +218 -0
- package/runtime/third_party/boringssl/crypto/evp/sign.cc +95 -0
- package/runtime/third_party/boringssl/crypto/ex_data.cc +140 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/aes.cc.inc +208 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/aes_nohw.cc.inc +1279 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/cbc.cc.inc +132 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/cfb.cc.inc +168 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/ctr.cc.inc +102 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/gcm.cc.inc +614 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/gcm_nohw.cc.inc +304 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/internal.h +590 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/key_wrap.cc.inc +211 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/mode_wrappers.cc.inc +97 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/aes/ofb.cc.inc +55 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bcm.cc +288 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bcm_interface.h +953 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/add.cc.inc +276 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +573 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/bn.cc.inc +377 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/bytes.cc.inc +230 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/cmp.cc.inc +161 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/ctx.cc.inc +127 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/div.cc.inc +738 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/div_extra.cc.inc +90 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/exponentiation.cc.inc +743 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/gcd.cc.inc +281 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/gcd_extra.cc.inc +327 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/generic.cc.inc +579 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/internal.h +810 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/jacobi.cc.inc +101 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/montgomery.cc.inc +408 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/montgomery_inv.cc.inc +179 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/mul.cc.inc +347 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/prime.cc.inc +931 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/random.cc.inc +261 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.cc.inc +144 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.h +109 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/shift.cc.inc +317 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/bn/sqrt.cc.inc +370 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/aead.cc.inc +619 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/cipher.cc.inc +837 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/e_aes.cc.inc +1240 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/e_aesccm.cc.inc +440 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cipher/internal.h +461 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/cmac/cmac.cc.inc +293 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/delocate.h +95 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/dh/check.cc.inc +198 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/dh/dh.cc.inc +401 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/dh/internal.h +63 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/digest.cc.inc +221 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/digests.cc.inc +184 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/internal.h +72 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digest/md32_common.h +166 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/digestsign/digestsign.cc.inc +230 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/builtin_curves.h +277 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/ec.cc.inc +1024 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/ec_key.cc.inc +536 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/ec_montgomery.cc.inc +379 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/felem.cc.inc +250 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/internal.h +752 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/oct.cc.inc +174 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256-nistz-table.h +9502 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256-nistz.cc.inc +740 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256-nistz.h +207 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256.cc.inc +578 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/p256_table.h +297 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/scalar.cc.inc +184 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/simple.cc.inc +246 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/simple_mul.cc.inc +274 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/util.cc.inc +258 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ec/wnaf.cc.inc +224 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ecdh/ecdh.cc.inc +91 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +288 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/ecdsa/internal.h +57 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/entropy/internal.h +38 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/entropy/jitter.cc.inc +487 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/entropy/sha512.cc.inc +329 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/fips_shared_support.cc +28 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/hkdf/hkdf.cc.inc +114 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/hmac/hmac.cc.inc +218 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/keccak/internal.h +165 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/keccak/keccak.cc.inc +647 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mldsa/fips_known_values.inc +1345 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mldsa/mldsa.cc.inc +3323 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mlkem/fips_known_values.inc +411 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/mlkem/mlkem.cc.inc +1856 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/android_entropy_client.cc.inc +82 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/ctrdrbg.cc.inc +401 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/internal.h +99 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rand/rand.cc.inc +486 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/internal.h +167 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/padding.cc.inc +371 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/rsa.cc.inc +996 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/rsa/rsa_impl.cc.inc +1000 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/self_check/fips.cc.inc +129 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/self_check/self_check.cc.inc +1093 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/service_indicator/internal.h +112 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/service_indicator/service_indicator.cc.inc +330 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/internal.h +205 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/sha1.cc.inc +404 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/sha256.cc.inc +315 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/sha/sha512.cc.inc +473 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/address.h +144 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/fips_known_values.inc +674 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/fors.cc.inc +179 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/fors.h +48 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/merkle.cc.inc +164 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/merkle.h +58 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/params.h +178 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/slhdsa.cc.inc +690 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/thash.cc.inc +326 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/thash.h +71 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/wots.cc.inc +172 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/slhdsa/wots.h +40 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/tls/internal.h +33 -0
- package/runtime/third_party/boringssl/crypto/fipsmodule/tls/kdf.cc.inc +180 -0
- package/runtime/third_party/boringssl/crypto/fuzzer_mode.cc +30 -0
- package/runtime/third_party/boringssl/crypto/hpke/hpke.cc +1514 -0
- package/runtime/third_party/boringssl/crypto/hrss/asm/poly_rq_mul.S +8489 -0
- package/runtime/third_party/boringssl/crypto/hrss/hrss.cc +2189 -0
- package/runtime/third_party/boringssl/crypto/hrss/internal.h +64 -0
- package/runtime/third_party/boringssl/crypto/internal.h +1767 -0
- package/runtime/third_party/boringssl/crypto/lhash/internal.h +222 -0
- package/runtime/third_party/boringssl/crypto/lhash/lhash.cc +312 -0
- package/runtime/third_party/boringssl/crypto/md4/md4.cc +207 -0
- package/runtime/third_party/boringssl/crypto/md5/internal.h +34 -0
- package/runtime/third_party/boringssl/crypto/md5/md5.cc +255 -0
- package/runtime/third_party/boringssl/crypto/mem.cc +577 -0
- package/runtime/third_party/boringssl/crypto/mem_internal.h +706 -0
- package/runtime/third_party/boringssl/crypto/mldsa/mldsa.cc +296 -0
- package/runtime/third_party/boringssl/crypto/mlkem/mlkem.cc +108 -0
- package/runtime/third_party/boringssl/crypto/obj/obj.cc +494 -0
- package/runtime/third_party/boringssl/crypto/obj/obj_dat.h +11722 -0
- package/runtime/third_party/boringssl/crypto/obj/obj_xref.cc +83 -0
- package/runtime/third_party/boringssl/crypto/params_internal.h +30 -0
- package/runtime/third_party/boringssl/crypto/pem/internal.h +135 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_all.cc +153 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_info.cc +250 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_lib.cc +707 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_oth.cc +45 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_pk8.cc +211 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_pkey.cc +147 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_x509.cc +25 -0
- package/runtime/third_party/boringssl/crypto/pem/pem_xaux.cc +25 -0
- package/runtime/third_party/boringssl/crypto/pkcs7/internal.h +67 -0
- package/runtime/third_party/boringssl/crypto/pkcs7/pkcs7.cc +198 -0
- package/runtime/third_party/boringssl/crypto/pkcs7/pkcs7_x509.cc +527 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/internal.h +98 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/p5_pbev2.cc +286 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/pkcs8.cc +473 -0
- package/runtime/third_party/boringssl/crypto/pkcs8/pkcs8_x509.cc +1328 -0
- package/runtime/third_party/boringssl/crypto/poly1305/internal.h +54 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305.cc +315 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305_arm.cc +294 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305_arm_asm.S +2017 -0
- package/runtime/third_party/boringssl/crypto/poly1305/poly1305_vec.cc +853 -0
- package/runtime/third_party/boringssl/crypto/pool/internal.h +95 -0
- package/runtime/third_party/boringssl/crypto/pool/pool.cc +282 -0
- package/runtime/third_party/boringssl/crypto/rand/deterministic.cc +58 -0
- package/runtime/third_party/boringssl/crypto/rand/fork_detect.cc +222 -0
- package/runtime/third_party/boringssl/crypto/rand/forkunsafe.cc +44 -0
- package/runtime/third_party/boringssl/crypto/rand/getentropy.cc +53 -0
- package/runtime/third_party/boringssl/crypto/rand/internal.h +67 -0
- package/runtime/third_party/boringssl/crypto/rand/ios.cc +35 -0
- package/runtime/third_party/boringssl/crypto/rand/rand.cc +79 -0
- package/runtime/third_party/boringssl/crypto/rand/trusty.cc +39 -0
- package/runtime/third_party/boringssl/crypto/rand/urandom.cc +149 -0
- package/runtime/third_party/boringssl/crypto/rand/windows.cc +91 -0
- package/runtime/third_party/boringssl/crypto/rc4/rc4.cc +56 -0
- package/runtime/third_party/boringssl/crypto/refcount.cc +49 -0
- package/runtime/third_party/boringssl/crypto/rsa/internal.h +51 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_asn1.cc +404 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_crypt.cc +530 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_extra.cc +30 -0
- package/runtime/third_party/boringssl/crypto/rsa/rsa_print.cc +25 -0
- package/runtime/third_party/boringssl/crypto/sha/sha1.cc +55 -0
- package/runtime/third_party/boringssl/crypto/sha/sha256.cc +89 -0
- package/runtime/third_party/boringssl/crypto/sha/sha512.cc +106 -0
- package/runtime/third_party/boringssl/crypto/siphash/siphash.cc +81 -0
- package/runtime/third_party/boringssl/crypto/slhdsa/slhdsa.cc +167 -0
- package/runtime/third_party/boringssl/crypto/spake2plus/internal.h +204 -0
- package/runtime/third_party/boringssl/crypto/spake2plus/spake2plus.cc +501 -0
- package/runtime/third_party/boringssl/crypto/stack/stack.cc +462 -0
- package/runtime/third_party/boringssl/crypto/thread.cc +68 -0
- package/runtime/third_party/boringssl/crypto/thread_none.cc +48 -0
- package/runtime/third_party/boringssl/crypto/thread_pthread.cc +138 -0
- package/runtime/third_party/boringssl/crypto/thread_win.cc +227 -0
- package/runtime/third_party/boringssl/crypto/trust_token/internal.h +405 -0
- package/runtime/third_party/boringssl/crypto/trust_token/pmbtoken.cc +1672 -0
- package/runtime/third_party/boringssl/crypto/trust_token/trust_token.cc +701 -0
- package/runtime/third_party/boringssl/crypto/trust_token/voprf.cc +1266 -0
- package/runtime/third_party/boringssl/crypto/x509/a_digest.cc +52 -0
- package/runtime/third_party/boringssl/crypto/x509/a_sign.cc +100 -0
- package/runtime/third_party/boringssl/crypto/x509/a_verify.cc +77 -0
- package/runtime/third_party/boringssl/crypto/x509/algorithm.cc +167 -0
- package/runtime/third_party/boringssl/crypto/x509/asn1_gen.cc +540 -0
- package/runtime/third_party/boringssl/crypto/x509/by_dir.cc +301 -0
- package/runtime/third_party/boringssl/crypto/x509/by_file.cc +226 -0
- package/runtime/third_party/boringssl/crypto/x509/i2d_pr.cc +37 -0
- package/runtime/third_party/boringssl/crypto/x509/internal.h +697 -0
- package/runtime/third_party/boringssl/crypto/x509/name_print.cc +187 -0
- package/runtime/third_party/boringssl/crypto/x509/policy.cc +686 -0
- package/runtime/third_party/boringssl/crypto/x509/rsa_pss.cc +187 -0
- package/runtime/third_party/boringssl/crypto/x509/t_crl.cc +106 -0
- package/runtime/third_party/boringssl/crypto/x509/t_req.cc +206 -0
- package/runtime/third_party/boringssl/crypto/x509/t_x509.cc +292 -0
- package/runtime/third_party/boringssl/crypto/x509/t_x509a.cc +81 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_akey.cc +174 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_akeya.cc +31 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_alt.cc +636 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_bcons.cc +96 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_bitst.cc +100 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_conf.cc +369 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_cpols.cc +417 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_crld.cc +471 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_enum.cc +74 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_extku.cc +97 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_genn.cc +238 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_ia5.cc +83 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_info.cc +162 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_int.cc +83 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_lib.cc +349 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_ncons.cc +798 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_ocsp.cc +92 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_pcons.cc +102 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_pmaps.cc +110 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_prn.cc +183 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_purp.cc +580 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_skey.cc +128 -0
- package/runtime/third_party/boringssl/crypto/x509/v3_utl.cc +1311 -0
- package/runtime/third_party/boringssl/crypto/x509/x509.cc +47 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_att.cc +188 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_cmp.cc +243 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_d2.cc +66 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_def.cc +42 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_ext.cc +161 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_lu.cc +570 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_mtc.cc +598 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_obj.cc +169 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_req.cc +248 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_set.cc +166 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_trs.cc +123 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_txt.cc +147 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_v3.cc +249 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_vfy.cc +1531 -0
- package/runtime/third_party/boringssl/crypto/x509/x509_vpm.cc +449 -0
- package/runtime/third_party/boringssl/crypto/x509/x509cset.cc +222 -0
- package/runtime/third_party/boringssl/crypto/x509/x509name.cc +377 -0
- package/runtime/third_party/boringssl/crypto/x509/x509rset.cc +55 -0
- package/runtime/third_party/boringssl/crypto/x509/x509spki.cc +91 -0
- package/runtime/third_party/boringssl/crypto/x509/x_algor.cc +223 -0
- package/runtime/third_party/boringssl/crypto/x509/x_all.cc +352 -0
- package/runtime/third_party/boringssl/crypto/x509/x_attrib.cc +61 -0
- package/runtime/third_party/boringssl/crypto/x509/x_crl.cc +325 -0
- package/runtime/third_party/boringssl/crypto/x509/x_exten.cc +42 -0
- package/runtime/third_party/boringssl/crypto/x509/x_name.cc +407 -0
- package/runtime/third_party/boringssl/crypto/x509/x_pubkey.cc +199 -0
- package/runtime/third_party/boringssl/crypto/x509/x_req.cc +80 -0
- package/runtime/third_party/boringssl/crypto/x509/x_sig.cc +51 -0
- package/runtime/third_party/boringssl/crypto/x509/x_spki.cc +44 -0
- package/runtime/third_party/boringssl/crypto/x509/x_x509.cc +495 -0
- package/runtime/third_party/boringssl/crypto/x509/x_x509a.cc +169 -0
- package/runtime/third_party/boringssl/crypto/xwing/xwing.cc +257 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx2-x86_64-apple.S +1326 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx2-x86_64-linux.S +1327 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx512-x86_64-apple.S +1252 -0
- package/runtime/third_party/boringssl/gen/bcm/aes-gcm-avx512-x86_64-linux.S +1253 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-gcm-x86_64-apple.S +873 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-gcm-x86_64-linux.S +885 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86-apple.S +2490 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86-linux.S +2530 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86_64-apple.S +2413 -0
- package/runtime/third_party/boringssl/gen/bcm/aesni-x86_64-linux.S +2397 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv7-linux.S +784 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv8-apple.S +792 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv8-linux.S +786 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-armv8-win.S +798 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-gcm-armv8-apple.S +2912 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-gcm-armv8-linux.S +2907 -0
- package/runtime/third_party/boringssl/gen/bcm/aesv8-gcm-armv8-win.S +2915 -0
- package/runtime/third_party/boringssl/gen/bcm/armv4-mont-linux.S +932 -0
- package/runtime/third_party/boringssl/gen/bcm/armv8-mont-apple.S +1440 -0
- package/runtime/third_party/boringssl/gen/bcm/armv8-mont-linux.S +1440 -0
- package/runtime/third_party/boringssl/gen/bcm/armv8-mont-win.S +1446 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-586-apple.S +530 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-586-linux.S +540 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-armv8-apple.S +88 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-armv8-linux.S +87 -0
- package/runtime/third_party/boringssl/gen/bcm/bn-armv8-win.S +87 -0
- package/runtime/third_party/boringssl/gen/bcm/bsaes-armv7-linux.S +1520 -0
- package/runtime/third_party/boringssl/gen/bcm/co-586-apple.S +1256 -0
- package/runtime/third_party/boringssl/gen/bcm/co-586-linux.S +1264 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-armv4-linux.S +242 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-neon-armv8-apple.S +337 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-neon-armv8-linux.S +335 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-neon-armv8-win.S +341 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86-apple.S +288 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86-linux.S +292 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86_64-apple.S +426 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-ssse3-x86_64-linux.S +425 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86-apple.S +322 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86-linux.S +328 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86_64-apple.S +1134 -0
- package/runtime/third_party/boringssl/gen/bcm/ghash-x86_64-linux.S +1129 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv7-linux.S +244 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv8-apple.S +567 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv8-linux.S +563 -0
- package/runtime/third_party/boringssl/gen/bcm/ghashv8-armv8-win.S +571 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-armv8-asm-apple.S +1744 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-armv8-asm-linux.S +1725 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-armv8-asm-win.S +1765 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-x86_64-asm-apple.S +4544 -0
- package/runtime/third_party/boringssl/gen/bcm/p256-x86_64-asm-linux.S +4600 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-armv8-asm-apple.S +310 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-armv8-asm-linux.S +310 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-armv8-asm-win.S +310 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-x86_64-asm-apple.S +321 -0
- package/runtime/third_party/boringssl/gen/bcm/p256_beeu-x86_64-asm-linux.S +335 -0
- package/runtime/third_party/boringssl/gen/bcm/rdrand-x86_64-apple.S +58 -0
- package/runtime/third_party/boringssl/gen/bcm/rdrand-x86_64-linux.S +57 -0
- package/runtime/third_party/boringssl/gen/bcm/rsaz-avx2-apple.S +1756 -0
- package/runtime/third_party/boringssl/gen/bcm/rsaz-avx2-linux.S +1751 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-586-apple.S +3782 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-586-linux.S +3788 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv4-large-linux.S +1479 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv8-apple.S +1219 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv8-linux.S +1218 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-armv8-win.S +1222 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-x86_64-apple.S +5454 -0
- package/runtime/third_party/boringssl/gen/bcm/sha1-x86_64-linux.S +5450 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-586-apple.S +5593 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-586-linux.S +5599 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv4-linux.S +2840 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv8-apple.S +1195 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv8-linux.S +1194 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-armv8-win.S +1198 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-x86_64-apple.S +4173 -0
- package/runtime/third_party/boringssl/gen/bcm/sha256-x86_64-linux.S +4170 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-586-apple.S +2406 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-586-linux.S +2410 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv4-linux.S +1857 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv8-apple.S +1598 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv8-linux.S +1597 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-armv8-win.S +1601 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-x86_64-apple.S +2979 -0
- package/runtime/third_party/boringssl/gen/bcm/sha512-x86_64-linux.S +2978 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv7-linux.S +1225 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv8-apple.S +1238 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv8-linux.S +1220 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-armv8-win.S +1256 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86-apple.S +680 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86-linux.S +706 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86_64-apple.S +1146 -0
- package/runtime/third_party/boringssl/gen/bcm/vpaes-x86_64-linux.S +1133 -0
- package/runtime/third_party/boringssl/gen/bcm/x86-mont-apple.S +216 -0
- package/runtime/third_party/boringssl/gen/bcm/x86-mont-linux.S +218 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont-apple.S +1238 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont-linux.S +1237 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont5-apple.S +3644 -0
- package/runtime/third_party/boringssl/gen/bcm/x86_64-mont5-linux.S +3628 -0
- package/runtime/third_party/boringssl/gen/boringssl_prefix_symbols_internal_x86_64_win_asm.inc +325 -0
- package/runtime/third_party/boringssl/gen/boringssl_prefix_symbols_internal_x86_win_asm.inc +325 -0
- package/runtime/third_party/boringssl/gen/crypto/aes128gcmsiv-x86_64-apple.S +3113 -0
- package/runtime/third_party/boringssl/gen/crypto/aes128gcmsiv-x86_64-linux.S +3091 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv4-linux.S +1450 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv8-apple.S +1969 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv8-linux.S +1967 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-armv8-win.S +1973 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86-apple.S +957 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86-linux.S +961 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86_64-apple.S +1608 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha-x86_64-linux.S +1611 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_armv8-apple.S +3010 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_armv8-linux.S +3008 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_armv8-win.S +3014 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_x86_64-apple.S +8903 -0
- package/runtime/third_party/boringssl/gen/crypto/chacha20_poly1305_x86_64-linux.S +8940 -0
- package/runtime/third_party/boringssl/gen/crypto/err_data.cc +1578 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-586-apple.S +684 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-586-linux.S +686 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-x86_64-apple.S +690 -0
- package/runtime/third_party/boringssl/gen/crypto/md5-x86_64-linux.S +695 -0
- package/runtime/third_party/boringssl/include/openssl/aead.h +650 -0
- package/runtime/third_party/boringssl/include/openssl/aes.h +173 -0
- package/runtime/third_party/boringssl/include/openssl/arm_arch.h +24 -0
- package/runtime/third_party/boringssl/include/openssl/asm_base.h +219 -0
- package/runtime/third_party/boringssl/include/openssl/asn1.h +2002 -0
- package/runtime/third_party/boringssl/include/openssl/asn1_mac.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/asn1t.h +584 -0
- package/runtime/third_party/boringssl/include/openssl/base.h +548 -0
- package/runtime/third_party/boringssl/include/openssl/base64.h +156 -0
- package/runtime/third_party/boringssl/include/openssl/bio.h +1061 -0
- package/runtime/third_party/boringssl/include/openssl/blake2.h +63 -0
- package/runtime/third_party/boringssl/include/openssl/blowfish.h +58 -0
- package/runtime/third_party/boringssl/include/openssl/bn.h +986 -0
- package/runtime/third_party/boringssl/include/openssl/buf.h +95 -0
- package/runtime/third_party/boringssl/include/openssl/buffer.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/bytestring.h +798 -0
- package/runtime/third_party/boringssl/include/openssl/cast.h +91 -0
- package/runtime/third_party/boringssl/include/openssl/chacha.h +47 -0
- package/runtime/third_party/boringssl/include/openssl/cipher.h +819 -0
- package/runtime/third_party/boringssl/include/openssl/cmac.h +91 -0
- package/runtime/third_party/boringssl/include/openssl/cms.h +147 -0
- package/runtime/third_party/boringssl/include/openssl/conf.h +136 -0
- package/runtime/third_party/boringssl/include/openssl/configuration.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/cpu.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/crypto.h +235 -0
- package/runtime/third_party/boringssl/include/openssl/ctrdrbg.h +116 -0
- package/runtime/third_party/boringssl/include/openssl/curve25519.h +309 -0
- package/runtime/third_party/boringssl/include/openssl/des.h +134 -0
- package/runtime/third_party/boringssl/include/openssl/dh.h +336 -0
- package/runtime/third_party/boringssl/include/openssl/digest.h +399 -0
- package/runtime/third_party/boringssl/include/openssl/dsa.h +392 -0
- package/runtime/third_party/boringssl/include/openssl/dtls1.h +16 -0
- package/runtime/third_party/boringssl/include/openssl/e_os2.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/ec.h +530 -0
- package/runtime/third_party/boringssl/include/openssl/ec_key.h +358 -0
- package/runtime/third_party/boringssl/include/openssl/ecdh.h +67 -0
- package/runtime/third_party/boringssl/include/openssl/ecdsa.h +242 -0
- package/runtime/third_party/boringssl/include/openssl/engine.h +109 -0
- package/runtime/third_party/boringssl/include/openssl/err.h +416 -0
- package/runtime/third_party/boringssl/include/openssl/evp.h +1645 -0
- package/runtime/third_party/boringssl/include/openssl/evp_errors.h +66 -0
- package/runtime/third_party/boringssl/include/openssl/ex_data.h +117 -0
- package/runtime/third_party/boringssl/include/openssl/hkdf.h +68 -0
- package/runtime/third_party/boringssl/include/openssl/hmac.h +151 -0
- package/runtime/third_party/boringssl/include/openssl/hpke.h +456 -0
- package/runtime/third_party/boringssl/include/openssl/hrss.h +108 -0
- package/runtime/third_party/boringssl/include/openssl/is_boringssl.h +16 -0
- package/runtime/third_party/boringssl/include/openssl/kdf.h +92 -0
- package/runtime/third_party/boringssl/include/openssl/lhash.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/md4.h +73 -0
- package/runtime/third_party/boringssl/include/openssl/md5.h +67 -0
- package/runtime/third_party/boringssl/include/openssl/mem.h +215 -0
- package/runtime/third_party/boringssl/include/openssl/mldsa.h +486 -0
- package/runtime/third_party/boringssl/include/openssl/mlkem.h +222 -0
- package/runtime/third_party/boringssl/include/openssl/nid.h +5561 -0
- package/runtime/third_party/boringssl/include/openssl/obj.h +225 -0
- package/runtime/third_party/boringssl/include/openssl/obj_mac.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/objects.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/opensslconf.h +108 -0
- package/runtime/third_party/boringssl/include/openssl/opensslv.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/ossl_typ.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/params.h +42 -0
- package/runtime/third_party/boringssl/include/openssl/pem.h +769 -0
- package/runtime/third_party/boringssl/include/openssl/pkcs12.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/pkcs7.h +239 -0
- package/runtime/third_party/boringssl/include/openssl/pkcs8.h +267 -0
- package/runtime/third_party/boringssl/include/openssl/poly1305.h +52 -0
- package/runtime/third_party/boringssl/include/openssl/pool.h +137 -0
- package/runtime/third_party/boringssl/include/openssl/posix_time.h +51 -0
- package/runtime/third_party/boringssl/include/openssl/prefix_symbols.h +8000 -0
- package/runtime/third_party/boringssl/include/openssl/prefix_symbols_internal_S.h +633 -0
- package/runtime/third_party/boringssl/include/openssl/prefix_symbols_internal_c.h +329 -0
- package/runtime/third_party/boringssl/include/openssl/rand.h +138 -0
- package/runtime/third_party/boringssl/include/openssl/rc4.h +54 -0
- package/runtime/third_party/boringssl/include/openssl/ripemd.h +71 -0
- package/runtime/third_party/boringssl/include/openssl/rsa.h +893 -0
- package/runtime/third_party/boringssl/include/openssl/safestack.h +16 -0
- package/runtime/third_party/boringssl/include/openssl/service_indicator.h +19 -0
- package/runtime/third_party/boringssl/include/openssl/sha.h +108 -0
- package/runtime/third_party/boringssl/include/openssl/sha2.h +201 -0
- package/runtime/third_party/boringssl/include/openssl/siphash.h +37 -0
- package/runtime/third_party/boringssl/include/openssl/slhdsa.h +250 -0
- package/runtime/third_party/boringssl/include/openssl/span.h +376 -0
- package/runtime/third_party/boringssl/include/openssl/srtp.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/ssl.h +7211 -0
- package/runtime/third_party/boringssl/include/openssl/ssl3.h +171 -0
- package/runtime/third_party/boringssl/include/openssl/stack.h +688 -0
- package/runtime/third_party/boringssl/include/openssl/target.h +246 -0
- package/runtime/third_party/boringssl/include/openssl/thread.h +114 -0
- package/runtime/third_party/boringssl/include/openssl/time.h +22 -0
- package/runtime/third_party/boringssl/include/openssl/tls1.h +263 -0
- package/runtime/third_party/boringssl/include/openssl/tls_prf.h +47 -0
- package/runtime/third_party/boringssl/include/openssl/trust_token.h +349 -0
- package/runtime/third_party/boringssl/include/openssl/type_check.h +37 -0
- package/runtime/third_party/boringssl/include/openssl/types.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/x509.h +5404 -0
- package/runtime/third_party/boringssl/include/openssl/x509_vfy.h +18 -0
- package/runtime/third_party/boringssl/include/openssl/x509v3.h +63 -0
- package/runtime/third_party/boringssl/include/openssl/x509v3_errors.h +84 -0
- package/runtime/third_party/boringssl/include/openssl/xwing.h +115 -0
- package/runtime/third_party/boringssl/sources.json +696 -0
- package/runtime/third_party/boringssl/ssl/bio_ssl.cc +196 -0
- package/runtime/third_party/boringssl/ssl/d1_both.cc +1137 -0
- package/runtime/third_party/boringssl/ssl/d1_lib.cc +245 -0
- package/runtime/third_party/boringssl/ssl/d1_pkt.cc +322 -0
- package/runtime/third_party/boringssl/ssl/d1_srtp.cc +128 -0
- package/runtime/third_party/boringssl/ssl/dtls_method.cc +216 -0
- package/runtime/third_party/boringssl/ssl/dtls_record.cc +586 -0
- package/runtime/third_party/boringssl/ssl/encrypted_client_hello.cc +1110 -0
- package/runtime/third_party/boringssl/ssl/extensions.cc +5368 -0
- package/runtime/third_party/boringssl/ssl/handoff.cc +625 -0
- package/runtime/third_party/boringssl/ssl/handshake.cc +694 -0
- package/runtime/third_party/boringssl/ssl/handshake_client.cc +1958 -0
- package/runtime/third_party/boringssl/ssl/handshake_server.cc +1875 -0
- package/runtime/third_party/boringssl/ssl/internal.h +4506 -0
- package/runtime/third_party/boringssl/ssl/s3_both.cc +555 -0
- package/runtime/third_party/boringssl/ssl/s3_lib.cc +88 -0
- package/runtime/third_party/boringssl/ssl/s3_pkt.cc +396 -0
- package/runtime/third_party/boringssl/ssl/ssl_aead_ctx.cc +416 -0
- package/runtime/third_party/boringssl/ssl/ssl_asn1.cc +851 -0
- package/runtime/third_party/boringssl/ssl/ssl_buffer.cc +304 -0
- package/runtime/third_party/boringssl/ssl/ssl_cert.cc +723 -0
- package/runtime/third_party/boringssl/ssl/ssl_cipher.cc +1762 -0
- package/runtime/third_party/boringssl/ssl/ssl_credential.cc +913 -0
- package/runtime/third_party/boringssl/ssl/ssl_file.cc +375 -0
- package/runtime/third_party/boringssl/ssl/ssl_key_share.cc +445 -0
- package/runtime/third_party/boringssl/ssl/ssl_lib.cc +4132 -0
- package/runtime/third_party/boringssl/ssl/ssl_privkey.cc +973 -0
- package/runtime/third_party/boringssl/ssl/ssl_session.cc +1273 -0
- package/runtime/third_party/boringssl/ssl/ssl_stat.cc +162 -0
- package/runtime/third_party/boringssl/ssl/ssl_transcript.cc +224 -0
- package/runtime/third_party/boringssl/ssl/ssl_versions.cc +436 -0
- package/runtime/third_party/boringssl/ssl/ssl_x509.cc +1229 -0
- package/runtime/third_party/boringssl/ssl/t1_enc.cc +266 -0
- package/runtime/third_party/boringssl/ssl/tls13_both.cc +764 -0
- package/runtime/third_party/boringssl/ssl/tls13_client.cc +1325 -0
- package/runtime/third_party/boringssl/ssl/tls13_enc.cc +746 -0
- package/runtime/third_party/boringssl/ssl/tls13_server.cc +1623 -0
- package/runtime/third_party/boringssl/ssl/tls_method.cc +266 -0
- package/runtime/third_party/boringssl/ssl/tls_record.cc +524 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_curve25519_adx_mul.S +178 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_curve25519_adx_square.S +146 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_p256_adx_mul.S +177 -0
- package/runtime/third_party/boringssl/third_party/fiat/asm/fiat_p256_adx_sqr.S +166 -0
- package/runtime/third_party/boringssl/third_party/fiat/bedrock_unverified_bareminimum.c.inc +47 -0
- package/runtime/third_party/boringssl/third_party/fiat/bedrock_unverified_platform.c.inc +137 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_32.h +1571 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_64.h +978 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_64_adx.h +700 -0
- package/runtime/third_party/boringssl/third_party/fiat/curve25519_64_msvc.h +1281 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_32.h +4760 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_64.h +1984 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_64_msvc.h +1939 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_field.c.inc +26 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_field_32.br.c.inc +71 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_field_64.br.c.inc +84 -0
- package/runtime/third_party/boringssl/third_party/fiat/p256_point.br.c.inc +112 -0
- package/runtime/third_party/quickjs-dtoa/LICENSE +0 -0
- package/runtime/third_party/quickjs-dtoa/README.md +0 -0
- package/runtime/third_party/quickjs-dtoa/dtoa.c +0 -0
- package/runtime/third_party/quickjs-dtoa/dtoa.h +0 -0
- package/runtime/third_party/quickjs-dtoa/dtoa_compat.h +0 -0
- package/runtime/third_party/quickjs-regexp/LICENSE +0 -0
- package/runtime/third_party/quickjs-regexp/README.md +0 -0
- package/runtime/third_party/quickjs-regexp/cutils.c +0 -0
- package/runtime/third_party/quickjs-regexp/cutils.h +0 -0
- package/runtime/third_party/quickjs-regexp/libregexp-opcode.h +0 -0
- package/runtime/third_party/quickjs-regexp/libregexp.c +0 -0
- package/runtime/third_party/quickjs-regexp/libregexp.h +0 -0
- package/runtime/third_party/quickjs-regexp/libunicode-table.h +0 -0
- package/runtime/third_party/quickjs-regexp/libunicode.c +0 -0
- package/runtime/third_party/quickjs-regexp/libunicode.h +0 -0
- package/runtime/third_party/v8-ieee754/LICENSE +0 -0
- package/runtime/third_party/v8-ieee754/README.md +2 -1
- package/runtime/third_party/v8-ieee754/convert.py +4 -0
- package/runtime/third_party/v8-ieee754/ieee754.c +1 -1
- package/runtime/third_party/v8-ieee754/ieee754.h +0 -0
- package/runtime/tools/regexp_compile.c +0 -0
- package/runtime/third_party/bearssl/LICENSE.txt +0 -21
- package/runtime/third_party/bearssl/README.txt +0 -136
- package/runtime/third_party/bearssl/VERSION +0 -1
- package/runtime/third_party/bearssl/inc/bearssl.h +0 -183
- package/runtime/third_party/bearssl/inc/bearssl_aead.h +0 -1059
- package/runtime/third_party/bearssl/inc/bearssl_block.h +0 -2618
- package/runtime/third_party/bearssl/inc/bearssl_ec.h +0 -967
- package/runtime/third_party/bearssl/inc/bearssl_hash.h +0 -1346
- package/runtime/third_party/bearssl/inc/bearssl_hmac.h +0 -241
- package/runtime/third_party/bearssl/inc/bearssl_kdf.h +0 -284
- package/runtime/third_party/bearssl/inc/bearssl_pem.h +0 -294
- package/runtime/third_party/bearssl/inc/bearssl_prf.h +0 -150
- package/runtime/third_party/bearssl/inc/bearssl_rand.h +0 -397
- package/runtime/third_party/bearssl/inc/bearssl_rsa.h +0 -1655
- package/runtime/third_party/bearssl/inc/bearssl_ssl.h +0 -4296
- package/runtime/third_party/bearssl/inc/bearssl_x509.h +0 -1474
- package/runtime/third_party/bearssl/src/aead/ccm.c +0 -346
- package/runtime/third_party/bearssl/src/aead/eax.c +0 -525
- package/runtime/third_party/bearssl/src/aead/gcm.c +0 -318
- package/runtime/third_party/bearssl/src/codec/ccopy.c +0 -44
- package/runtime/third_party/bearssl/src/codec/dec16be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec16le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec32be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec32le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec64be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/dec64le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc16be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc16le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc32be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc32le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc64be.c +0 -38
- package/runtime/third_party/bearssl/src/codec/enc64le.c +0 -38
- package/runtime/third_party/bearssl/src/codec/pemdec.c +0 -526
- package/runtime/third_party/bearssl/src/codec/pemdec.t0 +0 -314
- package/runtime/third_party/bearssl/src/codec/pemenc.c +0 -173
- package/runtime/third_party/bearssl/src/config.h +0 -247
- package/runtime/third_party/bearssl/src/ec/ec_all_m15.c +0 -121
- package/runtime/third_party/bearssl/src/ec/ec_all_m31.c +0 -171
- package/runtime/third_party/bearssl/src/ec/ec_c25519_i15.c +0 -398
- package/runtime/third_party/bearssl/src/ec/ec_c25519_i31.c +0 -390
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m15.c +0 -1478
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m31.c +0 -800
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m62.c +0 -605
- package/runtime/third_party/bearssl/src/ec/ec_c25519_m64.c +0 -831
- package/runtime/third_party/bearssl/src/ec/ec_curve25519.c +0 -46
- package/runtime/third_party/bearssl/src/ec/ec_default.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ec_keygen.c +0 -86
- package/runtime/third_party/bearssl/src/ec/ec_p256_m15.c +0 -2124
- package/runtime/third_party/bearssl/src/ec/ec_p256_m31.c +0 -1469
- package/runtime/third_party/bearssl/src/ec/ec_p256_m62.c +0 -1765
- package/runtime/third_party/bearssl/src/ec/ec_p256_m64.c +0 -1781
- package/runtime/third_party/bearssl/src/ec/ec_prime_i15.c +0 -824
- package/runtime/third_party/bearssl/src/ec/ec_prime_i31.c +0 -826
- package/runtime/third_party/bearssl/src/ec/ec_pubkey.c +0 -85
- package/runtime/third_party/bearssl/src/ec/ec_secp256r1.c +0 -51
- package/runtime/third_party/bearssl/src/ec/ec_secp384r1.c +0 -57
- package/runtime/third_party/bearssl/src/ec/ec_secp521r1.c +0 -64
- package/runtime/third_party/bearssl/src/ec/ecdsa_atr.c +0 -134
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_sign_asn1.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_sign_raw.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_vrfy_asn1.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_default_vrfy_raw.c +0 -36
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_bits.c +0 -47
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_sign_asn1.c +0 -45
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_sign_raw.c +0 -174
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_vrfy_asn1.c +0 -48
- package/runtime/third_party/bearssl/src/ec/ecdsa_i15_vrfy_raw.c +0 -166
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_bits.c +0 -47
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_sign_asn1.c +0 -45
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_sign_raw.c +0 -173
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_vrfy_asn1.c +0 -48
- package/runtime/third_party/bearssl/src/ec/ecdsa_i31_vrfy_raw.c +0 -165
- package/runtime/third_party/bearssl/src/ec/ecdsa_rta.c +0 -121
- package/runtime/third_party/bearssl/src/hash/dig_oid.c +0 -84
- package/runtime/third_party/bearssl/src/hash/dig_size.c +0 -50
- package/runtime/third_party/bearssl/src/hash/ghash_ctmul.c +0 -345
- package/runtime/third_party/bearssl/src/hash/ghash_ctmul32.c +0 -251
- package/runtime/third_party/bearssl/src/hash/ghash_ctmul64.c +0 -154
- package/runtime/third_party/bearssl/src/hash/ghash_pclmul.c +0 -389
- package/runtime/third_party/bearssl/src/hash/ghash_pwr8.c +0 -411
- package/runtime/third_party/bearssl/src/hash/md5.c +0 -208
- package/runtime/third_party/bearssl/src/hash/md5sha1.c +0 -141
- package/runtime/third_party/bearssl/src/hash/mgf1.c +0 -56
- package/runtime/third_party/bearssl/src/hash/multihash.c +0 -166
- package/runtime/third_party/bearssl/src/hash/sha1.c +0 -191
- package/runtime/third_party/bearssl/src/hash/sha2big.c +0 -285
- package/runtime/third_party/bearssl/src/hash/sha2small.c +0 -341
- package/runtime/third_party/bearssl/src/inner.h +0 -2577
- package/runtime/third_party/bearssl/src/int/i15_add.c +0 -46
- package/runtime/third_party/bearssl/src/int/i15_bitlen.c +0 -44
- package/runtime/third_party/bearssl/src/int/i15_decmod.c +0 -124
- package/runtime/third_party/bearssl/src/int/i15_decode.c +0 -56
- package/runtime/third_party/bearssl/src/int/i15_decred.c +0 -100
- package/runtime/third_party/bearssl/src/int/i15_encode.c +0 -56
- package/runtime/third_party/bearssl/src/int/i15_fmont.c +0 -59
- package/runtime/third_party/bearssl/src/int/i15_iszero.c +0 -39
- package/runtime/third_party/bearssl/src/int/i15_moddiv.c +0 -465
- package/runtime/third_party/bearssl/src/int/i15_modpow.c +0 -50
- package/runtime/third_party/bearssl/src/int/i15_modpow2.c +0 -160
- package/runtime/third_party/bearssl/src/int/i15_montmul.c +0 -184
- package/runtime/third_party/bearssl/src/int/i15_mulacc.c +0 -61
- package/runtime/third_party/bearssl/src/int/i15_muladd.c +0 -173
- package/runtime/third_party/bearssl/src/int/i15_ninv15.c +0 -38
- package/runtime/third_party/bearssl/src/int/i15_reduce.c +0 -66
- package/runtime/third_party/bearssl/src/int/i15_rshift.c +0 -47
- package/runtime/third_party/bearssl/src/int/i15_sub.c +0 -46
- package/runtime/third_party/bearssl/src/int/i15_tmont.c +0 -36
- package/runtime/third_party/bearssl/src/int/i31_add.c +0 -46
- package/runtime/third_party/bearssl/src/int/i31_bitlen.c +0 -44
- package/runtime/third_party/bearssl/src/int/i31_decmod.c +0 -124
- package/runtime/third_party/bearssl/src/int/i31_decode.c +0 -57
- package/runtime/third_party/bearssl/src/int/i31_decred.c +0 -103
- package/runtime/third_party/bearssl/src/int/i31_encode.c +0 -79
- package/runtime/third_party/bearssl/src/int/i31_fmont.c +0 -60
- package/runtime/third_party/bearssl/src/int/i31_iszero.c +0 -39
- package/runtime/third_party/bearssl/src/int/i31_moddiv.c +0 -488
- package/runtime/third_party/bearssl/src/int/i31_modpow.c +0 -65
- package/runtime/third_party/bearssl/src/int/i31_modpow2.c +0 -160
- package/runtime/third_party/bearssl/src/int/i31_montmul.c +0 -127
- package/runtime/third_party/bearssl/src/int/i31_mulacc.c +0 -74
- package/runtime/third_party/bearssl/src/int/i31_muladd.c +0 -157
- package/runtime/third_party/bearssl/src/int/i31_ninv31.c +0 -39
- package/runtime/third_party/bearssl/src/int/i31_reduce.c +0 -66
- package/runtime/third_party/bearssl/src/int/i31_rshift.c +0 -47
- package/runtime/third_party/bearssl/src/int/i31_sub.c +0 -46
- package/runtime/third_party/bearssl/src/int/i31_tmont.c +0 -36
- package/runtime/third_party/bearssl/src/int/i32_add.c +0 -51
- package/runtime/third_party/bearssl/src/int/i32_bitlen.c +0 -44
- package/runtime/third_party/bearssl/src/int/i32_decmod.c +0 -77
- package/runtime/third_party/bearssl/src/int/i32_decode.c +0 -63
- package/runtime/third_party/bearssl/src/int/i32_decred.c +0 -107
- package/runtime/third_party/bearssl/src/int/i32_div32.c +0 -56
- package/runtime/third_party/bearssl/src/int/i32_encode.c +0 -72
- package/runtime/third_party/bearssl/src/int/i32_fmont.c +0 -60
- package/runtime/third_party/bearssl/src/int/i32_iszero.c +0 -39
- package/runtime/third_party/bearssl/src/int/i32_modpow.c +0 -65
- package/runtime/third_party/bearssl/src/int/i32_montmul.c +0 -69
- package/runtime/third_party/bearssl/src/int/i32_mulacc.c +0 -56
- package/runtime/third_party/bearssl/src/int/i32_muladd.c +0 -138
- package/runtime/third_party/bearssl/src/int/i32_ninv32.c +0 -39
- package/runtime/third_party/bearssl/src/int/i32_reduce.c +0 -66
- package/runtime/third_party/bearssl/src/int/i32_sub.c +0 -51
- package/runtime/third_party/bearssl/src/int/i32_tmont.c +0 -36
- package/runtime/third_party/bearssl/src/int/i62_modpow2.c +0 -493
- package/runtime/third_party/bearssl/src/kdf/hkdf.c +0 -107
- package/runtime/third_party/bearssl/src/kdf/shake.c +0 -590
- package/runtime/third_party/bearssl/src/mac/hmac.c +0 -122
- package/runtime/third_party/bearssl/src/mac/hmac_ct.c +0 -193
- package/runtime/third_party/bearssl/src/rand/aesctr_drbg.c +0 -206
- package/runtime/third_party/bearssl/src/rand/hmac_drbg.c +0 -157
- package/runtime/third_party/bearssl/src/rand/sysrng.c +0 -252
- package/runtime/third_party/bearssl/src/rsa/rsa_default_keygen.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_modulus.c +0 -36
- package/runtime/third_party/bearssl/src/rsa/rsa_default_oaep_decrypt.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_oaep_encrypt.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pkcs1_sign.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pkcs1_vrfy.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_priv.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_privexp.c +0 -36
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pss_sign.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pss_vrfy.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pub.c +0 -38
- package/runtime/third_party/bearssl/src/rsa/rsa_default_pubexp.c +0 -36
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_keygen.c +0 -583
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_modulus.c +0 -99
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_oaep_decrypt.c +0 -41
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_oaep_encrypt.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pkcs1_sign.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pkcs1_vrfy.c +0 -43
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_priv.c +0 -209
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_privexp.c +0 -320
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pss_sign.c +0 -40
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pss_vrfy.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pub.c +0 -113
- package/runtime/third_party/bearssl/src/rsa/rsa_i15_pubexp.c +0 -152
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_keygen.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_keygen_inner.c +0 -608
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_modulus.c +0 -99
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_oaep_decrypt.c +0 -41
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_oaep_encrypt.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pkcs1_sign.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pkcs1_vrfy.c +0 -43
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_priv.c +0 -203
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_privexp.c +0 -318
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pss_sign.c +0 -40
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pss_vrfy.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pub.c +0 -106
- package/runtime/third_party/bearssl/src/rsa/rsa_i31_pubexp.c +0 -152
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_oaep_decrypt.c +0 -41
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_oaep_encrypt.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pkcs1_sign.c +0 -37
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pkcs1_vrfy.c +0 -43
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_priv.c +0 -160
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pss_sign.c +0 -40
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pss_vrfy.c +0 -44
- package/runtime/third_party/bearssl/src/rsa/rsa_i32_pub.c +0 -77
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_keygen.c +0 -57
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_oaep_decrypt.c +0 -61
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_oaep_encrypt.c +0 -64
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pkcs1_sign.c +0 -57
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pkcs1_vrfy.c +0 -63
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_priv.c +0 -223
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pss_sign.c +0 -60
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pss_vrfy.c +0 -64
- package/runtime/third_party/bearssl/src/rsa/rsa_i62_pub.c +0 -125
- package/runtime/third_party/bearssl/src/rsa/rsa_oaep_pad.c +0 -112
- package/runtime/third_party/bearssl/src/rsa/rsa_oaep_unpad.c +0 -145
- package/runtime/third_party/bearssl/src/rsa/rsa_pkcs1_sig_pad.c +0 -100
- package/runtime/third_party/bearssl/src/rsa/rsa_pkcs1_sig_unpad.c +0 -121
- package/runtime/third_party/bearssl/src/rsa/rsa_pss_sig_pad.c +0 -106
- package/runtime/third_party/bearssl/src/rsa/rsa_pss_sig_unpad.c +0 -121
- package/runtime/third_party/bearssl/src/rsa/rsa_ssl_decrypt.c +0 -52
- package/runtime/third_party/bearssl/src/settings.c +0 -306
- package/runtime/third_party/bearssl/src/symcipher/aes_big_cbcdec.c +0 -69
- package/runtime/third_party/bearssl/src/symcipher/aes_big_cbcenc.c +0 -67
- package/runtime/third_party/bearssl/src/symcipher/aes_big_ctr.c +0 -84
- package/runtime/third_party/bearssl/src/symcipher/aes_big_ctrcbc.c +0 -142
- package/runtime/third_party/bearssl/src/symcipher/aes_big_dec.c +0 -254
- package/runtime/third_party/bearssl/src/symcipher/aes_big_enc.c +0 -157
- package/runtime/third_party/bearssl/src/symcipher/aes_common.c +0 -112
- package/runtime/third_party/bearssl/src/symcipher/aes_ct.c +0 -328
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64.c +0 -398
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_cbcdec.c +0 -104
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_cbcenc.c +0 -81
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_ctr.c +0 -114
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_ctrcbc.c +0 -433
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_dec.c +0 -159
- package/runtime/third_party/bearssl/src/symcipher/aes_ct64_enc.c +0 -115
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_cbcdec.c +0 -111
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_cbcenc.c +0 -91
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_ctr.c +0 -116
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_ctrcbc.c +0 -422
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_dec.c +0 -170
- package/runtime/third_party/bearssl/src/symcipher/aes_ct_enc.c +0 -112
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8.c +0 -445
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_cbcdec.c +0 -670
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_cbcenc.c +0 -417
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_ctr.c +0 -717
- package/runtime/third_party/bearssl/src/symcipher/aes_pwr8_ctrcbc.c +0 -946
- package/runtime/third_party/bearssl/src/symcipher/aes_small_cbcdec.c +0 -69
- package/runtime/third_party/bearssl/src/symcipher/aes_small_cbcenc.c +0 -67
- package/runtime/third_party/bearssl/src/symcipher/aes_small_ctr.c +0 -84
- package/runtime/third_party/bearssl/src/symcipher/aes_small_ctrcbc.c +0 -142
- package/runtime/third_party/bearssl/src/symcipher/aes_small_dec.c +0 -176
- package/runtime/third_party/bearssl/src/symcipher/aes_small_enc.c +0 -129
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni.c +0 -240
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_cbcdec.c +0 -223
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_cbcenc.c +0 -122
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_ctr.c +0 -211
- package/runtime/third_party/bearssl/src/symcipher/aes_x86ni_ctrcbc.c +0 -596
- package/runtime/third_party/bearssl/src/symcipher/chacha20_ct.c +0 -106
- package/runtime/third_party/bearssl/src/symcipher/chacha20_sse2.c +0 -237
- package/runtime/third_party/bearssl/src/symcipher/des_ct.c +0 -411
- package/runtime/third_party/bearssl/src/symcipher/des_ct_cbcdec.c +0 -87
- package/runtime/third_party/bearssl/src/symcipher/des_ct_cbcenc.c +0 -69
- package/runtime/third_party/bearssl/src/symcipher/des_support.c +0 -166
- package/runtime/third_party/bearssl/src/symcipher/des_tab.c +0 -310
- package/runtime/third_party/bearssl/src/symcipher/des_tab_cbcdec.c +0 -85
- package/runtime/third_party/bearssl/src/symcipher/des_tab_cbcenc.c +0 -67
- package/runtime/third_party/bearssl/src/symcipher/poly1305_ctmul.c +0 -260
- package/runtime/third_party/bearssl/src/symcipher/poly1305_ctmul32.c +0 -297
- package/runtime/third_party/bearssl/src/symcipher/poly1305_ctmulq.c +0 -475
- package/runtime/third_party/bearssl/src/symcipher/poly1305_i15.c +0 -221
- package/runtime/third_party/bearssl/src/x509/asn1.t0 +0 -757
- package/runtime/third_party/bearssl/src/x509/asn1enc.c +0 -93
- package/runtime/third_party/bearssl/src/x509/encode_ec_pk8der.c +0 -110
- package/runtime/third_party/bearssl/src/x509/encode_ec_rawder.c +0 -161
- package/runtime/third_party/bearssl/src/x509/encode_rsa_pk8der.c +0 -97
- package/runtime/third_party/bearssl/src/x509/encode_rsa_rawder.c +0 -96
- package/runtime/third_party/bearssl/src/x509/skey_decoder.c +0 -653
- package/runtime/third_party/bearssl/src/x509/skey_decoder.t0 +0 -376
- package/runtime/third_party/bearssl/src/x509/x509_decoder.c +0 -776
- package/runtime/third_party/bearssl/src/x509/x509_decoder.t0 +0 -324
- package/runtime/third_party/bearssl/src/x509/x509_knownkey.c +0 -105
- package/runtime/third_party/bearssl/src/x509/x509_minimal.c +0 -1722
- package/runtime/third_party/bearssl/src/x509/x509_minimal.t0 +0 -1526
- package/runtime/third_party/bearssl/src/x509/x509_minimal_full.c +0 -59
|
@@ -0,0 +1,1762 @@
|
|
|
1
|
+
// Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
2
|
+
// Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
// Copyright 2005 Nokia. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
// you may not use this file except in compliance with the License.
|
|
7
|
+
// You may obtain a copy of the License at
|
|
8
|
+
//
|
|
9
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
//
|
|
11
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
// See the License for the specific language governing permissions and
|
|
15
|
+
// limitations under the License.
|
|
16
|
+
|
|
17
|
+
#include <openssl/ssl.h>
|
|
18
|
+
|
|
19
|
+
#include <assert.h>
|
|
20
|
+
#include <string.h>
|
|
21
|
+
|
|
22
|
+
#include <iterator>
|
|
23
|
+
#include <optional>
|
|
24
|
+
|
|
25
|
+
#include <openssl/aead.h>
|
|
26
|
+
#include <openssl/bytestring.h>
|
|
27
|
+
#include <openssl/err.h>
|
|
28
|
+
#include <openssl/md5.h>
|
|
29
|
+
#include <openssl/mem.h>
|
|
30
|
+
#include <openssl/sha.h>
|
|
31
|
+
#include <openssl/stack.h>
|
|
32
|
+
|
|
33
|
+
#include "internal.h"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
BSSL_NAMESPACE_BEGIN
|
|
37
|
+
|
|
38
|
+
static constexpr SSL_CIPHER kCiphers[] = {
|
|
39
|
+
// The RSA ciphers
|
|
40
|
+
|
|
41
|
+
// Cipher 0A
|
|
42
|
+
{
|
|
43
|
+
SSL3_TXT_RSA_DES_192_CBC3_SHA,
|
|
44
|
+
"TLS_RSA_WITH_3DES_EDE_CBC_SHA",
|
|
45
|
+
SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA,
|
|
46
|
+
SSL_kRSA,
|
|
47
|
+
SSL_aRSA_DECRYPT,
|
|
48
|
+
SSL_3DES,
|
|
49
|
+
SSL_SHA1,
|
|
50
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
// New AES ciphersuites
|
|
55
|
+
|
|
56
|
+
// Cipher 2F
|
|
57
|
+
{
|
|
58
|
+
TLS1_TXT_RSA_WITH_AES_128_SHA,
|
|
59
|
+
"TLS_RSA_WITH_AES_128_CBC_SHA",
|
|
60
|
+
SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA,
|
|
61
|
+
SSL_kRSA,
|
|
62
|
+
SSL_aRSA_DECRYPT,
|
|
63
|
+
SSL_AES128,
|
|
64
|
+
SSL_SHA1,
|
|
65
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
// Cipher 35
|
|
69
|
+
{
|
|
70
|
+
TLS1_TXT_RSA_WITH_AES_256_SHA,
|
|
71
|
+
"TLS_RSA_WITH_AES_256_CBC_SHA",
|
|
72
|
+
SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA,
|
|
73
|
+
SSL_kRSA,
|
|
74
|
+
SSL_aRSA_DECRYPT,
|
|
75
|
+
SSL_AES256,
|
|
76
|
+
SSL_SHA1,
|
|
77
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
// PSK cipher suites.
|
|
81
|
+
|
|
82
|
+
// Cipher 8C
|
|
83
|
+
{
|
|
84
|
+
TLS1_TXT_PSK_WITH_AES_128_CBC_SHA,
|
|
85
|
+
"TLS_PSK_WITH_AES_128_CBC_SHA",
|
|
86
|
+
SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA,
|
|
87
|
+
SSL_kPSK,
|
|
88
|
+
SSL_aPSK,
|
|
89
|
+
SSL_AES128,
|
|
90
|
+
SSL_SHA1,
|
|
91
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
// Cipher 8D
|
|
95
|
+
{
|
|
96
|
+
TLS1_TXT_PSK_WITH_AES_256_CBC_SHA,
|
|
97
|
+
"TLS_PSK_WITH_AES_256_CBC_SHA",
|
|
98
|
+
SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA,
|
|
99
|
+
SSL_kPSK,
|
|
100
|
+
SSL_aPSK,
|
|
101
|
+
SSL_AES256,
|
|
102
|
+
SSL_SHA1,
|
|
103
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
// GCM ciphersuites from RFC 5288
|
|
107
|
+
|
|
108
|
+
// Cipher 9C
|
|
109
|
+
{
|
|
110
|
+
TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256,
|
|
111
|
+
"TLS_RSA_WITH_AES_128_GCM_SHA256",
|
|
112
|
+
SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256,
|
|
113
|
+
SSL_kRSA,
|
|
114
|
+
SSL_aRSA_DECRYPT,
|
|
115
|
+
SSL_AES128GCM,
|
|
116
|
+
SSL_AEAD,
|
|
117
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
// Cipher 9D
|
|
121
|
+
{
|
|
122
|
+
TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384,
|
|
123
|
+
"TLS_RSA_WITH_AES_256_GCM_SHA384",
|
|
124
|
+
SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384,
|
|
125
|
+
SSL_kRSA,
|
|
126
|
+
SSL_aRSA_DECRYPT,
|
|
127
|
+
SSL_AES256GCM,
|
|
128
|
+
SSL_AEAD,
|
|
129
|
+
SSL_HANDSHAKE_MAC_SHA384,
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
// TLS 1.3 suites.
|
|
133
|
+
|
|
134
|
+
// Cipher 1301
|
|
135
|
+
{
|
|
136
|
+
TLS1_3_RFC_AES_128_GCM_SHA256,
|
|
137
|
+
"TLS_AES_128_GCM_SHA256",
|
|
138
|
+
SSL_CIPHER_AES_128_GCM_SHA256,
|
|
139
|
+
SSL_kGENERIC,
|
|
140
|
+
SSL_aGENERIC,
|
|
141
|
+
SSL_AES128GCM,
|
|
142
|
+
SSL_AEAD,
|
|
143
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
// Cipher 1302
|
|
147
|
+
{
|
|
148
|
+
TLS1_3_RFC_AES_256_GCM_SHA384,
|
|
149
|
+
"TLS_AES_256_GCM_SHA384",
|
|
150
|
+
SSL_CIPHER_AES_256_GCM_SHA384,
|
|
151
|
+
SSL_kGENERIC,
|
|
152
|
+
SSL_aGENERIC,
|
|
153
|
+
SSL_AES256GCM,
|
|
154
|
+
SSL_AEAD,
|
|
155
|
+
SSL_HANDSHAKE_MAC_SHA384,
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
// Cipher 1303
|
|
159
|
+
{
|
|
160
|
+
TLS1_3_RFC_CHACHA20_POLY1305_SHA256,
|
|
161
|
+
"TLS_CHACHA20_POLY1305_SHA256",
|
|
162
|
+
SSL_CIPHER_CHACHA20_POLY1305_SHA256,
|
|
163
|
+
SSL_kGENERIC,
|
|
164
|
+
SSL_aGENERIC,
|
|
165
|
+
SSL_CHACHA20POLY1305,
|
|
166
|
+
SSL_AEAD,
|
|
167
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
// Cipher C009
|
|
171
|
+
{
|
|
172
|
+
TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
|
173
|
+
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
|
|
174
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
|
175
|
+
SSL_kECDHE,
|
|
176
|
+
SSL_aECDSA,
|
|
177
|
+
SSL_AES128,
|
|
178
|
+
SSL_SHA1,
|
|
179
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// Cipher C00A
|
|
183
|
+
{
|
|
184
|
+
TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
|
|
185
|
+
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
|
|
186
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
|
|
187
|
+
SSL_kECDHE,
|
|
188
|
+
SSL_aECDSA,
|
|
189
|
+
SSL_AES256,
|
|
190
|
+
SSL_SHA1,
|
|
191
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
// Cipher C013
|
|
195
|
+
{
|
|
196
|
+
TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
|
197
|
+
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
|
|
198
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
|
199
|
+
SSL_kECDHE,
|
|
200
|
+
SSL_aRSA_SIGN,
|
|
201
|
+
SSL_AES128,
|
|
202
|
+
SSL_SHA1,
|
|
203
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
// Cipher C014
|
|
207
|
+
{
|
|
208
|
+
TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
|
209
|
+
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
|
|
210
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
|
211
|
+
SSL_kECDHE,
|
|
212
|
+
SSL_aRSA_SIGN,
|
|
213
|
+
SSL_AES256,
|
|
214
|
+
SSL_SHA1,
|
|
215
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
// HMAC based TLS v1.2 ciphersuites from RFC5289
|
|
219
|
+
|
|
220
|
+
// Cipher C023 (deprecated)
|
|
221
|
+
{
|
|
222
|
+
TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
223
|
+
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
|
|
224
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
225
|
+
SSL_kECDHE,
|
|
226
|
+
SSL_aECDSA,
|
|
227
|
+
SSL_AES128,
|
|
228
|
+
SSL_SHA256,
|
|
229
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
230
|
+
},
|
|
231
|
+
|
|
232
|
+
// Cipher C027 (deprecated)
|
|
233
|
+
{
|
|
234
|
+
TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
|
|
235
|
+
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
|
|
236
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
|
|
237
|
+
SSL_kECDHE,
|
|
238
|
+
SSL_aRSA_SIGN,
|
|
239
|
+
SSL_AES128,
|
|
240
|
+
SSL_SHA256,
|
|
241
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
// GCM based TLS v1.2 ciphersuites from RFC 5289
|
|
245
|
+
|
|
246
|
+
// Cipher C02B
|
|
247
|
+
{
|
|
248
|
+
TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
249
|
+
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
|
|
250
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
251
|
+
SSL_kECDHE,
|
|
252
|
+
SSL_aECDSA,
|
|
253
|
+
SSL_AES128GCM,
|
|
254
|
+
SSL_AEAD,
|
|
255
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
256
|
+
},
|
|
257
|
+
|
|
258
|
+
// Cipher C02C
|
|
259
|
+
{
|
|
260
|
+
TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
261
|
+
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
|
|
262
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
263
|
+
SSL_kECDHE,
|
|
264
|
+
SSL_aECDSA,
|
|
265
|
+
SSL_AES256GCM,
|
|
266
|
+
SSL_AEAD,
|
|
267
|
+
SSL_HANDSHAKE_MAC_SHA384,
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
// Cipher C02F
|
|
271
|
+
{
|
|
272
|
+
TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
|
273
|
+
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
|
|
274
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
|
275
|
+
SSL_kECDHE,
|
|
276
|
+
SSL_aRSA_SIGN,
|
|
277
|
+
SSL_AES128GCM,
|
|
278
|
+
SSL_AEAD,
|
|
279
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
// Cipher C030
|
|
283
|
+
{
|
|
284
|
+
TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
|
285
|
+
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
|
|
286
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
|
287
|
+
SSL_kECDHE,
|
|
288
|
+
SSL_aRSA_SIGN,
|
|
289
|
+
SSL_AES256GCM,
|
|
290
|
+
SSL_AEAD,
|
|
291
|
+
SSL_HANDSHAKE_MAC_SHA384,
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
// ECDHE-PSK cipher suites.
|
|
295
|
+
|
|
296
|
+
// Cipher C035
|
|
297
|
+
{
|
|
298
|
+
TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA,
|
|
299
|
+
"TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",
|
|
300
|
+
SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA,
|
|
301
|
+
SSL_kECDHE,
|
|
302
|
+
SSL_aPSK,
|
|
303
|
+
SSL_AES128,
|
|
304
|
+
SSL_SHA1,
|
|
305
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
// Cipher C036
|
|
309
|
+
{
|
|
310
|
+
TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA,
|
|
311
|
+
"TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",
|
|
312
|
+
SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA,
|
|
313
|
+
SSL_kECDHE,
|
|
314
|
+
SSL_aPSK,
|
|
315
|
+
SSL_AES256,
|
|
316
|
+
SSL_SHA1,
|
|
317
|
+
SSL_HANDSHAKE_MAC_DEFAULT,
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
// ChaCha20-Poly1305 cipher suites.
|
|
321
|
+
|
|
322
|
+
// Cipher CCA8
|
|
323
|
+
{
|
|
324
|
+
TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
325
|
+
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
|
|
326
|
+
SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
327
|
+
SSL_kECDHE,
|
|
328
|
+
SSL_aRSA_SIGN,
|
|
329
|
+
SSL_CHACHA20POLY1305,
|
|
330
|
+
SSL_AEAD,
|
|
331
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
332
|
+
},
|
|
333
|
+
|
|
334
|
+
// Cipher CCA9
|
|
335
|
+
{
|
|
336
|
+
TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
337
|
+
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
|
|
338
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
339
|
+
SSL_kECDHE,
|
|
340
|
+
SSL_aECDSA,
|
|
341
|
+
SSL_CHACHA20POLY1305,
|
|
342
|
+
SSL_AEAD,
|
|
343
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
// Cipher CCAB
|
|
347
|
+
{
|
|
348
|
+
TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
349
|
+
"TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
|
|
350
|
+
SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
351
|
+
SSL_kECDHE,
|
|
352
|
+
SSL_aPSK,
|
|
353
|
+
SSL_CHACHA20POLY1305,
|
|
354
|
+
SSL_AEAD,
|
|
355
|
+
SSL_HANDSHAKE_MAC_SHA256,
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
Span<const SSL_CIPHER> AllCiphers() { return kCiphers; }
|
|
361
|
+
|
|
362
|
+
namespace {
|
|
363
|
+
constexpr size_t NumTLS13Ciphers() {
|
|
364
|
+
size_t num = 0;
|
|
365
|
+
for (const auto &cipher : kCiphers) {
|
|
366
|
+
if (cipher.algorithm_mkey == SSL_kGENERIC) {
|
|
367
|
+
num++;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return num;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
#define CIPHER_ADD 1
|
|
374
|
+
#define CIPHER_KILL 2
|
|
375
|
+
#define CIPHER_DEL 3
|
|
376
|
+
#define CIPHER_ORD 4
|
|
377
|
+
#define CIPHER_SPECIAL 5
|
|
378
|
+
|
|
379
|
+
typedef struct cipher_order_st {
|
|
380
|
+
const SSL_CIPHER *cipher;
|
|
381
|
+
bool active;
|
|
382
|
+
bool in_group;
|
|
383
|
+
struct cipher_order_st *next, *prev;
|
|
384
|
+
} CIPHER_ORDER;
|
|
385
|
+
|
|
386
|
+
typedef struct cipher_alias_st {
|
|
387
|
+
// name is the name of the cipher alias.
|
|
388
|
+
const char *name = nullptr;
|
|
389
|
+
|
|
390
|
+
// The following fields are bitmasks for the corresponding fields on
|
|
391
|
+
// `SSL_CIPHER`. A cipher matches a cipher alias iff, for each bitmask, the
|
|
392
|
+
// bit corresponding to the cipher's value is set to 1. If any bitmask is
|
|
393
|
+
// all zeroes, the alias matches nothing. Use `~0u` for the default value.
|
|
394
|
+
uint32_t algorithm_mkey = ~0u;
|
|
395
|
+
uint32_t algorithm_auth = ~0u;
|
|
396
|
+
uint32_t algorithm_enc = ~0u;
|
|
397
|
+
uint32_t algorithm_mac = ~0u;
|
|
398
|
+
|
|
399
|
+
// min_version, if non-zero, matches all ciphers which were added in that
|
|
400
|
+
// particular protocol version.
|
|
401
|
+
uint16_t min_version = 0;
|
|
402
|
+
|
|
403
|
+
// include_deprecated, if true, means this alias includes deprecated ciphers.
|
|
404
|
+
bool include_deprecated = false;
|
|
405
|
+
} CIPHER_ALIAS;
|
|
406
|
+
const CIPHER_ALIAS kCipherAliases[] = {
|
|
407
|
+
{"ALL", ~0u, ~0u, ~0u, ~0u, 0},
|
|
408
|
+
|
|
409
|
+
// The "COMPLEMENTOFDEFAULT" rule is omitted. It matches nothing.
|
|
410
|
+
|
|
411
|
+
// key exchange aliases
|
|
412
|
+
// (some of those using only a single bit here combine
|
|
413
|
+
// multiple key exchange algs according to the RFCs.
|
|
414
|
+
{"kRSA", SSL_kRSA, ~0u, ~0u, ~0u, 0},
|
|
415
|
+
|
|
416
|
+
{"kECDHE", SSL_kECDHE, ~0u, ~0u, ~0u, 0},
|
|
417
|
+
{"kEECDH", SSL_kECDHE, ~0u, ~0u, ~0u, 0},
|
|
418
|
+
{"ECDH", SSL_kECDHE, ~0u, ~0u, ~0u, 0},
|
|
419
|
+
|
|
420
|
+
{"kPSK", SSL_kPSK, ~0u, ~0u, ~0u, 0},
|
|
421
|
+
|
|
422
|
+
// server authentication aliases
|
|
423
|
+
{"aRSA", ~0u, SSL_aRSA_SIGN | SSL_aRSA_DECRYPT, ~0u, ~0u, 0},
|
|
424
|
+
{"aECDSA", ~0u, SSL_aECDSA, ~0u, ~0u, 0},
|
|
425
|
+
{"ECDSA", ~0u, SSL_aECDSA, ~0u, ~0u, 0},
|
|
426
|
+
{"aPSK", ~0u, SSL_aPSK, ~0u, ~0u, 0},
|
|
427
|
+
|
|
428
|
+
// aliases combining key exchange and server authentication
|
|
429
|
+
{"ECDHE", SSL_kECDHE, ~0u, ~0u, ~0u, 0},
|
|
430
|
+
{"EECDH", SSL_kECDHE, ~0u, ~0u, ~0u, 0},
|
|
431
|
+
{"RSA", SSL_kRSA, SSL_aRSA_SIGN | SSL_aRSA_DECRYPT, ~0u, ~0u, 0},
|
|
432
|
+
{"PSK", SSL_kPSK, SSL_aPSK, ~0u, ~0u, 0},
|
|
433
|
+
|
|
434
|
+
// symmetric encryption aliases
|
|
435
|
+
{"3DES", ~0u, ~0u, SSL_3DES, ~0u, 0, /*include_deprecated=*/true},
|
|
436
|
+
{"AES128", ~0u, ~0u, SSL_AES128 | SSL_AES128GCM, ~0u, 0,
|
|
437
|
+
/*include_deprecated=*/false},
|
|
438
|
+
{"AES256", ~0u, ~0u, SSL_AES256 | SSL_AES256GCM, ~0u, 0,
|
|
439
|
+
/*include_deprecated=*/false},
|
|
440
|
+
{"AES", ~0u, ~0u, SSL_AES, ~0u, 0},
|
|
441
|
+
{"AESGCM", ~0u, ~0u, SSL_AES128GCM | SSL_AES256GCM, ~0u, 0,
|
|
442
|
+
/*include_deprecated=*/false},
|
|
443
|
+
{"CHACHA20", ~0u, ~0u, SSL_CHACHA20POLY1305, ~0u, 0,
|
|
444
|
+
/*include_deprecated=*/false},
|
|
445
|
+
|
|
446
|
+
// MAC aliases
|
|
447
|
+
{"SHA1", ~0u, ~0u, ~0u, SSL_SHA1, 0},
|
|
448
|
+
{"SHA", ~0u, ~0u, ~0u, SSL_SHA1, 0},
|
|
449
|
+
|
|
450
|
+
// Legacy protocol minimum version aliases. "TLSv1" is intentionally the
|
|
451
|
+
// same as "SSLv3".
|
|
452
|
+
{"SSLv3", ~0u, ~0u, ~0u, ~0u, TLS1_VERSION},
|
|
453
|
+
{"TLSv1", ~0u, ~0u, ~0u, ~0u, TLS1_VERSION},
|
|
454
|
+
{"TLSv1.2", ~0u, ~0u, ~0u, ~0u, TLS1_2_VERSION},
|
|
455
|
+
|
|
456
|
+
// Legacy strength classes.
|
|
457
|
+
{"HIGH", ~0u, ~0u, ~0u, ~0u, 0},
|
|
458
|
+
{"FIPS", ~0u, ~0u, ~0u, ~0u, 0},
|
|
459
|
+
};
|
|
460
|
+
} // namespace
|
|
461
|
+
|
|
462
|
+
bool ssl_cipher_get_evp_aead(const EVP_AEAD **out_aead,
|
|
463
|
+
size_t *out_mac_secret_len,
|
|
464
|
+
size_t *out_fixed_iv_len, const SSL_CIPHER *cipher,
|
|
465
|
+
uint16_t version) {
|
|
466
|
+
*out_aead = nullptr;
|
|
467
|
+
*out_mac_secret_len = 0;
|
|
468
|
+
*out_fixed_iv_len = 0;
|
|
469
|
+
|
|
470
|
+
if (cipher->algorithm_mac == SSL_AEAD) {
|
|
471
|
+
if (cipher->algorithm_enc == SSL_AES128GCM) {
|
|
472
|
+
if (version < TLS1_3_VERSION) {
|
|
473
|
+
*out_aead = EVP_aead_aes_128_gcm_tls12();
|
|
474
|
+
} else {
|
|
475
|
+
*out_aead = EVP_aead_aes_128_gcm_tls13();
|
|
476
|
+
}
|
|
477
|
+
*out_fixed_iv_len = 4;
|
|
478
|
+
} else if (cipher->algorithm_enc == SSL_AES256GCM) {
|
|
479
|
+
if (version < TLS1_3_VERSION) {
|
|
480
|
+
*out_aead = EVP_aead_aes_256_gcm_tls12();
|
|
481
|
+
} else {
|
|
482
|
+
*out_aead = EVP_aead_aes_256_gcm_tls13();
|
|
483
|
+
}
|
|
484
|
+
*out_fixed_iv_len = 4;
|
|
485
|
+
} else if (cipher->algorithm_enc == SSL_CHACHA20POLY1305) {
|
|
486
|
+
*out_aead = EVP_aead_chacha20_poly1305();
|
|
487
|
+
*out_fixed_iv_len = 12;
|
|
488
|
+
} else {
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// In TLS 1.3, the iv_len is equal to the AEAD nonce length whereas the code
|
|
493
|
+
// above computes the TLS 1.2 construction.
|
|
494
|
+
if (version >= TLS1_3_VERSION) {
|
|
495
|
+
*out_fixed_iv_len = EVP_AEAD_nonce_length(*out_aead);
|
|
496
|
+
}
|
|
497
|
+
} else if (cipher->algorithm_mac == SSL_SHA1) {
|
|
498
|
+
if (cipher->algorithm_enc == SSL_3DES) {
|
|
499
|
+
if (version == TLS1_VERSION) {
|
|
500
|
+
*out_aead = EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv();
|
|
501
|
+
*out_fixed_iv_len = 8;
|
|
502
|
+
} else {
|
|
503
|
+
*out_aead = EVP_aead_des_ede3_cbc_sha1_tls();
|
|
504
|
+
}
|
|
505
|
+
} else if (cipher->algorithm_enc == SSL_AES128) {
|
|
506
|
+
if (version == TLS1_VERSION) {
|
|
507
|
+
*out_aead = EVP_aead_aes_128_cbc_sha1_tls_implicit_iv();
|
|
508
|
+
*out_fixed_iv_len = 16;
|
|
509
|
+
} else {
|
|
510
|
+
*out_aead = EVP_aead_aes_128_cbc_sha1_tls();
|
|
511
|
+
}
|
|
512
|
+
} else if (cipher->algorithm_enc == SSL_AES256) {
|
|
513
|
+
if (version == TLS1_VERSION) {
|
|
514
|
+
*out_aead = EVP_aead_aes_256_cbc_sha1_tls_implicit_iv();
|
|
515
|
+
*out_fixed_iv_len = 16;
|
|
516
|
+
} else {
|
|
517
|
+
*out_aead = EVP_aead_aes_256_cbc_sha1_tls();
|
|
518
|
+
}
|
|
519
|
+
} else {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
*out_mac_secret_len = SHA_DIGEST_LENGTH;
|
|
524
|
+
} else if (cipher->algorithm_mac == SSL_SHA256) {
|
|
525
|
+
if (cipher->algorithm_enc == SSL_AES128) {
|
|
526
|
+
*out_aead = EVP_aead_aes_128_cbc_sha256_tls();
|
|
527
|
+
} else {
|
|
528
|
+
return false;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
*out_mac_secret_len = SHA256_DIGEST_LENGTH;
|
|
532
|
+
} else {
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const EVP_MD *ssl_get_handshake_digest(uint16_t version,
|
|
540
|
+
const SSL_CIPHER *cipher) {
|
|
541
|
+
switch (cipher->algorithm_prf) {
|
|
542
|
+
case SSL_HANDSHAKE_MAC_DEFAULT:
|
|
543
|
+
return version >= TLS1_2_VERSION ? EVP_sha256() : EVP_md5_sha1();
|
|
544
|
+
case SSL_HANDSHAKE_MAC_SHA256:
|
|
545
|
+
return EVP_sha256();
|
|
546
|
+
case SSL_HANDSHAKE_MAC_SHA384:
|
|
547
|
+
return EVP_sha384();
|
|
548
|
+
default:
|
|
549
|
+
assert(0);
|
|
550
|
+
return nullptr;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
static bool is_cipher_list_separator(char c, bool is_strict) {
|
|
555
|
+
if (c == ':') {
|
|
556
|
+
return true;
|
|
557
|
+
}
|
|
558
|
+
return !is_strict && (c == ' ' || c == ';' || c == ',');
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// rule_equals returns whether the NUL-terminated string `rule` is equal to the
|
|
562
|
+
// `buf_len` bytes at `buf`.
|
|
563
|
+
static bool rule_equals(const char *rule, const char *buf, size_t buf_len) {
|
|
564
|
+
// `strncmp` alone only checks that `buf` is a prefix of `rule`.
|
|
565
|
+
return strncmp(rule, buf, buf_len) == 0 && rule[buf_len] == '\0';
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
static void ll_append_tail(CIPHER_ORDER **head, CIPHER_ORDER *curr,
|
|
569
|
+
CIPHER_ORDER **tail) {
|
|
570
|
+
if (curr == *tail) {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
if (curr == *head) {
|
|
574
|
+
*head = curr->next;
|
|
575
|
+
}
|
|
576
|
+
if (curr->prev != nullptr) {
|
|
577
|
+
curr->prev->next = curr->next;
|
|
578
|
+
}
|
|
579
|
+
if (curr->next != nullptr) {
|
|
580
|
+
curr->next->prev = curr->prev;
|
|
581
|
+
}
|
|
582
|
+
(*tail)->next = curr;
|
|
583
|
+
curr->prev = *tail;
|
|
584
|
+
curr->next = nullptr;
|
|
585
|
+
*tail = curr;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
static void ll_append_head(CIPHER_ORDER **head, CIPHER_ORDER *curr,
|
|
589
|
+
CIPHER_ORDER **tail) {
|
|
590
|
+
if (curr == *head) {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
if (curr == *tail) {
|
|
594
|
+
*tail = curr->prev;
|
|
595
|
+
}
|
|
596
|
+
if (curr->next != nullptr) {
|
|
597
|
+
curr->next->prev = curr->prev;
|
|
598
|
+
}
|
|
599
|
+
if (curr->prev != nullptr) {
|
|
600
|
+
curr->prev->next = curr->next;
|
|
601
|
+
}
|
|
602
|
+
(*head)->prev = curr;
|
|
603
|
+
curr->next = *head;
|
|
604
|
+
curr->prev = nullptr;
|
|
605
|
+
*head = curr;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// Helper to iterate over a client cipher list and find a given cipher protocol
|
|
609
|
+
// ID. Returns the index of the cipher, if found in `cipher_list`, or returns
|
|
610
|
+
// std::nullopt if not found.
|
|
611
|
+
static std::optional<size_t> FindProtocolID(CBS *cipher_list,
|
|
612
|
+
uint16_t cipher_id) {
|
|
613
|
+
assert(CBS_len(cipher_list) % 2 == 0);
|
|
614
|
+
if (CBS_len(cipher_list) == 0) {
|
|
615
|
+
return std::nullopt;
|
|
616
|
+
}
|
|
617
|
+
size_t cur_index = 0;
|
|
618
|
+
while (CBS_len(cipher_list) > 0) {
|
|
619
|
+
uint16_t cipher_suite;
|
|
620
|
+
if (!CBS_get_u16(cipher_list, &cipher_suite)) {
|
|
621
|
+
return std::nullopt;
|
|
622
|
+
}
|
|
623
|
+
if (cipher_suite == cipher_id) {
|
|
624
|
+
return cur_index;
|
|
625
|
+
}
|
|
626
|
+
++cur_index;
|
|
627
|
+
}
|
|
628
|
+
return std::nullopt;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
bool SSLCipherPreferenceList::Init(UniquePtr<STACK_OF(SSL_CIPHER)> ciphers,
|
|
632
|
+
Array<bool> in_group_flags) {
|
|
633
|
+
if (sk_SSL_CIPHER_num(ciphers.get()) != in_group_flags.size()) {
|
|
634
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
|
635
|
+
return false;
|
|
636
|
+
}
|
|
637
|
+
// The last element has no next element to be in a group with.
|
|
638
|
+
if (!in_group_flags.empty() && in_group_flags.back()) {
|
|
639
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
|
640
|
+
return false;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
ciphers_ = std::move(ciphers);
|
|
644
|
+
in_group_flags_ = std::move(in_group_flags);
|
|
645
|
+
return true;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
bool SSLCipherPreferenceList::Init(Span<const uint16_t> cipher_ids,
|
|
649
|
+
Span<const bool> in_group_flags) {
|
|
650
|
+
if (cipher_ids.size() != in_group_flags.size()) {
|
|
651
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
UniquePtr<STACK_OF(SSL_CIPHER)> ciphers(sk_SSL_CIPHER_new_null());
|
|
656
|
+
if (!ciphers) {
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
for (uint16_t cipher_id : cipher_ids) {
|
|
660
|
+
const SSL_CIPHER *cipher = SSL_get_cipher_by_value(cipher_id);
|
|
661
|
+
if (cipher == nullptr) {
|
|
662
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_UNKNOWN_CIPHER_TYPE);
|
|
663
|
+
return false;
|
|
664
|
+
}
|
|
665
|
+
if (!sk_SSL_CIPHER_push(ciphers.get(), cipher)) {
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
Array<bool> flags;
|
|
671
|
+
if (!flags.CopyFrom(in_group_flags)) {
|
|
672
|
+
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
|
|
673
|
+
return false;
|
|
674
|
+
}
|
|
675
|
+
return Init(std::move(ciphers), std::move(flags));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
void SSLCipherPreferenceList::Reset() {
|
|
679
|
+
sk_SSL_CIPHER_zero(ciphers_.get());
|
|
680
|
+
in_group_flags_.Reset();
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
bool SSLCipherPreferenceList::CopyFrom(const SSLCipherPreferenceList &other) {
|
|
684
|
+
UniquePtr<STACK_OF(SSL_CIPHER)> other_ciphers(
|
|
685
|
+
sk_SSL_CIPHER_dup(other.ciphers()));
|
|
686
|
+
if (!other_ciphers) {
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
689
|
+
Array<bool> other_flags;
|
|
690
|
+
if (!other_flags.CopyFrom(other.in_group_flags())) {
|
|
691
|
+
return false;
|
|
692
|
+
}
|
|
693
|
+
return Init(std::move(other_ciphers), std::move(other_flags));
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
void SSLCipherPreferenceList::Remove(const SSL_CIPHER *cipher) {
|
|
697
|
+
size_t index;
|
|
698
|
+
if (!sk_SSL_CIPHER_find(ciphers_.get(), &index, cipher)) {
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
if (!in_group_flags_[index] /* last element of group */ && index > 0) {
|
|
702
|
+
in_group_flags_[index - 1] = false;
|
|
703
|
+
}
|
|
704
|
+
for (size_t i = index; i < size() - 1; ++i) {
|
|
705
|
+
in_group_flags_[i] = in_group_flags_[i + 1];
|
|
706
|
+
}
|
|
707
|
+
sk_SSL_CIPHER_delete(ciphers_.get(), index);
|
|
708
|
+
in_group_flags_.Shrink(size());
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
bool SSLCipherPreferenceList::Contains(uint16_t cipher_id) const {
|
|
712
|
+
for (const SSL_CIPHER *cipher : ciphers_.get()) {
|
|
713
|
+
if (cipher->protocol_id == cipher_id) {
|
|
714
|
+
return true;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
return false;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
const SSL_CIPHER *SSLCipherPreferenceList::ChooseCipher(
|
|
721
|
+
const CBS *client_cipher_list, bool prioritize_client_pref,
|
|
722
|
+
uint16_t version, uint32_t mask_k, uint32_t mask_a) const {
|
|
723
|
+
if (CBS_len(client_cipher_list) % 2 != 0) {
|
|
724
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
|
|
725
|
+
return nullptr;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Index of the best matching cipher suite found so far, indexed into
|
|
729
|
+
// `client_cipher_list`.
|
|
730
|
+
std::optional<size_t> best_index = std::nullopt;
|
|
731
|
+
const SSL_CIPHER *best_cipher = nullptr;
|
|
732
|
+
|
|
733
|
+
// Iterate over our list (the server preference list) and check for each
|
|
734
|
+
// cipher in the client's list.
|
|
735
|
+
for (size_t i = 0; i < size(); ++i) {
|
|
736
|
+
const SSL_CIPHER *const c = sk_SSL_CIPHER_value(ciphers_.get(), i);
|
|
737
|
+
bool in_group = in_group_flags_[i];
|
|
738
|
+
// If prioritizing the client preference list, treat all of the server's
|
|
739
|
+
// allowed ciphers as a single equipreference group so that the client's
|
|
740
|
+
// preferences dictate the choice.
|
|
741
|
+
if (prioritize_client_pref) {
|
|
742
|
+
in_group = (i < size() - 1);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
if (version >= SSL_CIPHER_get_min_version(c) &&
|
|
746
|
+
version <= SSL_CIPHER_get_max_version(c) &&
|
|
747
|
+
(c->algorithm_mkey & mask_k) != 0 &&
|
|
748
|
+
(c->algorithm_auth & mask_a) != 0) {
|
|
749
|
+
CBS copy = *client_cipher_list;
|
|
750
|
+
std::optional<size_t> client_list_index =
|
|
751
|
+
FindProtocolID(©, c->protocol_id);
|
|
752
|
+
// Within a group, the client's preference order applies.
|
|
753
|
+
if (client_list_index.has_value() &&
|
|
754
|
+
(!best_index.has_value() || *best_index > *client_list_index)) {
|
|
755
|
+
best_index = *client_list_index;
|
|
756
|
+
best_cipher = c;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
// Always evaluate a whole equipreference group.
|
|
761
|
+
if (in_group) {
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
// We are about to leave a (possibly singleton) group. If we have a match,
|
|
765
|
+
// return it because we will only see less-preferred ciphers if we keep
|
|
766
|
+
// going.
|
|
767
|
+
if (best_index.has_value()) {
|
|
768
|
+
assert(best_cipher != nullptr);
|
|
769
|
+
return best_cipher;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
// The final cipher suite must end a group, so, if we found a match, we must
|
|
774
|
+
// have returned early above.
|
|
775
|
+
assert(!best_index.has_value());
|
|
776
|
+
assert(best_cipher == nullptr);
|
|
777
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_NO_SHARED_CIPHER);
|
|
778
|
+
return nullptr;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
bool ssl_cipher_is_deprecated(const SSL_CIPHER *cipher) {
|
|
782
|
+
return cipher->protocol_id ==
|
|
783
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 ||
|
|
784
|
+
cipher->protocol_id == SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256 ||
|
|
785
|
+
cipher->algorithm_enc == SSL_3DES;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// ssl_cipher_apply_rule applies the rule type `rule` to ciphers matching its
|
|
789
|
+
// parameters in the linked list from `*head_p` to `*tail_p`. It writes the new
|
|
790
|
+
// head and tail of the list to `*head_p` and `*tail_p`, respectively.
|
|
791
|
+
//
|
|
792
|
+
// - If `cipher_id` is non-zero, only that cipher is selected.
|
|
793
|
+
// - Otherwise, if `strength_bits` is non-negative, it selects ciphers
|
|
794
|
+
// of that strength.
|
|
795
|
+
// - Otherwise, `alias` must be non-null. It selects ciphers that matches
|
|
796
|
+
// `*alias`.
|
|
797
|
+
static void ssl_cipher_apply_rule(uint16_t cipher_id, const CIPHER_ALIAS *alias,
|
|
798
|
+
int rule, int strength_bits, bool in_group,
|
|
799
|
+
CIPHER_ORDER **head_p,
|
|
800
|
+
CIPHER_ORDER **tail_p) {
|
|
801
|
+
CIPHER_ORDER *head, *tail, *curr, *next, *last;
|
|
802
|
+
const SSL_CIPHER *cp;
|
|
803
|
+
bool reverse = false;
|
|
804
|
+
|
|
805
|
+
if (cipher_id == 0 && strength_bits == -1 && alias->min_version == 0 &&
|
|
806
|
+
(alias->algorithm_mkey == 0 || alias->algorithm_auth == 0 ||
|
|
807
|
+
alias->algorithm_enc == 0 || alias->algorithm_mac == 0)) {
|
|
808
|
+
// The rule matches nothing, so bail early.
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
if (rule == CIPHER_DEL) {
|
|
813
|
+
// needed to maintain sorting between currently deleted ciphers
|
|
814
|
+
reverse = true;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
head = *head_p;
|
|
818
|
+
tail = *tail_p;
|
|
819
|
+
|
|
820
|
+
if (reverse) {
|
|
821
|
+
next = tail;
|
|
822
|
+
last = head;
|
|
823
|
+
} else {
|
|
824
|
+
next = head;
|
|
825
|
+
last = tail;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
curr = nullptr;
|
|
829
|
+
for (;;) {
|
|
830
|
+
if (curr == last) {
|
|
831
|
+
break;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
curr = next;
|
|
835
|
+
if (curr == nullptr) {
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
next = reverse ? curr->prev : curr->next;
|
|
840
|
+
cp = curr->cipher;
|
|
841
|
+
|
|
842
|
+
// Selection criteria is either a specific cipher, the value of
|
|
843
|
+
// `strength_bits`, or the algorithms used.
|
|
844
|
+
if (cipher_id != 0) {
|
|
845
|
+
if (cipher_id != cp->protocol_id) {
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
} else if (strength_bits >= 0) {
|
|
849
|
+
if (strength_bits != SSL_CIPHER_get_bits(cp, nullptr)) {
|
|
850
|
+
continue;
|
|
851
|
+
}
|
|
852
|
+
} else {
|
|
853
|
+
if (!(alias->algorithm_mkey & cp->algorithm_mkey) ||
|
|
854
|
+
!(alias->algorithm_auth & cp->algorithm_auth) ||
|
|
855
|
+
!(alias->algorithm_enc & cp->algorithm_enc) ||
|
|
856
|
+
!(alias->algorithm_mac & cp->algorithm_mac) ||
|
|
857
|
+
(alias->min_version != 0 &&
|
|
858
|
+
SSL_CIPHER_get_min_version(cp) != alias->min_version) ||
|
|
859
|
+
(!alias->include_deprecated && ssl_cipher_is_deprecated(cp))) {
|
|
860
|
+
continue;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
// add the cipher if it has not been added yet.
|
|
865
|
+
if (rule == CIPHER_ADD) {
|
|
866
|
+
// reverse == false
|
|
867
|
+
if (!curr->active) {
|
|
868
|
+
ll_append_tail(&head, curr, &tail);
|
|
869
|
+
curr->active = true;
|
|
870
|
+
curr->in_group = in_group;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// Move the added cipher to this location
|
|
875
|
+
else if (rule == CIPHER_ORD) {
|
|
876
|
+
// reverse == false
|
|
877
|
+
if (curr->active) {
|
|
878
|
+
ll_append_tail(&head, curr, &tail);
|
|
879
|
+
curr->in_group = false;
|
|
880
|
+
}
|
|
881
|
+
} else if (rule == CIPHER_DEL) {
|
|
882
|
+
// reverse == true
|
|
883
|
+
if (curr->active) {
|
|
884
|
+
// most recently deleted ciphersuites get best positions
|
|
885
|
+
// for any future CIPHER_ADD (note that the CIPHER_DEL loop
|
|
886
|
+
// works in reverse to maintain the order)
|
|
887
|
+
ll_append_head(&head, curr, &tail);
|
|
888
|
+
curr->active = false;
|
|
889
|
+
curr->in_group = false;
|
|
890
|
+
}
|
|
891
|
+
} else if (rule == CIPHER_KILL) {
|
|
892
|
+
// reverse == false
|
|
893
|
+
if (head == curr) {
|
|
894
|
+
head = curr->next;
|
|
895
|
+
} else {
|
|
896
|
+
curr->prev->next = curr->next;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
if (tail == curr) {
|
|
900
|
+
tail = curr->prev;
|
|
901
|
+
}
|
|
902
|
+
curr->active = false;
|
|
903
|
+
if (curr->next != nullptr) {
|
|
904
|
+
curr->next->prev = curr->prev;
|
|
905
|
+
}
|
|
906
|
+
if (curr->prev != nullptr) {
|
|
907
|
+
curr->prev->next = curr->next;
|
|
908
|
+
}
|
|
909
|
+
curr->next = nullptr;
|
|
910
|
+
curr->prev = nullptr;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
*head_p = head;
|
|
915
|
+
*tail_p = tail;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
static bool ssl_cipher_strength_sort(CIPHER_ORDER **head_p,
|
|
919
|
+
CIPHER_ORDER **tail_p) {
|
|
920
|
+
// This routine sorts the ciphers with descending strength. The sorting must
|
|
921
|
+
// keep the pre-sorted sequence, so we apply the normal sorting routine as
|
|
922
|
+
// '+' movement to the end of the list.
|
|
923
|
+
int max_strength_bits = 0;
|
|
924
|
+
CIPHER_ORDER *curr = *head_p;
|
|
925
|
+
while (curr != nullptr) {
|
|
926
|
+
if (curr->active &&
|
|
927
|
+
SSL_CIPHER_get_bits(curr->cipher, nullptr) > max_strength_bits) {
|
|
928
|
+
max_strength_bits = SSL_CIPHER_get_bits(curr->cipher, nullptr);
|
|
929
|
+
}
|
|
930
|
+
curr = curr->next;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
Array<int> number_uses;
|
|
934
|
+
if (!number_uses.Init(max_strength_bits + 1)) {
|
|
935
|
+
return false;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
// Now find the strength_bits values actually used.
|
|
939
|
+
curr = *head_p;
|
|
940
|
+
while (curr != nullptr) {
|
|
941
|
+
if (curr->active) {
|
|
942
|
+
number_uses[SSL_CIPHER_get_bits(curr->cipher, nullptr)]++;
|
|
943
|
+
}
|
|
944
|
+
curr = curr->next;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
// Go through the list of used strength_bits values in descending order.
|
|
948
|
+
for (int i = max_strength_bits; i >= 0; i--) {
|
|
949
|
+
if (number_uses[i] > 0) {
|
|
950
|
+
ssl_cipher_apply_rule(/*cipher_id=*/0, /*alias=*/nullptr, CIPHER_ORD, i,
|
|
951
|
+
false, head_p, tail_p);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
return true;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
static bool ssl_cipher_process_rulestr(const char *rule_str,
|
|
959
|
+
CIPHER_ORDER **head_p,
|
|
960
|
+
CIPHER_ORDER **tail_p, bool strict) {
|
|
961
|
+
const char *l, *buf;
|
|
962
|
+
bool in_group = false, has_group = false;
|
|
963
|
+
size_t buf_len;
|
|
964
|
+
char ch;
|
|
965
|
+
|
|
966
|
+
l = rule_str;
|
|
967
|
+
for (;;) {
|
|
968
|
+
ch = *l;
|
|
969
|
+
|
|
970
|
+
if (ch == '\0') {
|
|
971
|
+
break; // done
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
int rule;
|
|
975
|
+
if (in_group) {
|
|
976
|
+
if (ch == ']') {
|
|
977
|
+
if (*tail_p) {
|
|
978
|
+
(*tail_p)->in_group = false;
|
|
979
|
+
}
|
|
980
|
+
in_group = false;
|
|
981
|
+
l++;
|
|
982
|
+
continue;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
if (ch == '|') {
|
|
986
|
+
rule = CIPHER_ADD;
|
|
987
|
+
l++;
|
|
988
|
+
continue;
|
|
989
|
+
} else if (!OPENSSL_isalnum(ch)) {
|
|
990
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_UNEXPECTED_OPERATOR_IN_GROUP);
|
|
991
|
+
return false;
|
|
992
|
+
} else {
|
|
993
|
+
rule = CIPHER_ADD;
|
|
994
|
+
}
|
|
995
|
+
} else if (ch == '-') {
|
|
996
|
+
rule = CIPHER_DEL;
|
|
997
|
+
l++;
|
|
998
|
+
} else if (ch == '+') {
|
|
999
|
+
rule = CIPHER_ORD;
|
|
1000
|
+
l++;
|
|
1001
|
+
} else if (ch == '!') {
|
|
1002
|
+
rule = CIPHER_KILL;
|
|
1003
|
+
l++;
|
|
1004
|
+
} else if (ch == '@') {
|
|
1005
|
+
rule = CIPHER_SPECIAL;
|
|
1006
|
+
l++;
|
|
1007
|
+
} else if (ch == '[') {
|
|
1008
|
+
assert(!in_group);
|
|
1009
|
+
in_group = true;
|
|
1010
|
+
has_group = true;
|
|
1011
|
+
l++;
|
|
1012
|
+
continue;
|
|
1013
|
+
} else {
|
|
1014
|
+
rule = CIPHER_ADD;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
// If preference groups are enabled, the only legal operator is +.
|
|
1018
|
+
// Otherwise the in_group bits will get mixed up.
|
|
1019
|
+
if (has_group && rule != CIPHER_ADD) {
|
|
1020
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS);
|
|
1021
|
+
return false;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
if (is_cipher_list_separator(ch, strict)) {
|
|
1025
|
+
l++;
|
|
1026
|
+
continue;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
bool multi = false;
|
|
1030
|
+
uint16_t cipher_id = 0;
|
|
1031
|
+
CIPHER_ALIAS alias;
|
|
1032
|
+
bool skip_rule = false;
|
|
1033
|
+
|
|
1034
|
+
// When adding, exclude deprecated ciphers by default.
|
|
1035
|
+
alias.include_deprecated = rule != CIPHER_ADD;
|
|
1036
|
+
|
|
1037
|
+
for (;;) {
|
|
1038
|
+
ch = *l;
|
|
1039
|
+
buf = l;
|
|
1040
|
+
buf_len = 0;
|
|
1041
|
+
while (OPENSSL_isalnum(ch) || ch == '-' || ch == '.' || ch == '_') {
|
|
1042
|
+
ch = *(++l);
|
|
1043
|
+
buf_len++;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
if (buf_len == 0) {
|
|
1047
|
+
// We hit something we cannot deal with, it is no command or separator
|
|
1048
|
+
// nor alphanumeric, so we call this an error.
|
|
1049
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_INVALID_COMMAND);
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
if (rule == CIPHER_SPECIAL) {
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
// Look for a matching exact cipher. These aren't allowed in multipart
|
|
1058
|
+
// rules.
|
|
1059
|
+
if (!multi && ch != '+') {
|
|
1060
|
+
for (const SSL_CIPHER &cipher : kCiphers) {
|
|
1061
|
+
if (rule_equals(cipher.name, buf, buf_len) ||
|
|
1062
|
+
rule_equals(cipher.standard_name, buf, buf_len)) {
|
|
1063
|
+
cipher_id = cipher.protocol_id;
|
|
1064
|
+
break;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
if (cipher_id == 0) {
|
|
1069
|
+
// If not an exact cipher, look for a matching cipher alias.
|
|
1070
|
+
const auto found =
|
|
1071
|
+
std::find_if(std::begin(kCipherAliases), std::end(kCipherAliases),
|
|
1072
|
+
[buf, buf_len](const CIPHER_ALIAS &cipher_alias) {
|
|
1073
|
+
return rule_equals(cipher_alias.name, buf, buf_len);
|
|
1074
|
+
});
|
|
1075
|
+
if (found == std::end(kCipherAliases)) {
|
|
1076
|
+
skip_rule = true;
|
|
1077
|
+
if (strict) {
|
|
1078
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_INVALID_COMMAND);
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
} else {
|
|
1082
|
+
alias.algorithm_mkey &= found->algorithm_mkey;
|
|
1083
|
+
alias.algorithm_auth &= found->algorithm_auth;
|
|
1084
|
+
alias.algorithm_enc &= found->algorithm_enc;
|
|
1085
|
+
alias.algorithm_mac &= found->algorithm_mac;
|
|
1086
|
+
|
|
1087
|
+
// When specifying a combination of aliases, if any aliases
|
|
1088
|
+
// enables deprecated ciphers, deprecated ciphers are included. This
|
|
1089
|
+
// is slightly different from the bitmasks in that adding aliases
|
|
1090
|
+
// can increase the set of matched ciphers. This is so that an alias
|
|
1091
|
+
// like "RSA" will only specify AES-based RSA ciphers, but
|
|
1092
|
+
// "RSA+3DES" will still specify 3DES.
|
|
1093
|
+
alias.include_deprecated |= found->include_deprecated;
|
|
1094
|
+
|
|
1095
|
+
if (found->min_version != 0) {
|
|
1096
|
+
if (alias.min_version != 0 &&
|
|
1097
|
+
alias.min_version != found->min_version) {
|
|
1098
|
+
skip_rule = true;
|
|
1099
|
+
} else {
|
|
1100
|
+
alias.min_version = found->min_version;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
// Check for a multipart rule.
|
|
1107
|
+
if (ch != '+') {
|
|
1108
|
+
break;
|
|
1109
|
+
}
|
|
1110
|
+
l++;
|
|
1111
|
+
multi = true;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
// Ok, we have the rule, now apply it.
|
|
1115
|
+
if (rule == CIPHER_SPECIAL) {
|
|
1116
|
+
if (buf_len != 8 || strncmp(buf, "STRENGTH", 8) != 0) {
|
|
1117
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_INVALID_COMMAND);
|
|
1118
|
+
return false;
|
|
1119
|
+
}
|
|
1120
|
+
if (!ssl_cipher_strength_sort(head_p, tail_p)) {
|
|
1121
|
+
return false;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
// We do not support any "multi" options together with "@", so throw away
|
|
1125
|
+
// the rest of the command, if any left, until end or ':' is found.
|
|
1126
|
+
while (*l != '\0' && !is_cipher_list_separator(*l, strict)) {
|
|
1127
|
+
l++;
|
|
1128
|
+
}
|
|
1129
|
+
} else if (!skip_rule) {
|
|
1130
|
+
ssl_cipher_apply_rule(cipher_id, &alias, rule, -1, in_group, head_p,
|
|
1131
|
+
tail_p);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
if (in_group) {
|
|
1136
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_INVALID_COMMAND);
|
|
1137
|
+
return false;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
return true;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
bool ssl_create_cipher_list(UniquePtr<SSLCipherPreferenceList> *out_cipher_list,
|
|
1144
|
+
const char *rule_str, bool strict) {
|
|
1145
|
+
// Return with error if nothing to do.
|
|
1146
|
+
if (rule_str == nullptr || out_cipher_list == nullptr) {
|
|
1147
|
+
return false;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
// We prefer ECDHE ciphers over non-PFS ciphers. Then we prefer AEAD over
|
|
1151
|
+
// non-AEAD.
|
|
1152
|
+
static const uint16_t kAESCiphers[] = {
|
|
1153
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
1154
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
|
1155
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
1156
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
|
1157
|
+
};
|
|
1158
|
+
static const uint16_t kChaChaCiphers[] = {
|
|
1159
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
1160
|
+
SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
1161
|
+
SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
1162
|
+
};
|
|
1163
|
+
static const uint16_t kLegacyCiphers[] = {
|
|
1164
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
|
1165
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
|
1166
|
+
SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA,
|
|
1167
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
|
|
1168
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
|
1169
|
+
SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA,
|
|
1170
|
+
SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
1171
|
+
SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
|
|
1172
|
+
SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256,
|
|
1173
|
+
SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384,
|
|
1174
|
+
SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA,
|
|
1175
|
+
SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA,
|
|
1176
|
+
SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA,
|
|
1177
|
+
SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA,
|
|
1178
|
+
SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA,
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
// Set up a linked list of ciphers.
|
|
1182
|
+
CIPHER_ORDER co_list[std::size(kAESCiphers) + std::size(kChaChaCiphers) +
|
|
1183
|
+
std::size(kLegacyCiphers)];
|
|
1184
|
+
for (size_t i = 0; i < std::size(co_list); i++) {
|
|
1185
|
+
co_list[i].next = i + 1 < std::size(co_list) ? &co_list[i + 1] : nullptr;
|
|
1186
|
+
co_list[i].prev = i == 0 ? nullptr : &co_list[i - 1];
|
|
1187
|
+
co_list[i].active = false;
|
|
1188
|
+
co_list[i].in_group = false;
|
|
1189
|
+
}
|
|
1190
|
+
CIPHER_ORDER *head = &co_list[0];
|
|
1191
|
+
CIPHER_ORDER *tail = &co_list[std::size(co_list) - 1];
|
|
1192
|
+
|
|
1193
|
+
// Order AES ciphers vs ChaCha ciphers based on whether we have AES hardware.
|
|
1194
|
+
//
|
|
1195
|
+
// TODO(crbug.com/boringssl/29): We should also set up equipreference groups
|
|
1196
|
+
// as a server.
|
|
1197
|
+
size_t num = 0;
|
|
1198
|
+
const bool has_aes_hw = EVP_has_aes_hardware();
|
|
1199
|
+
if (has_aes_hw) {
|
|
1200
|
+
for (uint16_t id : kAESCiphers) {
|
|
1201
|
+
co_list[num++].cipher = SSL_get_cipher_by_value(id);
|
|
1202
|
+
assert(co_list[num - 1].cipher != nullptr);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
for (uint16_t id : kChaChaCiphers) {
|
|
1206
|
+
co_list[num++].cipher = SSL_get_cipher_by_value(id);
|
|
1207
|
+
assert(co_list[num - 1].cipher != nullptr);
|
|
1208
|
+
}
|
|
1209
|
+
if (!has_aes_hw) {
|
|
1210
|
+
for (uint16_t id : kAESCiphers) {
|
|
1211
|
+
co_list[num++].cipher = SSL_get_cipher_by_value(id);
|
|
1212
|
+
assert(co_list[num - 1].cipher != nullptr);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
for (uint16_t id : kLegacyCiphers) {
|
|
1216
|
+
co_list[num++].cipher = SSL_get_cipher_by_value(id);
|
|
1217
|
+
assert(co_list[num - 1].cipher != nullptr);
|
|
1218
|
+
}
|
|
1219
|
+
assert(num == std::size(co_list));
|
|
1220
|
+
static_assert(std::size(co_list) + NumTLS13Ciphers() == std::size(kCiphers),
|
|
1221
|
+
"Not all ciphers are included in the cipher order");
|
|
1222
|
+
|
|
1223
|
+
// If the rule_string begins with DEFAULT, apply the default rule before
|
|
1224
|
+
// using the (possibly available) additional rules.
|
|
1225
|
+
const char *rule_p = rule_str;
|
|
1226
|
+
if (strncmp(rule_str, "DEFAULT", 7) == 0) {
|
|
1227
|
+
if (!ssl_cipher_process_rulestr(SSL_DEFAULT_CIPHER_LIST, &head, &tail,
|
|
1228
|
+
strict)) {
|
|
1229
|
+
return false;
|
|
1230
|
+
}
|
|
1231
|
+
rule_p += 7;
|
|
1232
|
+
if (*rule_p == ':') {
|
|
1233
|
+
rule_p++;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
if (*rule_p != '\0' &&
|
|
1238
|
+
!ssl_cipher_process_rulestr(rule_p, &head, &tail, strict)) {
|
|
1239
|
+
return false;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
// Allocate new "cipherstack" for the result, return with error
|
|
1243
|
+
// if we cannot get one.
|
|
1244
|
+
UniquePtr<STACK_OF(SSL_CIPHER)> cipherstack(sk_SSL_CIPHER_new_null());
|
|
1245
|
+
Array<bool> in_group_flags;
|
|
1246
|
+
if (cipherstack == nullptr ||
|
|
1247
|
+
!in_group_flags.InitForOverwrite(std::size(kCiphers))) {
|
|
1248
|
+
return false;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// The cipher selection for the list is done. The ciphers are added
|
|
1252
|
+
// to the resulting precedence to the STACK_OF(SSL_CIPHER).
|
|
1253
|
+
size_t num_in_group_flags = 0;
|
|
1254
|
+
for (CIPHER_ORDER *curr = head; curr != nullptr; curr = curr->next) {
|
|
1255
|
+
if (curr->active) {
|
|
1256
|
+
if (!sk_SSL_CIPHER_push(cipherstack.get(), curr->cipher)) {
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
in_group_flags[num_in_group_flags++] = curr->in_group;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
in_group_flags.Shrink(num_in_group_flags);
|
|
1263
|
+
|
|
1264
|
+
UniquePtr<SSLCipherPreferenceList> pref_list =
|
|
1265
|
+
MakeUnique<SSLCipherPreferenceList>();
|
|
1266
|
+
if (!pref_list ||
|
|
1267
|
+
!pref_list->Init(std::move(cipherstack), std::move(in_group_flags))) {
|
|
1268
|
+
return false;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
*out_cipher_list = std::move(pref_list);
|
|
1272
|
+
|
|
1273
|
+
// Configuring an empty cipher list is an error but still updates the
|
|
1274
|
+
// output.
|
|
1275
|
+
if (sk_SSL_CIPHER_num((*out_cipher_list)->ciphers()) == 0) {
|
|
1276
|
+
OPENSSL_PUT_ERROR(SSL, SSL_R_NO_CIPHER_MATCH);
|
|
1277
|
+
return false;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
return true;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
bool ssl_create_default_tls13_cipher_list(
|
|
1284
|
+
SSLCipherPreferenceList *out_cipher_list) {
|
|
1285
|
+
// If we have AES hardware:
|
|
1286
|
+
// For a client: AES-128 > AES-256 > ChaCha20.
|
|
1287
|
+
// For a server: (AES-128 | AES-256 | ChaCha20), i.e. defer to client
|
|
1288
|
+
// preference.
|
|
1289
|
+
static const uint16_t kCiphersAESHardware[] = {
|
|
1290
|
+
SSL_CIPHER_AES_128_GCM_SHA256,
|
|
1291
|
+
SSL_CIPHER_AES_256_GCM_SHA384,
|
|
1292
|
+
SSL_CIPHER_CHACHA20_POLY1305_SHA256,
|
|
1293
|
+
};
|
|
1294
|
+
static const bool kInGroupFlagsAESHardware[] = {
|
|
1295
|
+
true,
|
|
1296
|
+
true,
|
|
1297
|
+
false,
|
|
1298
|
+
};
|
|
1299
|
+
// If we do not have AES hardware:
|
|
1300
|
+
// For a client: ChaCha20 > AES-128 > AES-256.
|
|
1301
|
+
// For a server: ChaCha20 > (AES-128 | AES-256).
|
|
1302
|
+
static const uint16_t kCiphersNoAESHardware[] = {
|
|
1303
|
+
SSL_CIPHER_CHACHA20_POLY1305_SHA256,
|
|
1304
|
+
SSL_CIPHER_AES_128_GCM_SHA256,
|
|
1305
|
+
SSL_CIPHER_AES_256_GCM_SHA384,
|
|
1306
|
+
};
|
|
1307
|
+
static const bool kInGroupFlagsNoAESHardware[] = {
|
|
1308
|
+
false,
|
|
1309
|
+
true,
|
|
1310
|
+
false,
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
Span<const uint16_t> ciphers = EVP_has_aes_hardware()
|
|
1314
|
+
? Span(kCiphersAESHardware)
|
|
1315
|
+
: Span(kCiphersNoAESHardware);
|
|
1316
|
+
Span<const bool> in_group_flags = EVP_has_aes_hardware()
|
|
1317
|
+
? Span(kInGroupFlagsAESHardware)
|
|
1318
|
+
: Span(kInGroupFlagsNoAESHardware);
|
|
1319
|
+
|
|
1320
|
+
out_cipher_list->Reset();
|
|
1321
|
+
return out_cipher_list->Init(ciphers, in_group_flags);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
uint32_t ssl_cipher_auth_mask_for_key(const EVP_PKEY *key, bool sign_ok) {
|
|
1325
|
+
switch (EVP_PKEY_id(key)) {
|
|
1326
|
+
case EVP_PKEY_RSA:
|
|
1327
|
+
return sign_ok ? (SSL_aRSA_SIGN | SSL_aRSA_DECRYPT) : SSL_aRSA_DECRYPT;
|
|
1328
|
+
case EVP_PKEY_EC:
|
|
1329
|
+
case EVP_PKEY_ED25519:
|
|
1330
|
+
// Ed25519 keys in TLS 1.2 repurpose the ECDSA ciphers.
|
|
1331
|
+
return sign_ok ? SSL_aECDSA : 0;
|
|
1332
|
+
default:
|
|
1333
|
+
return 0;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
bool ssl_cipher_uses_certificate_auth(const SSL_CIPHER *cipher) {
|
|
1338
|
+
return (cipher->algorithm_auth & SSL_aCERT) != 0;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
bool ssl_cipher_requires_server_key_exchange(const SSL_CIPHER *cipher) {
|
|
1342
|
+
// Ephemeral Diffie-Hellman key exchanges require a ServerKeyExchange. It is
|
|
1343
|
+
// optional or omitted in all others.
|
|
1344
|
+
return (cipher->algorithm_mkey & SSL_kECDHE) != 0;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
size_t ssl_cipher_get_record_split_len(const SSL_CIPHER *cipher) {
|
|
1348
|
+
size_t block_size;
|
|
1349
|
+
switch (cipher->algorithm_enc) {
|
|
1350
|
+
case SSL_3DES:
|
|
1351
|
+
block_size = 8;
|
|
1352
|
+
break;
|
|
1353
|
+
case SSL_AES128:
|
|
1354
|
+
case SSL_AES256:
|
|
1355
|
+
block_size = 16;
|
|
1356
|
+
break;
|
|
1357
|
+
default:
|
|
1358
|
+
return 0;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
// All supported TLS 1.0 ciphers use SHA-1.
|
|
1362
|
+
assert(cipher->algorithm_mac == SSL_SHA1);
|
|
1363
|
+
size_t ret = 1 + SHA_DIGEST_LENGTH;
|
|
1364
|
+
ret += block_size - (ret % block_size);
|
|
1365
|
+
return ret;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
BSSL_NAMESPACE_END
|
|
1369
|
+
|
|
1370
|
+
using namespace bssl;
|
|
1371
|
+
|
|
1372
|
+
static constexpr int ssl_cipher_id_cmp(const SSL_CIPHER *a,
|
|
1373
|
+
const SSL_CIPHER *b) {
|
|
1374
|
+
if (a->protocol_id > b->protocol_id) {
|
|
1375
|
+
return 1;
|
|
1376
|
+
}
|
|
1377
|
+
if (a->protocol_id < b->protocol_id) {
|
|
1378
|
+
return -1;
|
|
1379
|
+
}
|
|
1380
|
+
return 0;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
static int ssl_cipher_id_cmp_void(const void *in_a, const void *in_b) {
|
|
1384
|
+
return ssl_cipher_id_cmp(reinterpret_cast<const SSL_CIPHER *>(in_a),
|
|
1385
|
+
reinterpret_cast<const SSL_CIPHER *>(in_b));
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
template <size_t N>
|
|
1389
|
+
static constexpr bool ssl_ciphers_sorted(const SSL_CIPHER (&ciphers)[N]) {
|
|
1390
|
+
for (size_t i = 1; i < N; i++) {
|
|
1391
|
+
if (ssl_cipher_id_cmp(&ciphers[i - 1], &ciphers[i]) >= 0) {
|
|
1392
|
+
return false;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
return true;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
static_assert(ssl_ciphers_sorted(kCiphers),
|
|
1399
|
+
"Ciphers are not sorted, bsearch won't work");
|
|
1400
|
+
|
|
1401
|
+
const SSL_CIPHER *SSL_get_cipher_by_value(uint16_t value) {
|
|
1402
|
+
SSL_CIPHER c;
|
|
1403
|
+
c.protocol_id = value;
|
|
1404
|
+
return reinterpret_cast<const SSL_CIPHER *>(
|
|
1405
|
+
bsearch(&c, kCiphers, std::size(kCiphers), sizeof(SSL_CIPHER),
|
|
1406
|
+
ssl_cipher_id_cmp_void));
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *cipher) {
|
|
1410
|
+
// Historically, OpenSSL added a leading 0x03 byte to cipher IDs, to
|
|
1411
|
+
// distinguish between SSL 2.0 and SSL 3.0.
|
|
1412
|
+
return cipher->protocol_id | 0x03000000;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *cipher) {
|
|
1416
|
+
return cipher->protocol_id;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
int SSL_CIPHER_is_aead(const SSL_CIPHER *cipher) {
|
|
1420
|
+
return (cipher->algorithm_mac & SSL_AEAD) != 0;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *cipher) {
|
|
1424
|
+
switch (cipher->algorithm_enc) {
|
|
1425
|
+
case SSL_3DES:
|
|
1426
|
+
return NID_des_ede3_cbc;
|
|
1427
|
+
case SSL_AES128:
|
|
1428
|
+
return NID_aes_128_cbc;
|
|
1429
|
+
case SSL_AES256:
|
|
1430
|
+
return NID_aes_256_cbc;
|
|
1431
|
+
case SSL_AES128GCM:
|
|
1432
|
+
return NID_aes_128_gcm;
|
|
1433
|
+
case SSL_AES256GCM:
|
|
1434
|
+
return NID_aes_256_gcm;
|
|
1435
|
+
case SSL_CHACHA20POLY1305:
|
|
1436
|
+
return NID_chacha20_poly1305;
|
|
1437
|
+
}
|
|
1438
|
+
assert(0);
|
|
1439
|
+
return NID_undef;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *cipher) {
|
|
1443
|
+
switch (cipher->algorithm_mac) {
|
|
1444
|
+
case SSL_AEAD:
|
|
1445
|
+
return NID_undef;
|
|
1446
|
+
case SSL_SHA1:
|
|
1447
|
+
return NID_sha1;
|
|
1448
|
+
case SSL_SHA256:
|
|
1449
|
+
return NID_sha256;
|
|
1450
|
+
}
|
|
1451
|
+
assert(0);
|
|
1452
|
+
return NID_undef;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *cipher) {
|
|
1456
|
+
switch (cipher->algorithm_mkey) {
|
|
1457
|
+
case SSL_kRSA:
|
|
1458
|
+
return NID_kx_rsa;
|
|
1459
|
+
case SSL_kECDHE:
|
|
1460
|
+
return NID_kx_ecdhe;
|
|
1461
|
+
case SSL_kPSK:
|
|
1462
|
+
return NID_kx_psk;
|
|
1463
|
+
case SSL_kGENERIC:
|
|
1464
|
+
return NID_kx_any;
|
|
1465
|
+
}
|
|
1466
|
+
assert(0);
|
|
1467
|
+
return NID_undef;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *cipher) {
|
|
1471
|
+
switch (cipher->algorithm_auth) {
|
|
1472
|
+
case SSL_aRSA_DECRYPT:
|
|
1473
|
+
case SSL_aRSA_SIGN:
|
|
1474
|
+
return NID_auth_rsa;
|
|
1475
|
+
case SSL_aECDSA:
|
|
1476
|
+
return NID_auth_ecdsa;
|
|
1477
|
+
case SSL_aPSK:
|
|
1478
|
+
return NID_auth_psk;
|
|
1479
|
+
case SSL_aGENERIC:
|
|
1480
|
+
return NID_auth_any;
|
|
1481
|
+
}
|
|
1482
|
+
assert(0);
|
|
1483
|
+
return NID_undef;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *cipher) {
|
|
1487
|
+
switch (cipher->algorithm_prf) {
|
|
1488
|
+
case SSL_HANDSHAKE_MAC_DEFAULT:
|
|
1489
|
+
return EVP_md5_sha1();
|
|
1490
|
+
case SSL_HANDSHAKE_MAC_SHA256:
|
|
1491
|
+
return EVP_sha256();
|
|
1492
|
+
case SSL_HANDSHAKE_MAC_SHA384:
|
|
1493
|
+
return EVP_sha384();
|
|
1494
|
+
}
|
|
1495
|
+
assert(0);
|
|
1496
|
+
return nullptr;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
int SSL_CIPHER_get_prf_nid(const SSL_CIPHER *cipher) {
|
|
1500
|
+
const EVP_MD *md = SSL_CIPHER_get_handshake_digest(cipher);
|
|
1501
|
+
if (md == nullptr) {
|
|
1502
|
+
return NID_undef;
|
|
1503
|
+
}
|
|
1504
|
+
return EVP_MD_nid(md);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
int SSL_CIPHER_is_block_cipher(const SSL_CIPHER *cipher) {
|
|
1508
|
+
return cipher->algorithm_mac != SSL_AEAD;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
uint16_t SSL_CIPHER_get_min_version(const SSL_CIPHER *cipher) {
|
|
1512
|
+
if (cipher->algorithm_mkey == SSL_kGENERIC ||
|
|
1513
|
+
cipher->algorithm_auth == SSL_aGENERIC) {
|
|
1514
|
+
return TLS1_3_VERSION;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
if (cipher->algorithm_prf != SSL_HANDSHAKE_MAC_DEFAULT) {
|
|
1518
|
+
// Cipher suites before TLS 1.2 use the default PRF, while all those added
|
|
1519
|
+
// afterwards specify a particular hash.
|
|
1520
|
+
return TLS1_2_VERSION;
|
|
1521
|
+
}
|
|
1522
|
+
return TLS1_VERSION;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
uint16_t SSL_CIPHER_get_max_version(const SSL_CIPHER *cipher) {
|
|
1526
|
+
if (cipher->algorithm_mkey == SSL_kGENERIC ||
|
|
1527
|
+
cipher->algorithm_auth == SSL_aGENERIC) {
|
|
1528
|
+
return TLS1_3_VERSION;
|
|
1529
|
+
}
|
|
1530
|
+
return TLS1_2_VERSION;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
static const char *const kUnknownCipher = "(NONE)";
|
|
1534
|
+
|
|
1535
|
+
// return the actual cipher being used
|
|
1536
|
+
const char *SSL_CIPHER_get_name(const SSL_CIPHER *cipher) {
|
|
1537
|
+
if (cipher != nullptr) {
|
|
1538
|
+
return cipher->name;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
return kUnknownCipher;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
const char *SSL_CIPHER_standard_name(const SSL_CIPHER *cipher) {
|
|
1545
|
+
return cipher->standard_name;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
const char *SSL_CIPHER_get_kx_name(const SSL_CIPHER *cipher) {
|
|
1549
|
+
if (cipher == nullptr) {
|
|
1550
|
+
return "";
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
switch (cipher->algorithm_mkey) {
|
|
1554
|
+
case SSL_kRSA:
|
|
1555
|
+
return "RSA";
|
|
1556
|
+
|
|
1557
|
+
case SSL_kECDHE:
|
|
1558
|
+
switch (cipher->algorithm_auth) {
|
|
1559
|
+
case SSL_aECDSA:
|
|
1560
|
+
return "ECDHE_ECDSA";
|
|
1561
|
+
case SSL_aRSA_SIGN:
|
|
1562
|
+
return "ECDHE_RSA";
|
|
1563
|
+
case SSL_aPSK:
|
|
1564
|
+
return "ECDHE_PSK";
|
|
1565
|
+
default:
|
|
1566
|
+
assert(0);
|
|
1567
|
+
return "UNKNOWN";
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
case SSL_kPSK:
|
|
1571
|
+
assert(cipher->algorithm_auth == SSL_aPSK);
|
|
1572
|
+
return "PSK";
|
|
1573
|
+
|
|
1574
|
+
case SSL_kGENERIC:
|
|
1575
|
+
assert(cipher->algorithm_auth == SSL_aGENERIC);
|
|
1576
|
+
return "GENERIC";
|
|
1577
|
+
|
|
1578
|
+
default:
|
|
1579
|
+
assert(0);
|
|
1580
|
+
return "UNKNOWN";
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
int SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *out_alg_bits) {
|
|
1585
|
+
if (cipher == nullptr) {
|
|
1586
|
+
return 0;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
int alg_bits, strength_bits;
|
|
1590
|
+
switch (cipher->algorithm_enc) {
|
|
1591
|
+
case SSL_AES128:
|
|
1592
|
+
case SSL_AES128GCM:
|
|
1593
|
+
alg_bits = 128;
|
|
1594
|
+
strength_bits = 128;
|
|
1595
|
+
break;
|
|
1596
|
+
|
|
1597
|
+
case SSL_AES256:
|
|
1598
|
+
case SSL_AES256GCM:
|
|
1599
|
+
case SSL_CHACHA20POLY1305:
|
|
1600
|
+
alg_bits = 256;
|
|
1601
|
+
strength_bits = 256;
|
|
1602
|
+
break;
|
|
1603
|
+
|
|
1604
|
+
case SSL_3DES:
|
|
1605
|
+
alg_bits = 168;
|
|
1606
|
+
strength_bits = 112;
|
|
1607
|
+
break;
|
|
1608
|
+
|
|
1609
|
+
default:
|
|
1610
|
+
assert(0);
|
|
1611
|
+
alg_bits = 0;
|
|
1612
|
+
strength_bits = 0;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
if (out_alg_bits != nullptr) {
|
|
1616
|
+
*out_alg_bits = alg_bits;
|
|
1617
|
+
}
|
|
1618
|
+
return strength_bits;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
const char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf,
|
|
1622
|
+
int len) {
|
|
1623
|
+
const char *kx, *au, *enc, *mac;
|
|
1624
|
+
uint32_t alg_mkey, alg_auth, alg_enc, alg_mac;
|
|
1625
|
+
|
|
1626
|
+
alg_mkey = cipher->algorithm_mkey;
|
|
1627
|
+
alg_auth = cipher->algorithm_auth;
|
|
1628
|
+
alg_enc = cipher->algorithm_enc;
|
|
1629
|
+
alg_mac = cipher->algorithm_mac;
|
|
1630
|
+
|
|
1631
|
+
switch (alg_mkey) {
|
|
1632
|
+
case SSL_kRSA:
|
|
1633
|
+
kx = "RSA";
|
|
1634
|
+
break;
|
|
1635
|
+
|
|
1636
|
+
case SSL_kECDHE:
|
|
1637
|
+
kx = "ECDH";
|
|
1638
|
+
break;
|
|
1639
|
+
|
|
1640
|
+
case SSL_kPSK:
|
|
1641
|
+
kx = "PSK";
|
|
1642
|
+
break;
|
|
1643
|
+
|
|
1644
|
+
case SSL_kGENERIC:
|
|
1645
|
+
kx = "GENERIC";
|
|
1646
|
+
break;
|
|
1647
|
+
|
|
1648
|
+
default:
|
|
1649
|
+
kx = "unknown";
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
switch (alg_auth) {
|
|
1653
|
+
case SSL_aRSA_DECRYPT:
|
|
1654
|
+
case SSL_aRSA_SIGN:
|
|
1655
|
+
au = "RSA";
|
|
1656
|
+
break;
|
|
1657
|
+
|
|
1658
|
+
case SSL_aECDSA:
|
|
1659
|
+
au = "ECDSA";
|
|
1660
|
+
break;
|
|
1661
|
+
|
|
1662
|
+
case SSL_aPSK:
|
|
1663
|
+
au = "PSK";
|
|
1664
|
+
break;
|
|
1665
|
+
|
|
1666
|
+
case SSL_aGENERIC:
|
|
1667
|
+
au = "GENERIC";
|
|
1668
|
+
break;
|
|
1669
|
+
|
|
1670
|
+
default:
|
|
1671
|
+
au = "unknown";
|
|
1672
|
+
break;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
switch (alg_enc) {
|
|
1676
|
+
case SSL_3DES:
|
|
1677
|
+
enc = "3DES(168)";
|
|
1678
|
+
break;
|
|
1679
|
+
|
|
1680
|
+
case SSL_AES128:
|
|
1681
|
+
enc = "AES(128)";
|
|
1682
|
+
break;
|
|
1683
|
+
|
|
1684
|
+
case SSL_AES256:
|
|
1685
|
+
enc = "AES(256)";
|
|
1686
|
+
break;
|
|
1687
|
+
|
|
1688
|
+
case SSL_AES128GCM:
|
|
1689
|
+
enc = "AESGCM(128)";
|
|
1690
|
+
break;
|
|
1691
|
+
|
|
1692
|
+
case SSL_AES256GCM:
|
|
1693
|
+
enc = "AESGCM(256)";
|
|
1694
|
+
break;
|
|
1695
|
+
|
|
1696
|
+
case SSL_CHACHA20POLY1305:
|
|
1697
|
+
enc = "ChaCha20-Poly1305";
|
|
1698
|
+
break;
|
|
1699
|
+
|
|
1700
|
+
default:
|
|
1701
|
+
enc = "unknown";
|
|
1702
|
+
break;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
switch (alg_mac) {
|
|
1706
|
+
case SSL_SHA1:
|
|
1707
|
+
mac = "SHA1";
|
|
1708
|
+
break;
|
|
1709
|
+
|
|
1710
|
+
case SSL_SHA256:
|
|
1711
|
+
mac = "SHA256";
|
|
1712
|
+
break;
|
|
1713
|
+
|
|
1714
|
+
case SSL_AEAD:
|
|
1715
|
+
mac = "AEAD";
|
|
1716
|
+
break;
|
|
1717
|
+
|
|
1718
|
+
default:
|
|
1719
|
+
mac = "unknown";
|
|
1720
|
+
break;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
if (buf == nullptr) {
|
|
1724
|
+
len = 128;
|
|
1725
|
+
buf = (char *)OPENSSL_malloc(len);
|
|
1726
|
+
if (buf == nullptr) {
|
|
1727
|
+
return nullptr;
|
|
1728
|
+
}
|
|
1729
|
+
} else if (len < 128) {
|
|
1730
|
+
return "Buffer too small";
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
snprintf(buf, len, "%-23s Kx=%-8s Au=%-4s Enc=%-9s Mac=%-4s\n", cipher->name,
|
|
1734
|
+
kx, au, enc, mac);
|
|
1735
|
+
return buf;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
const char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher) {
|
|
1739
|
+
return "TLSv1/SSLv3";
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods() { return nullptr; }
|
|
1743
|
+
|
|
1744
|
+
int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) { return 1; }
|
|
1745
|
+
|
|
1746
|
+
const char *SSL_COMP_get_name(const COMP_METHOD *comp) { return nullptr; }
|
|
1747
|
+
|
|
1748
|
+
const char *SSL_COMP_get0_name(const SSL_COMP *comp) { return comp->name; }
|
|
1749
|
+
|
|
1750
|
+
int SSL_COMP_get_id(const SSL_COMP *comp) { return comp->id; }
|
|
1751
|
+
|
|
1752
|
+
void SSL_COMP_free_compression_methods() {}
|
|
1753
|
+
|
|
1754
|
+
size_t SSL_get_all_cipher_names(const char **out, size_t max_out) {
|
|
1755
|
+
return GetAllNames(out, max_out, Span(&kUnknownCipher, 1), &SSL_CIPHER::name,
|
|
1756
|
+
Span(kCiphers));
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
size_t SSL_get_all_standard_cipher_names(const char **out, size_t max_out) {
|
|
1760
|
+
return GetAllNames(out, max_out, Span<const char *const>(),
|
|
1761
|
+
&SSL_CIPHER::standard_name, Span(kCiphers));
|
|
1762
|
+
}
|